Opt a contact back into messaging
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", "evidence": { "type": "signed_consent", "evidenceDate": "2026-09-17T14:00:00Z", "reference": "Front-desk consent form 0042" } }'import requests
url = "https://api.sipstack.com/api/v2/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/opt-in"
payload = { "reason": "Signed consent form received at the front desk on 2026-09-17", "evidence": { "type": "signed_consent", "evidenceDate": "2026-09-17T14:00:00Z", "reference": "Front-desk consent form 0042" }}headers = { "x-api-key": "<x-api-key>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/api/v2/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/opt-in';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"reason":"Signed consent form received at the front desk on 2026-09-17","evidence":{"type":"signed_consent","evidenceDate":"2026-09-17T14:00:00Z","reference":"Front-desk consent form 0042"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'POST', url: 'https://api.sipstack.com/api/v2/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/opt-in', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, data: { reason: 'Signed consent form received at the front desk on 2026-09-17', evidence: { type: 'signed_consent', evidenceDate: '2026-09-17T14:00:00Z', reference: 'Front-desk consent form 0042' } }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}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 themselves (texted STOP, opted out with
their carrier, or a plain-language opt-out request you confirmed), you
must send a reason of at least 20 characters and evidence that
they agreed again after opting out. Both are saved to the contact’s
consent history with the API key that made the change, and SIPSTACK is
notified. Without them the request is refused with 400
OPT_OUT_OVERRIDE_EVIDENCE_REQUIRED (the body lists each problems
item) and nothing changes. Neither is needed 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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”object
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.
Example
Signed consent form received at the front desk on 2026-09-17Proof the contact agreed again after opting out. Required when the contact opted out themselves.
object
Example
signed_consentWhen they agreed again (ISO 8601). Must be after the opt-out and not in the future.
Example
2026-09-17T14:00:00ZWhere the proof is kept (form number, recording id, …).
Example
Front-desk consent form 0042Responses
Section titled “ Responses ”Contact opted in.
object
Example
{ "message": "Contact opted in successfully"}OPT_OUT_OVERRIDE_EVIDENCE_REQUIRED — the contact opted out
themselves and the request is missing a long enough reason or valid
evidence. Nothing was changed.
object
Example
{ "success": false, "code": "OPT_OUT_OVERRIDE_EVIDENCE_REQUIRED", "problems": [ "reason_too_short" ], "error": "This contact opted out themselves (STOP, their carrier, or a confirmed opt-out request). To opt them back in, give a reason of at least 20 characters and proof that they agreed again after opting out (a START text, a signed consent, or a recorded verbal consent), with its date and a reference."}Missing or invalid API key.
Inline error shape used by the messaging API and management endpoints.
object
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.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}Contact not found in your organization.
Inline error shape used by the messaging API and management endpoints.
object
Example
{ "success": false, "error": "Recipient phone number (to) is required"}