curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/unsubscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "0521234567"
}
'{
"success": true
}{
"error": "data/phone must NOT have fewer than 5 characters"
}Templates Subscriptions
Unsubscribe from Templates
Unsubscribe a recipient from template messages. A recipient can also unsubscribe by replying with “הסר” to a template message they received, or an agent can remove them manually in Texter.
POST
https://{projectID}.texterchat.com/server/api/v2
/
whatsapp
/
templates
/
unsubscribe
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/whatsapp/templates/unsubscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "0521234567"
}
'{
"success": true
}{
"error": "data/phone must NOT have fewer than 5 characters"
}Required token scopes:
Manage all chats
Once unsubscribed, they no longer receive template messages - any attempt to send a template message to an unsubscribed recipient is skipped automatically (the Send Template Message endpoint returns success: false). You can re-subscribe them at any time using the Resubscribe to Templates endpoint.הרשאות
API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.
גוף
application/json
תגובה
Operation completed
דוגמה:
true