Getting started with the Original API
LeadDesk Web API enables clients to manage their own LeadDesk data with simple HTTP/HTTPS requests.
All parameters can usually be sent in either POST or GET style. Some commands require that the command specific data is to be send in JSON format in the HTTP request body. In that case the common parameters needs to be sent as GET parameters. These are the common parameters which are required for each request (GET or POST):
- Identification code provided by the LeadDesk customer support. 32 characters long constant string.
- Name of the module that should handle the request.
- Command that the module should execute.
Basic example (which does not work because authentication value is not correct) http://api.leaddesk.com?auth=11111222223333344444555556666677&mod=contact&cmd=add Used character set is generally UTF-8 unless stated otherwise for each command.
If an error occurs during the processing of the command then HTTP response with status 400 or 500 is returned. Error response also includes a short logical text describing the error. Below is a list of common errors that might occur with any request. It is possible for the error message to have additional information after the error code. In that case the format is as follows “[ERROR_TEXT]:[additional info]” for example “ERR_NOT_FOUND:agent”. HTTP Status codes
|200||Operation was completed OK|
|400||Operation failed because something in the request was wrong. Fix the request and try again.|
|500||Some internal error occured. Report this to LeadDesk support and/or try again later.|
|ERR_ARGUMENT_MISSING||Mandatory argument was not included in the request.|
|ERR_ARGUMENT_INVALID||Submitted argument is not valid. Integer parameters need to be integers. e.g. ‘A’ is not a valid integer.|
|ERR_AUTHENTICATION||Authentication failed. Check the auth parameter.|
|ERR_INVALID_MODULE||Invalid module requested. Check the name of the module.|
|ERR_INVALID_COMMAND||Invalid module command. Check the name of the command.|
|ERR_DB||Some generic error with DB. Please contact customer support!|
|ERR_DISABLED||Service is disabled temporarily. Contact customer support for more information!|
|ERR_NOT_FOUND||Something that was requested could not be found. Usually includes additional information describing what was not found.|
|ERR_FILE_TOO_LARGE||When uploading a file by POST file and the file size exceeds the limit.|
|ERR_NOT_SUPPORTED||Feature, command, parameter etc. is not supported|
|ERR_ARGUMENT_EMPTY||Mandatory string argument is empty.|
|ERR_ARGUMENT_LENGTH||Length of mandatory string argument does not meet minimum or maximum length requirements.|
LeadDesk language constants
Language ID for supported general languages. If you want to use client specific language please contact customer support. Common languages: