The method described in this article is only intended for SME.
This method retrieves all subjects that have been created in your edna dashboard.
Request Endpoint
Make a POST request to this URL: https://im.edna.io/api/im-subject/by-apikey
Request Format
In the body of the request, the subject type is passed. Possible imType
variables are WHATSAPP
and VIBER
.
{ "imType": "WHATSAPP" }
Response Format
[ { "id": 112, "subject": "SUBJECT_WA", "clientComment": null, "createdAt": null, "updatedAt": null, "status": "ACTIVE", "statusComment": null, "phone": "79000000000", "test": false, "imType": "WHATSAPP" } ]
If there is more than one subject, an array of subjects will be returned.
[ { "id": 112, "subject": "SUBJECT_WA", "clientComment": null, "createdAt": null, "updatedAt": null, "status": "ACTIVE", "statusComment": null, "phone": "79000000000", "test": false, "imType": "WHATSAPP" }, { "id": 113, "subject": "SUBJECT2_WA", "clientComment": null, "createdAt": null, "updatedAt": null, "status": "BLOCKED", "statusComment": null, "phone": "79000000001", "test": false, "imType": "WHATSAPP" } ]
If the client does not have a subject of the requested type, the response will be an empty array.
[ ]
Response Parameters
Parameter | Type | Description |
id | number | Subject ID |
subject | string | Subject name |
createdAt | string | Subject creation time |
updatedAt | string | Time of the last change to the subject |
status | string | Status of the subject in edna platform |
phone | string | Phone number to which the subject is registered. Important! For Viber, a unique code is specified. |
test | string | Test or work subject |
imType | string | The channel that is used for message delivery |