Webhooks
Create a new webhook subscription
Create a signed webhook subscription.
POST
/
v1
/
webhook-subscriptions
Create a new webhook subscription
curl --request POST \
--url https://api.relayapp.im/v1/webhook-subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>",
"subscribed_events": []
}
'{
"id": "<string>",
"target_url": "<string>",
"signing_secret": "<string>",
"subscribed_events": [
"message.sent"
],
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Authorizations
Body
application/json
List of event types to subscribe to
Minimum array length:
1Available options:
message.sent, message.received, message.read, message.delivered, message.failed, reaction.added, reaction.removed, participant.added, participant.removed, chat.created, chat.group_name_updated, chat.group_icon_updated, chat.typing_indicator.started, chat.typing_indicator.stopped, contact.added, contact.removed, call.created, call.updated, call.ended, payment.succeeded, payment.canceled, payment.expired, location.sharing.started, location.sharing.stopped, rating.created, rating.updated, rating.deleted Response
Webhook subscription created successfully. The signing_secret is only returned in this response - store it securely.
Response returned when creating a webhook subscription. Includes the signing secret which is only shown once.
List of event types this subscription receives
Available options:
message.sent, message.received, message.read, message.delivered, message.failed, reaction.added, reaction.removed, participant.added, participant.removed, chat.created, chat.group_name_updated, chat.group_icon_updated, chat.typing_indicator.started, chat.typing_indicator.stopped, contact.added, contact.removed, call.created, call.updated, call.ended, payment.succeeded, payment.canceled, payment.expired, location.sharing.started, location.sharing.stopped, rating.created, rating.updated, rating.deleted ⌘I
Create a new webhook subscription
curl --request POST \
--url https://api.relayapp.im/v1/webhook-subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>",
"subscribed_events": []
}
'{
"id": "<string>",
"target_url": "<string>",
"signing_secret": "<string>",
"subscribed_events": [
"message.sent"
],
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}
