Step 2: Response to request “Send a message”

tyntec will immediately respond to a HTTPS POST request to “Send a message”. The response will contain the request ID. In the case there were delivery issues, the response will contain possible delivery issues following an immediate check for inconsistencies (e.g. case sensitivity; wrong parameter; too many characters; no receiver defined; etc.). The corresponding HTTP status code will be returned.

Successful Request Response (JSON)

HTTP/1.1 200 OK
{
"requestId":"12-75cfafba-8799-4f2b-8505-ece6af6abf01",
"errorText":""
}

Unsuccessful Request Response (JSON)

HTTP/1.1 400 Bad Request
{
"requestId":"12-75cfafba-8799-4f2b-8505-ece6af6abf01","responseText":"*see list below*"
}

HTTP Code

Message

Description

200 OK

*see code examples

‘Un/Successful Request

Response‘*

 OR

 *see code examples

‘Message Notification‘*

The HTTPS request was accepted. The posted message passed an initial consistency check and tyntec will reply with the respective requestId.

 OR

 The requested message notification can be retrieved and is returned.

400 Bad Request

*see validation error message list below*

The HTTPS request failed to pass the validation, i.e., one or more of the required parameters of the request are empty/missing/contradictory/invalid. The given message provides more information as to why the validation failed.

403 Forbidden

Username/password wrong or missing.

The credentials provided are not authorized.

404 Not Found

The requested message notification cannot be retrieved.

The requested URI is either nonexistent or the respective authentication is invalid.

405 Method Not Allowed

Invalid request method.

The request contains an invalid HTTP method

(POST/GET).

406 Not Acceptable

The content-type is not supported. Allowed values are "application/json".

The request is not JSON format or the HTTP header reads "Content-Type".

415 Unsupported Media Type

The media type is not supported. Allowed media-type is "application/json".

The request is not JSON format or the HTTP header reads "Accept".

500 Internal Server Error

Please retry. If error persists, please contact customer support.

Unexpected error.

 

Validation error message may be a one or any combination of the ones below:

Message

Sent

Description

Invalid authentication.

Send/Query actions

Invalid username and/or password, or wrong authentication token.

RequestId is missing.

Query action

Please specify the request-ID for which the message status should be retrieved.

Sender is missing.

Send action

The mandatory parameter "from" is not specified.

Receiver is missing.

Send action

The mandatory parameter "to" is not specified.

Receiver number is not numeric.

Send action

The mandatory parameter "to" is malformed. It has to be an international phone number.

Message is empty.

Send action

An empty message cannot be sent.

Message exceeds maximum character length of 1000.

Send action

Message text exceeds the limit of 1000 characters.

The respond-back URL is invalid.

Send action

Please format the URL according to: http(s)://host(:port).

One or more mandatory parameters are missing.

Send action

The request is missing mandatory parameters.

Your message is rejected because it has over-length.

Send action

Your account settings block the sending of over-length messages.

The requested URI was not found.

Query action

The requested URI is either nonexistent or the respective authentication is invalid.

Unexpected error, please retry. If error persists, please contact customer support.

Send/Query actions

Something unexpected occurred during the processing of the request.

The parameter ${invalidparameter} is invalid.

Send action

The request contains at least one invalid parameter.

${invalidparameter} will state which parameter.