Setting Up Callback URLs

Use this method to set callback URL values.

set Method

As a result of a completed request using the set method, a callback value will be set. If the request is successful, the server returns the code 200. If the request fails, the server returns a response with an error code.

If the code 200 is not received in response to the callback request, edna Pulse makes 10 more request attempts with an interval of 2*X seconds between attempts (where X is the number of attempts) until the code 200 is received in response. That is, every 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 seconds.

URL

To set a required callback value, send a POST request to the following URL address: https://app.edna.io/api/callback/set.

Request Format

A JSON object is passed in the request body with the parameters shown below.

{
    "statusCallbackUrl": "https://messagesxxx.com/status/webhook",
    "inMessageCallbackUrl": "https://messagesxxx.com/messages/webhook",
    "subjectId": 234
}
ParameterData typeDescription
statusCallbackUrlstring (optional)Callback URL for message delivery statuses, 500 characters max.

Important! The URL address you specify must exist and be available for a request from the public Internet. To verify its availability, we will send a HEAD request, to which a response with the status 200 is expected. Otherwise, we won’t be able to register this callback URL.
inMessageCallbackUrlstring (optional)Callback URL for incoming messages, 500 characters max.

Important! The URL address you specify must exist and be available for a request from the public Internet. To verify its availability, we will send a HEAD request, to which a response with the status 200 is expected. Otherwise, we won’t be able to register this callback URL.
messageMatcherCallbackUrlstring (optional)Callback URL for managing API (e.g. template registration), 500 characters max.

Important! The URL address you specify must exist and be available for a request from the public Internet. To verify its availability, we will send a HEAD request, to which a response with the status 200 is expected. Otherwise, we won’t be able to register this callback URL.
subjectIdinteger (optional)Channel identifier. You can learn this value using the method that retrieves the list of channels.
If subjectId is not specified in the request, the callback URLs are set for all channels of the tenant. If subjectId is specified, then the callback URLs are only set for that channel.

Response Format

As a response to the request, a JSON object that contains the response code is returned.

ParameterData typeDescription
codestringRequest response code

Request Response Codes

CodeDescription
okThe request has been completed successfully.
error-callback-url-max-lengthThe URL address contains more than 500 characters.
error-callback-url-not-httpsThe URL address does not use HTTPS.
error-callback-url-not-availableThe HEAD request to the specified URL has failed.
error-subject-unknownThe channel with the specified subjectId has not been found.
url-not-specifiedStatusCallbackUrl or inMessageCallbackUrl must be specified.