Skip to main content

Setting Up Callback URLs

Last updated: 15 April 2022

The SET API method sets the URLs to which edna Pulse will send callback requests.

The SET method accepts only POST requests. The parameters are passed in the request body as a JSON object. An API key is used for authorization. After registering with edna Pulse, you can generate or copy the existing key yourself.

File IconSpecifying Settings for API
info

You can enable authorization of callback requests that edna Pulse transmits to your server.

Method call

Send a POST request to the URL https://app.edna.io/api/callback/set

In response to a request from the server, the status of its execution with the code 200 should be returned.

If the code 200 does not arrive in response to the callback request, edna Pulse performs 10 more request attempts with an interval of 2 seconds between attempts (where X is the attempt number) until the code 200 arrives in response.

info

That is, every 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 seconds.

Request Body Format

{
"statusCallbackUrl": "https://messagesxxx.com/status/webhook",
"inMessageCallbackUrl": "https://messagesxxx.com/messages/webhook",
"subjectId": 234
}

Request Parameters

info

The URL specified in the statusCallbackUrl, inMessageCallbackUrl and messageMatcherCallbackUrl parameters must exist and be available for request from the public Internet. To check availability, we will send a HEAD request, to which we expect to see a response with the status 200.

Otherwise, we will not be able to register your URL.

ParameterData typeDescription
statusCallbackUrlstring (optional)The URL of the callback for receiving message delivery statuses. 500 characters maximum.
inMessageCallbackUrlstring (optional)The URL of the callback for receiving incoming messages. 500 characters maximum.
messageMatcherCallbackUrlstring (optional)The URL of the callback for receiving management events (for example, template registration).
subjectIdinteger (optional)The channel ID. It can be found through the channel list method.

File IconReceiving List of Channels
warning

If the subjectID parameter is not specified in the request, then callbacks are set for all tenant channels.

If the subjectID is specified in the request, the value of the callback address is set only for the specified channel.

Response format

A JSON object containing the request execution code is returned in response to the request.

ParameterData typeDescription
codestringResponse code.

Request response codes

CodeDescription
okThe request was successfully completed.
error-callback-url-max-lengthThe URL contains more than 500 characters.
error-callback-url-not-httpsThe URL does not use https.
error-callback-url-not-availableThe HEAD request for the URL failed.
error-subject-unknownThe channel with the specified ID was not found.
url-not-specifiedYou must specify StatusCallbackUrl or inMessageCallbackUrl.