Webhooks
Update a webhook subscription
Replace a webhook subscription’s settings.
PUT
/
v1
/
webhook-subscriptions
/
{subscriptionId}
Update a webhook subscription
curl --request PUT \
--url https://api.staging.relayapp.im/v1/webhook-subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>",
"subscribed_events": [],
"is_active": true
}
'{
"id": "<string>",
"target_url": "<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>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Authorizations
Bearer token authentication. Include your API token in the Authorization header.
Format: Authorization: Bearer <your-token>
Path Parameters
Unique identifier of the webhook subscription
Body
application/json
New target URL for webhook events
Updated 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 Activate or deactivate the subscription
Response
Webhook subscription updated successfully
Unique identifier for the webhook subscription
URL where webhook events will be sent
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 Whether this subscription is currently active
When the subscription was created
When the subscription was last updated
⌘I
Update a webhook subscription
curl --request PUT \
--url https://api.staging.relayapp.im/v1/webhook-subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_url": "<string>",
"subscribed_events": [],
"is_active": true
}
'{
"id": "<string>",
"target_url": "<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>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}
