Subscriptions

Analytics_ListSubscriptions

SecuritybasicAuth
Request
path Parameters
bot_id
required
string
query Parameters
page_token
string
page_size
integer <int32>
Responses
200

A successful response.

Response Schema: application/json
Array of objects (Subscription)
next_page_token
string
get/v1/bots/{bot_id}/subscriptions
Request samples
Response samples
application/json
{
  • "subscriptions": [
    • {
      }
    ],
  • "next_page_token": "string"
}

Analytics_CreateSubscription

SecuritybasicAuth
Request
path Parameters
bot_id
required
string

the id of the bot

Request Body schema: application/json
required
bot_version
string (the version of the bot)
target
string (the target url to which the request will be sent)
secret
string (the secret with which the request will be signed)
event_type
string

The event type you want to be notified about. One of TRACKING_EVENT, FLOW_EVENT or MESSAGE_EVENT

event_names
Array of strings (when specified only the events with the given name will be sent only valid for TRACKING_EVENTS for now)
version
string (identifies the definition of the subscription type to use. currently only the value "v1" is allowed)
Responses
200

A successful response.

Response Schema: application/json
object (Subscription)
id
string (identifies the subscription)
bot_id
string (identifies the bot)
bot_version
string
target
string (the destination url where the events will be sent to)
event_type
string (the event type you want to be notified about)
event_names
Array of strings (when specified only the events with the given name will be sent only valid for TRACKING_EVENTS for now)
created_at
string <date-time> (the time when the subscription was created)
version
string (identifies the definition of the subscription payload to use currently only the value "v1" is allowed)
status
string
post/v1/bots/{bot_id}/subscriptions
Request samples
application/json
{ }
Response samples
application/json
{
  • "subscription": {
    • "id": "string",
    • "bot_id": "string",
    • "bot_version": "string",
    • "target": "string",
    • "event_type": "string",
    • "event_names": [
      ],
    • "created_at": "2019-08-24T14:15:22Z",
    • "version": "string",
    • "status": "string"
    }
}

Analytics_DeleteSubscription

SecuritybasicAuth
Request
path Parameters
bot_id
required
string
subscription_id
required
string
Responses
200

A successful response.

Response Schema: application/json
object
delete/v1/bots/{bot_id}/subscriptions/{subscription_id}
Request samples
Response samples
application/json
{ }