Re-subscribe a contact
Re-subscribe a contact to SMS and/or email, clearing the unsubscribe flag for those channels.
POST
https://api.centerfy.ai/webhooks/inbound/contacts/:id/resubscribe Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
X-Webhook-Source | No | your-system-name | Optional loop-prevention label; the outbound trigger won’t echo this change back to the same source. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The contact id. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
channels | string[] | Yes | — | Channels to re-subscribe to: one or both of sms, email (no duplicates). |
Request body
{
"channels": [
"email"
]
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/contacts/{id}/resubscribe" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channels": [
"email"
]
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.contacts.resubscribe("<contactId>", {
"channels": [
"email"
]
});
console.log(result); centerfy contacts resubscribe <contactId> '{"channels":["email"]}' MCP tool: centerfy_contacts_resubscribe (see MCP server)
Response
{
"status": "success",
"contact_id": "3f1c2a9e-7b4d-4c8a-9e2f-1a2b3c4d5e6f",
"dnc_bypass": false,
"sms_unsubscribed": true,
"email_unsubscribed": false
}Errors
400— if the id is not a valid UUID or the body is invalid; 404 if the contact is not in this sub-account.
Notes
Channels not listed are left unchanged. For each channel that actually changes, a system note is added to the contact’s conversation (if it has one). Returns the contact’s current consent flags.