Receiving List of Channels
This section contains a description of the API method for getting a list of channels.
Working with the public API is available to all clients registered on the edna portal. You can set up access and get an API key in your edna Pulse account.
The channel-profile
method
If the request is successful, the server returns a response with the code 200
containing a JSON object with a list of channels. If the request is unsuccessful, the server returns an error code message.
To send a message, a GET request is made to the following URL: https://app.edna.io/api/channel-profile ?types=WHATSAPP
Request format
An empty JSON object is passed in the request body.
Response format
A JSON array containing channel data is returned in response to the request.
[
{
"id": 0,
"name": "My New Channel",
"subjectId": 537,
"channelAttribute": "35700000000",
"subject": "mynewchannel_wa",
"active": true,
"registrationStatus": "DONE_BUSINESS_VERIFICATION",
"type": "WHATSAPP",
"instruction": "The channel is operating correctly and is ready for use."
}
]
Response parameters
Parameter | Data type | Description |
---|---|---|
id | integer | Channel ID. |
name | string | Channel name. |
subjectId | integer | Signature ID. The field is passed only for registered and active channels. |
channelAttribute | string (optional) | Channel ID. A phone number is transmitted for the active WhatsApp channel. |
subject | string | Name of the signature. |
active | boolean | Channel activity status. true — the channel is active; false — the channel is inactive. |
registrationStatus | string | Channel registration status. Possible values for the WhatsApp channel:- DONE_BUSINESS_VERIFICATION — the channel is working properly and ready for use; - DONE_FINISH_REGISTER — company verification has been completed successfully. |
type | string | Channel type. Possible values: WHATSAPP , VIBER . |
limit | string | Daily limit of the WhatsApp channel. Learn more about the WhatsApp channel information. |
qualityScore | string | The quality of the WhatsApp channel. |
qualityStatus | string | The status of the WhatsApp channel. |
instruction | string | Instructions for further steps of channel registration. |
Request response codes
ok
— the request was successfully completed.
If there are no channels, an empty array []
is returned.