RocketCOMS

Create a Campaign Subscription

Create a webhook subscription to receive event notifications for a campaign.

Endpoint

POST /v1/campaigns/{id}/subscriptions

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Path Parameters

id  REQUIRED

string (UUID)

Unique ID assigned to the campaign in RocketCOMS.

Request Body

eventTypes  REQUIRED

array

List of events for which the subscription receives notifications. Possible values are:

  • message.status  Status of messages sent as part of a campaign.
  • message.replies  Reply messages for a campaign.
  • batch.status  Status of campaign batches.

url  REQUIRED

string

Webhook subscription URL endpoint.

Returns

If successful, returns 200 Webhook created successfully.

SAMPLE REQUEST

				
					{
  "eventTypes": [
    "message.status",
    "message.replies",
    "batch.status"
  ],
  "url": "https://mycompany.com/webhook/listener"
}
				
			

SAMPLE RESPONSE

				
					{
  200 Webhook created successfully
}