Status values
| Value | Description |
|---|---|
active | The contact is active and can receive messages. |
blocked | The contact is blocked. No messages will be delivered. |
unblocked | Removes a previous block, restoring the contact to active. |
subscribed | Marks the contact as subscribed to messages. |
unsubscribed | Marks the contact as opted out. Equivalent to setting is_opted_out: true. |
The ContactStatusResponse object
Integer ID of the contact.
Phone number of the contact in E.164 format without the leading
+.true if the contact has opted out of messages.true if the contact is blocked from receiving messages.POST /v1/contact/status
Returns the current messaging status for a contact.Request body
The integer ID of the contact.
The contact’s phone number in E.164 format without the leading
+.Provide either
id or phone. At least one is required.Response
Returns a ContactStatusResponse object.Example
POST /v1/contact/set_status
Updates the messaging status of a contact.Request body
The integer ID of the contact.
The contact’s phone number in E.164 format without the leading
+.The new status to apply. One of:
active, blocked, unblocked, subscribed, unsubscribed.Provide either
id or phone to identify the contact. At least one is required.Response
Returns a success string on completion.Examples
- Block a contact
- Unsubscribe a contact
- Restore active status
The
is_opted_out field on the Contact object reflects whether the contact has been unsubscribed. Setting status to unsubscribed sets is_opted_out to true; setting it to subscribed sets it back to false.