Skip to content

Create Custom Opt-Out

This API allows you to create a new Custom Opt-Out.

To view your Custom Opt-Outs, visit the Custom Opt-Out page in your Cellcast account.

Parameters for creating Custom Opt-Out

Headers Parameters

ParametersDescription
AuthorizationPlease add provided Bearer token - linked to your Cellcast account. Check here
Content-Typeapplication/json

Body Parameters

ParametersTypeDescriptionRequired
titlestringTitle of the custom opt-outYes
descriptionstringDescription text for the opt-out pageYes
optionsarrayArray of option strings for the opt-out surveyNo

Code Samples

POST https://api.cellcast.com/api/v1/apiClient/optoutlist

bash
curl --location 'https://api.cellcast.com/api/v1/apiClient/optoutlist' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer {{API_KEY}}' \
--data '{
    "title": "My Custom Opt Out",
    "description": "We'\''re sorry to see you go! Are you still interested in any of these contents?",
    "options": ["Not interested", "Too many messages", "Spam"]
}'

Replace with the actual API key that you own.

Responses

200 Success

json
{
    "maintainence": 0,
    "new_version": 0,
    "force_update": 0,
    "invalid_token": 0,
    "refresh_token": "",
    "show_message": 0,
    "is_enc": false,
    "status": true,
    "message": "Optout list created successfully",
    "message_type": "toast",
    "data": {
        "title": "My Custom Opt Out",
        "description": "We're sorry to see you go! Are you still interested in any of these contents?",
        "options": [
            {
                "option1": "Not interested"
            },
            {
                "option2": "Too many messages"
            },
            {
                "option3": "Spam"
            }
        ],
        "createdBy": "680f524350eb4e38fead5161",
        "createdAt": "2025-11-13T03:07:07.701Z",
        "updatedAt": "2025-11-13T03:07:07.701Z"
    },
    "error": {}
}

401 Unauthorized

json
{
  "code": 401,
  "message": "Token expired",
  "stack": "APIError: Token expired ...."
}

400 Bad Request

json
{
  "status": false,
  "message": "Validation error",
  "error": {
    "title": "Title is required"
  }
}