Skip to content

Opt a contact back into messaging

POST
/api/v2/contacts/{id}/opt-in
curl --request POST \
--url https://api.sipstack.com/api/v2/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/opt-in \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "reason": "Signed consent form received at the front desk on 2026-09-17" }'

Reverses an opt-out: removes the contact’s number from the STOP list and sets is_opted_out back to false, so the contact is eligible to receive messages again. Only do this with a genuine, documented re-consent. Requires contacts:write. 404 when the contact isn’t your organization’s.

If the contact opted out by texting STOP, a reason is required. It is saved to the contact’s consent history together with the API key that made the change. Without one the request is refused with 400 OPT_OUT_REASON_REQUIRED and nothing changes. A reason is optional when the opt-out was made another way (for example by you, or after a delivery bounce). A contact who texts START is opted back in automatically.

id
required
string format: uuid
Media type application/json
object
reason

Why the contact may receive messages again — for example, how they gave permission. Required when the contact opted out by texting STOP. Leading and trailing spaces are trimmed; text beyond 500 characters is not stored.

string
<= 500 characters
Example
Signed consent form received at the front desk on 2026-09-17

Contact opted in.

Media type application/json
object
success
boolean
message
string
Example
{
"message": "Contact opted in successfully"
}

OPT_OUT_REASON_REQUIRED — the contact opted out by texting STOP and the request has no reason. Nothing was changed; send the request again with a reason.

Media type application/json
object
success
boolean
code
string
error
string
Example
{
"success": false,
"code": "OPT_OUT_REASON_REQUIRED",
"error": "This contact opted out by texting STOP. A reason is required to opt them back in."
}

Missing or invalid API key.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}

The key is missing the contacts:write scope, or the Flare API tier is not on your plan.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}

Contact not found in your organization.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}