Get DND
GET
/api/v1/ext/contacts/{id}/dnd
A contact's Do-Not-Disturb settings.
Auth: Bearer access_token
Scope: contacts.read
Each direction is either all channels (all: true) or a list of specific channels (sms, whatsapp, imessage, rcs). Outbound DND stops sends to the contact on those channels — a send answers 409 with reason: "dnd"; inbound DND stops the AI agent and automations from reacting to the contact's messages there. Same settings as the contact panel and the "Set Contact DND" automation action.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | number | yes | The contact id. |
Responses
| Status | When |
|---|---|
200 | OK |
401 | Missing or invalid token |
403 | Missing scope |
404 | Contact does not exist or is not owned by the installer (same response for both) |
RequestResponses
curl -X GET "https://backend.mysmsgateway.app/api/v1/ext/contacts/{id}/dnd" \
-H "Authorization: Bearer <ACCESS_TOKEN>"OK
{
"success": true,
"data": {
"contact_id": 1234,
"workspace_id": 7,
"dnd": {
"outbound": {
"all": false,
"channels": [
"sms",
"whatsapp"
]
},
"inbound": {
"all": false,
"channels": []
}
}
}
}Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Path parameters
The contact id.
Request URL
GEThttps://backend.mysmsgateway.app/api/v1/ext/contacts/%7Bid%7D/dnd
Previous
« Delete note
Next
Set DND »
