Skip to content

Delete SMS Message by Message ID

This API allows you to delete a previously sent SMS message using its MessageId.

Endpoint

DELETE https://api.cellcast.com/api/v1/gateway/messages/{messageId}

Replace {messageId} with the actual Message ID of the SMS you want to delete.

Parameters for Delete SMS API

Headers Parameters

ParameterDescription
AuthorizationPlease add your provided Bearer token - linked to your Cellcast account. Check here

Code Samples

DELETE https://api.cellcast.com/api/v1/gateway/messages/{messageId}

bash
curl --location --request DELETE 'https://api.cellcast.com/api/v1/gateway/messages/6822bc4ed000000000000000' \
--header 'Authorization: Bearer {{API_KEY}}'

Responses

200 Success

json
{
    "app_type": "web",
    "app_version": "1.0",
    "maintainence": 0,
    "new_version": 0,
    "force_update": 0,
    "invalid_token": 0,
    "refresh_token": "",
    "show_message": 0,
    "is_enc": false,
    "status": true,
    "message": "Message deleted successfully",
    "message_type": "toast",
    "data": {
        "message": "6822bc4ed000000000000000"
    },
    "error": {}
}

404 Message Not Found

json
{
    "app_type": "web",
    "app_version": "1.0",
    "maintainence": 0,
    "new_version": 0,
    "force_update": 0,
    "invalid_token": 0,
    "refresh_token": "",
    "show_message": 0,
    "is_enc": false,
    "status": false,
    "message_type": "toast",
    "message": "Message not found",
    "data": {},
    "error": {
        "message": "Message not found"
    }
}

401 Unauthorized

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