Direct API
SMPPRules
  • General Info
  • Authorization
  • Connection check
  • Single messages
    • Sending SMS
    • Sending FLASHCALL
    • Sending VOICECODE
    • Sending WHATSAPP
    • Sending VK
    • Receiving Callback
    • Getting Messages
    • Stopping Messages
  • Additional info
    • Account Balance
    • References
      • Messages Error Codes
Powered by GitBook
On this page
  • Stopping messages by uuid
  • Response object description
  • Request example
  1. Single messages

Stopping Messages

Stopping messages by uuid

POST https://direct.revicom.ltd/api/v1/message/stop

The method allows for permanent cancelation of single messages with identifiers transmitted

Headers

Name
Type
Description

Authorization*

string

Basic {TOKEN_1}

Content-Type*

string

application/json

Request Body

Name
Type
Description

uuids*

array

Array of message identifiers; at most 10,000 values are allowed.

If the request is correct, a response will list the message stopping statuses.

{
  "errors": true,
  "items": [
    {
      "messageUuid": "2a28d557-22a1-4be6-8908-1481723043dd",
      "code": 201
    },
    {
      "messageUuid": "811c27e3-3bc4-406a-9fcd-44435a8208da",
      "code": 403
    },
    {
      "messageUuid": "cc46e6b6-2d77-4457-aa81-c17a027721d3",
      "code": 404
    }
  ]
}

Invalid token used/ authorization header missing.

{
    "error": {
        "code": 4012,
        "msg": "Bad credentials"
    }
}
{
    "error": {
        "code": 4010,
        "msg": "Not Authenticated"
    }
}

Token of wrong type used.

{
    "error": {
        "code": 4030,
        "msg": "Access Denied"
    }
}

Changing the status of messages is asynchronous: it can take a few seconds between successful completion of the request and the status of messages being set to unsent.

  • This request can be performed for both single messages and dispatch messages

  • When a root cascade message is successfully stopped, the entire cascade from that message will be stopped

Response object description

{
  "errors": true,
  "items": [
    {
      "messageUuid": "2a28d557-22a1-4be6-8908-1481723043dd",
      "code": 200
    },
    {
      "messageUuid": "063464ec-a34f-4558-90c5-984395000001",
      "code": 202
    },
    {
      "messageUuid": "811c27e3-3bc4-406a-9fcd-44435a8208da",
      "code": 403
    },
    {
      "messageUuid": "cc46e6b6-2d77-4457-aa81-c17a027721d3",
      "code": 404
    }
  ]
}
Parameter
Type
Description

errors

boolean

Unsuccessful message stops (codes 403, 404 in the response)

items

array

Array with message stop result objects

items.messageUuid

string

Message ID

items.code

integer

Message stop result:

  • 200 — the message will be stopped for sure

  • 202 — the message will be stopped not for sure, because it enters the stage of sending or generating a cascade message

  • 403 — the message cannot be stopped because it is being sentor already sent

  • 404 — the message was not stopped because it was not found

Request example

POST https://direct.revicom.ltd/api/v1/message/stop
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json
{
  "uuids": [
    "2a28d557-22a1-4be6-8908-1481723043dd",
    "811c27e3-3bc4-406a-9fcd-44435a8208da",
    "cc46e6b6-2d77-4457-aa81-c17a027721d3"
  ]
}
curl -X POST 'https://direct.revicom.ltd/api/v1/message/stop' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \
-d '{"uuids":["2a28d557-22a1-4be6-8908-1481723043dd","811c27e3-3bc4-406a-9fcd-44435a8208da","cc46e6b6-2d77-4457-aa81-c17a027721d3"]}'

PreviousGetting MessagesNextAccount Balance

Last updated 1 year ago