Subscriptions
GET/v1/webhooks/subscriptionsGET /v1/webhooks/subscriptions
Code samples
cURL
# You can also use wget
curl -X GET /v1/webhooks/subscriptions \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
GET /v1/webhooks/subscriptions
Gets all webhook subscriptions.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| select | query | string | false | none |
| filter | query | string | false | none |
| sort | query | string | false | none |
| include | query | string | false | none |
| take | query | integer(int32) | false | none |
| skip | query | integer(int32) | false | none |
Example responses
200 Response
{"subscriptions":[{"id":0,"name":"string","eventType":"string","url":"string","secret":"string","maxRetryCount":0,"isActive":true,"userId":"string","headers":"string","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z","webhookEvents":[{"id":0,"webhookSubscriptionId":0,"eventType":"string","payload":"string","statusCode":0,"response":"string","errorMessage":"string","isSuccess":true,"retryCount":0,"sentAt":"2019-08-24T14:15:22Z","nextRetryAt":"2019-08-24T14:15:22Z","createdAt":"2019-08-24T14:15:22Z"}]}],"totalSubscriptionsCount":0,"success":true,"message":"string"}{
"subscriptions": [
{
"id": 0,
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"maxRetryCount": 0,
"isActive": true,
"userId": "string",
"headers": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"webhookEvents": [
{
"id": 0,
"webhookSubscriptionId": 0,
"eventType": "string",
"payload": "string",
"statusCode": 0,
"response": "string",
"errorMessage": "string",
"isSuccess": true,
"retryCount": 0,
"sentAt": "2019-08-24T14:15:22Z",
"nextRetryAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}
]
}
],
"totalSubscriptionsCount": 0,
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.GetWebhookSubscriptionsResponse |
Authentication: API key (x-api-key).
POST/v1/webhooks/subscriptionsPOST /v1/webhooks/subscriptions
Code samples
cURL
# You can also use wget
curl -X POST /v1/webhooks/subscriptions \
-H 'Content-Type: application/json-patch+json' \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
POST /v1/webhooks/subscriptions
Creates a new webhook subscription.
Body parameter
{
"subscription": {
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"maxRetryCount": 0,
"isActive": true
}
}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | Management.CreateWebhookSubscriptionRequest | false | The subscription details. |
Example responses
200 Response
{"subscription":{"id":0,"name":"string","eventType":"string","url":"string","secret":"string","maxRetryCount":0,"isActive":true,"userId":"string","headers":"string","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z","webhookEvents":[{"id":0,"webhookSubscriptionId":0,"eventType":"string","payload":"string","statusCode":0,"response":"string","errorMessage":"string","isSuccess":true,"retryCount":0,"sentAt":"2019-08-24T14:15:22Z","nextRetryAt":"2019-08-24T14:15:22Z","createdAt":"2019-08-24T14:15:22Z"}]},"success":true,"message":"string"}{
"subscription": {
"id": 0,
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"maxRetryCount": 0,
"isActive": true,
"userId": "string",
"headers": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"webhookEvents": [
{
"id": 0,
"webhookSubscriptionId": 0,
"eventType": "string",
"payload": "string",
"statusCode": 0,
"response": "string",
"errorMessage": "string",
"isSuccess": true,
"retryCount": 0,
"sentAt": "2019-08-24T14:15:22Z",
"nextRetryAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}
]
},
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.CreateWebhookSubscriptionResponse |
Authentication: API key (x-api-key).
GET/v1/webhooks/subscriptions/{id}GET /v1/webhooks/subscriptions/{id}
Code samples
cURL
# You can also use wget
curl -X GET /v1/webhooks/subscriptions/{id} \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
GET /v1/webhooks/subscriptions/\{id\}
Gets a webhook subscription by ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer(int32) | true | The subscription ID. |
Example responses
200 Response
{"subscription":{"id":0,"name":"string","eventType":"string","url":"string","secret":"string","maxRetryCount":0,"isActive":true,"userId":"string","headers":"string","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z","webhookEvents":[{"id":0,"webhookSubscriptionId":0,"eventType":"string","payload":"string","statusCode":0,"response":"string","errorMessage":"string","isSuccess":true,"retryCount":0,"sentAt":"2019-08-24T14:15:22Z","nextRetryAt":"2019-08-24T14:15:22Z","createdAt":"2019-08-24T14:15:22Z"}]},"success":true,"message":"string"}{
"subscription": {
"id": 0,
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"maxRetryCount": 0,
"isActive": true,
"userId": "string",
"headers": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"webhookEvents": [
{
"id": 0,
"webhookSubscriptionId": 0,
"eventType": "string",
"payload": "string",
"statusCode": 0,
"response": "string",
"errorMessage": "string",
"isSuccess": true,
"retryCount": 0,
"sentAt": "2019-08-24T14:15:22Z",
"nextRetryAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}
]
},
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.GetWebhookSubscriptionResponse |
Authentication: API key (x-api-key).
PUT/v1/webhooks/subscriptions/{id}PUT /v1/webhooks/subscriptions/{id}
Code samples
cURL
# You can also use wget
curl -X PUT /v1/webhooks/subscriptions/{id} \
-H 'Content-Type: application/json-patch+json' \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
PUT /v1/webhooks/subscriptions/\{id\}
Updates an existing webhook subscription.
Body parameter
{
"subscription": {
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"maxRetryCount": 0,
"isActive": true
}
}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer(int32) | true | The subscription ID. |
| body | body | Management.UpdateWebhookSubscriptionRequest | false | The updated subscription details. |
Example responses
200 Response
{"subscription":{"id":0,"name":"string","eventType":"string","url":"string","secret":"string","maxRetryCount":0,"isActive":true,"userId":"string","headers":"string","createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z","webhookEvents":[{"id":0,"webhookSubscriptionId":0,"eventType":"string","payload":"string","statusCode":0,"response":"string","errorMessage":"string","isSuccess":true,"retryCount":0,"sentAt":"2019-08-24T14:15:22Z","nextRetryAt":"2019-08-24T14:15:22Z","createdAt":"2019-08-24T14:15:22Z"}]},"success":true,"message":"string"}{
"subscription": {
"id": 0,
"name": "string",
"eventType": "string",
"url": "string",
"secret": "string",
"maxRetryCount": 0,
"isActive": true,
"userId": "string",
"headers": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"webhookEvents": [
{
"id": 0,
"webhookSubscriptionId": 0,
"eventType": "string",
"payload": "string",
"statusCode": 0,
"response": "string",
"errorMessage": "string",
"isSuccess": true,
"retryCount": 0,
"sentAt": "2019-08-24T14:15:22Z",
"nextRetryAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}
]
},
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.UpdateWebhookSubscriptionResponse |
Authentication: API key (x-api-key).
DELETE/v1/webhooks/subscriptions/{id}DELETE /v1/webhooks/subscriptions/{id}
Code samples
cURL
# You can also use wget
curl -X DELETE /v1/webhooks/subscriptions/{id} \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
DELETE /v1/webhooks/subscriptions/\{id\}
Deletes a webhook subscription.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer(int32) | true | The subscription ID. |
Example responses
200 Response
{"success":true,"message":"string"}{
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.DeleteWebhookSubscriptionResponse |
Authentication: API key (x-api-key).
POST/v1/webhooks/subscriptions/{id}/testPOST /v1/webhooks/subscriptions/{id}/test
Code samples
cURL
# You can also use wget
curl -X POST /v1/webhooks/subscriptions/{id}/test \
-H 'Content-Type: application/json-patch+json' \
-H 'Accept: text/plain' \
-H 'x-api-key: API_KEY'
POST /v1/webhooks/subscriptions/\{id\}/test
Sends a test event for a specific webhook subscription.
Body parameter
{
"payload": null
}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | integer(int32) | true | The subscription ID. |
| body | body | Management.SendWebhookTestEventRequest | false | The request containing a custom payload to send (optional). |
Example responses
200 Response
{"success":true,"message":"string","eventId":0}{
"success": true,
"message": "string",
"eventId": 0
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Management.SendWebhookTestEventResponse |
Authentication: API key (x-api-key).