Create a Subscription using post method under your account

API Endpoint

https://portal.mobtexting.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

POST

{endpoint}developer/subscriptions

PARAMETERS

Name Mandatory Descriptions
event Yes Type of the event you subscribe to. [All events]
identity Yes How should identity the event source.
webhook_id Yes Your Webhook Id created earlier. [Create Webhook]

Example Request

cURL - cURL
curl --location --globoff '{endpoint}api/v2/developer/subscriptions' \
--data '{
        "event": "rcs:message:in",
        "identity" : "all",
        "webhook_id" : "380ebbb5-9b6f-4c51-a98a-**********"
}'

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Subscription Saved Successfully",
  "data": {
    "id": 3,
    "event": "rcs:message:in",
    "identity": "all",
    "payload": [],
    "webhook_id": "dd4b91af-167d-48e6-901d-ae181ff6e80d",
    "created_at": "2022-12-07T06:20:09.000000Z"
  }
}