Webhooks

Create and manage webhooks

List webhooks

Make an API call to this endpoint to list existing webhooks.

Request
Security:
OAuthFlow (webhooks:write)
Responses
200

existing webhooks.

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

500

Internal Server Error

get/webhooks
Request samples
curl -i -X GET \
  https://api.attentivemobile.com/v1/webhooks \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "webhooks": [
    ]
}

Create webhook

Make an API call to this endpoint to subscribe to a webhook.

Events are a collection of strings of the following types:

  • email.subscribed
  • sms.subscribed
  • email.unsubscribed
  • sms.sent
  • sms.message_link_click
  • custom_attribute.set

Event types are case sensitive.

All events included will be sent to the URL.

Request
Security:
OAuthFlow (webhooks:write)
Request Body schema: application/json
url
string

The destination url of the webhook

events
Array of strings

The list of events this webhook is subscribed to

Responses
201

Webhook has been created

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

500

Internal Server Error

post/webhooks
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "MjU6Q29tcGFueUFwcGxpY2F0aW9uV2ViaG9vazIy",
  • "events": [
    ],
  • "type": "string",
  • "disabledAt": "string"
}

Delete webhook

Make an API call to this endpoint to remove a webhook.

Request
Security:
OAuthFlow (webhooks:write)
path Parameters
webhookId
required
string

id of the webhook to delete

Responses
204

Webhook has been deleted

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

500

Internal Server Error

delete/webhooks/{webhookId}
Request samples
curl -i -X DELETE \
  'https://api.attentivemobile.com/v1/webhooks/{webhookId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Update webhook

Make an API call to this endpoint to update a webhook

Request
Security:
OAuthFlow (webhooks:write)
path Parameters
webhookId
required
string

The id of the webhook to update

Request Body schema: application/json
url
string

The destination url of the webhook

events
Array of strings

The list of events this webhook is subscribed to

disabled
boolean

(optional) Disable the webhook endpoint if set to true.

Responses
200

Webhook has been updated

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

500

Internal Server Error

put/webhooks/{webhookId}
Request samples
application/json
{}
Response samples
application/json
{
  • "id": "MjU6Q29tcGFueUFwcGxpY2F0aW9uV2ViaG9vazIy",
  • "events": [
    ],
  • "type": "string",
  • "disabledAt": "string"
}