With the Event-API you can manage your webhooks. The ApiTree APIs use webhooks for event notification. Webhooks are HTTP callbacks that receive notification messages for events. They can be used to integrate ApiTree into systems like Slack. A webhook relates to an API or an organization. Each user can create a maximum of 30 webhooks.
To access the API endpoints you need an API token with the OAuth scope webhook
or webhook.readonly
. Find out how to create an API token.
Webhook operations
Name | Data Type | Description |
---|---|---|
id
|
string |
Unique webhook identifier (version 4 UUID) |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Name | Data Type | Description |
---|---|---|
id
|
string |
Unique webhook identifier (version 4 UUID) |
Name | Data Type | Description |
---|---|---|
Webhook
|
object |
lastDelivery
|
WebhookDelivery |
Information about the last delivery of the webhook |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
updatedAt
|
dateTime Read-only |
UTC timestamp the webhook was updated the last time - ISO 8601 |
||||||||||||||||||||||||||||||||
createdAt
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
||||||||||||||||||||||||||||||||
active
|
boolean Default value: true
|
If false, no events will be send to the webhook anymore. The webhook will be automatically disabled if the configured URL returns HTTP status code |
||||||||||||||||||||||||||||||||
custom
|
string |
Custom field to store additional information in JSON format |
||||||||||||||||||||||||||||||||
secret
|
string Read-only |
Secret token to verify that the webhooks are generated by ApiTree and not a third-party pretending to be us. |
||||||||||||||||||||||||||||||||
events
|
array [Event] |
List of events to subscribe to. Only API events are supported. |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
url
|
string Read-only Maximum: 1000 |
Payload URL with a maximum length of 1000 characters - RFC7230 - the webhooks are send as HTTP |
||||||||||||||||||||||||||||||||
apiId
|
string |
API ID (version 4 UUID - see Core-API) to create a webhook for a single API. In case of a private API the user must be allowed to access the API in order to receive the webhooks. |
||||||||||||||||||||||||||||||||
userId
|
string |
User identifier (see User-API) to create a webhook for a user / organization. If the |
||||||||||||||||||||||||||||||||
user
|
User Read-only |
|||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
id
|
string |
Unique webhook identifier (version 4 UUID) |
{
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"user": {
"id": "10123"
},
"userId": "10123",
"url": "https:\/\/hooks.slack.com\/services\/123456",
"events": [
{
"name": "api.created"
},
{
"name": "release.released"
},
{
"name": "release.deprecated"
}
],
"secret": "f0da7e08f20dffb9194d65d5b950cda8",
"active": true,
"createdAt": "2019-03-27T17:50:23Z",
"updatedAt": "2019-04-01T09:53:22Z",
"lastDelivery": {
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Name | Data Type | Description |
---|---|---|
id
|
string |
Unique webhook identifier (version 4 UUID) |
Name | Data Type | Description |
---|---|---|
Webhook
|
object |
lastDelivery
|
WebhookDelivery |
Information about the last delivery of the webhook |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
updatedAt
|
dateTime Read-only |
UTC timestamp the webhook was updated the last time - ISO 8601 |
||||||||||||||||||||||||||||||||
createdAt
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
||||||||||||||||||||||||||||||||
active
|
boolean Default value: true
|
If false, no events will be send to the webhook anymore. The webhook will be automatically disabled if the configured URL returns HTTP status code |
||||||||||||||||||||||||||||||||
custom
|
string |
Custom field to store additional information in JSON format |
||||||||||||||||||||||||||||||||
secret
|
string Read-only |
Secret token to verify that the webhooks are generated by ApiTree and not a third-party pretending to be us. |
||||||||||||||||||||||||||||||||
events
|
array [Event] |
List of events to subscribe to. Only API events are supported. |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
url
|
string Read-only Maximum: 1000 |
Payload URL with a maximum length of 1000 characters - RFC7230 - the webhooks are send as HTTP |
||||||||||||||||||||||||||||||||
apiId
|
string |
API ID (version 4 UUID - see Core-API) to create a webhook for a single API. In case of a private API the user must be allowed to access the API in order to receive the webhooks. |
||||||||||||||||||||||||||||||||
userId
|
string |
User identifier (see User-API) to create a webhook for a user / organization. If the |
||||||||||||||||||||||||||||||||
user
|
User Read-only |
|||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
id
|
string |
Unique webhook identifier (version 4 UUID) |
{
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"user": {
"id": "10123"
},
"userId": "10123",
"url": "https:\/\/hooks.slack.com\/services\/123456",
"events": [
{
"name": "api.created"
},
{
"name": "release.released"
},
{
"name": "release.deprecated"
}
],
"secret": "f0da7e08f20dffb9194d65d5b950cda8",
"active": true,
"createdAt": "2019-03-27T17:50:23Z",
"updatedAt": "2019-04-01T09:53:22Z",
"lastDelivery": {
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Gets all webhooks of the authenticated user
Name | Data Type | Description |
---|---|---|
apiId
|
string |
Filter by API identifier (see Core-API) |
userId
|
string |
Filter by user / organization identifier |
eventName
|
string |
Filter by event name |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
body
|
array [Webhook] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
Examples
|
Creates a webhook. A maximum of 30 webhooks can be created.
Name | Data Type | Description |
---|---|---|
Webhook
|
object |
lastDelivery
|
WebhookDelivery |
Information about the last delivery of the webhook |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
updatedAt
|
dateTime Read-only |
UTC timestamp the webhook was updated the last time - ISO 8601 |
||||||||||||||||||||||||||||||||
createdAt
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
||||||||||||||||||||||||||||||||
active
|
boolean Default value: true
|
If false, no events will be send to the webhook anymore. The webhook will be automatically disabled if the configured URL returns HTTP status code |
||||||||||||||||||||||||||||||||
custom
|
string |
Custom field to store additional information in JSON format |
||||||||||||||||||||||||||||||||
secret
|
string Read-only |
Secret token to verify that the webhooks are generated by ApiTree and not a third-party pretending to be us. |
||||||||||||||||||||||||||||||||
events
|
array [Event] |
List of events to subscribe to. Only API events are supported. |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
url
|
string Read-only Maximum: 1000 |
Payload URL with a maximum length of 1000 characters - RFC7230 - the webhooks are send as HTTP |
||||||||||||||||||||||||||||||||
apiId
|
string |
API ID (version 4 UUID - see Core-API) to create a webhook for a single API. In case of a private API the user must be allowed to access the API in order to receive the webhooks. |
||||||||||||||||||||||||||||||||
userId
|
string |
User identifier (see User-API) to create a webhook for a user / organization. If the |
||||||||||||||||||||||||||||||||
user
|
User Read-only |
|||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
id
|
string |
Unique webhook identifier (version 4 UUID) |
{
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"user": {
"id": "10123"
},
"userId": "10123",
"url": "https:\/\/hooks.slack.com\/services\/123456",
"events": [
{
"name": "api.created"
},
{
"name": "release.released"
},
{
"name": "release.deprecated"
}
],
"secret": "f0da7e08f20dffb9194d65d5b950cda8",
"active": true,
"createdAt": "2019-03-27T17:50:23Z",
"updatedAt": "2019-04-01T09:53:22Z",
"lastDelivery": {
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
}
Name | Data Type | Description |
---|---|---|
Webhook
|
object |
lastDelivery
|
WebhookDelivery |
Information about the last delivery of the webhook |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
updatedAt
|
dateTime Read-only |
UTC timestamp the webhook was updated the last time - ISO 8601 |
||||||||||||||||||||||||||||||||
createdAt
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
||||||||||||||||||||||||||||||||
active
|
boolean Default value: true
|
If false, no events will be send to the webhook anymore. The webhook will be automatically disabled if the configured URL returns HTTP status code |
||||||||||||||||||||||||||||||||
custom
|
string |
Custom field to store additional information in JSON format |
||||||||||||||||||||||||||||||||
secret
|
string Read-only |
Secret token to verify that the webhooks are generated by ApiTree and not a third-party pretending to be us. |
||||||||||||||||||||||||||||||||
events
|
array [Event] |
List of events to subscribe to. Only API events are supported. |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
url
|
string Read-only Maximum: 1000 |
Payload URL with a maximum length of 1000 characters - RFC7230 - the webhooks are send as HTTP |
||||||||||||||||||||||||||||||||
apiId
|
string |
API ID (version 4 UUID - see Core-API) to create a webhook for a single API. In case of a private API the user must be allowed to access the API in order to receive the webhooks. |
||||||||||||||||||||||||||||||||
userId
|
string |
User identifier (see User-API) to create a webhook for a user / organization. If the |
||||||||||||||||||||||||||||||||
user
|
User Read-only |
|||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
id
|
string |
Unique webhook identifier (version 4 UUID) |
{
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"user": {
"id": "10123"
},
"userId": "10123",
"url": "https:\/\/hooks.slack.com\/services\/123456",
"events": [
{
"name": "api.created"
},
{
"name": "release.released"
},
{
"name": "release.deprecated"
}
],
"secret": "f0da7e08f20dffb9194d65d5b950cda8",
"active": true,
"createdAt": "2019-03-27T17:50:23Z",
"updatedAt": "2019-04-01T09:53:22Z",
"lastDelivery": {
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Name | Data Type | Description |
---|---|---|
message
|
string |
Response message containing detailed information about the error |
code
|
integer |
{
"code": 401,
"message": "Access denied"
}
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
resource
|
object Read-only |
Resource object |
||||||||||
resourceType
|
string Read-only |
The object type of the resource |
||||||||||
user
|
User Read-only |
User who triggered the event |
||||||||||
Properties
Examples
|
||||||||||||
timestamp
|
dateTime Read-only |
Timestamp of the event - ISO 8601 |
||||||||||
name
|
string |
Name of the event. See |
{
"name": "webhook.created",
"timestamp": "2018-03-18T13:33:11+00:00",
"user": {
"id": "816253",
"nickname": "john-doe"
},
"resourceType": "Webhook",
"resource": {
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"url": "https:\/\/hooks.slack.com\/services\/1873521983\/127863123\/28713687126387126387",
"events": [
{
"name": "api.created"
},
{
"name": "plan.subscribed"
},
{
"name": "user.created"
}
],
"active": true,
"createdAt": "2019-09-27T17:50:23+00:00"
}
}
Name | Data Type | Description |
---|---|---|
nickname
|
string Read-only |
Nickname |
id
|
string Read-only |
Unique user ID |
{
"id": "100005",
"nickname": "john-doe"
}
Name | Data Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lastDelivery
|
WebhookDelivery |
Information about the last delivery of the webhook |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
updatedAt
|
dateTime Read-only |
UTC timestamp the webhook was updated the last time - ISO 8601 |
||||||||||||||||||||||||||||||||
createdAt
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
||||||||||||||||||||||||||||||||
active
|
boolean Default value: true
|
If false, no events will be send to the webhook anymore. The webhook will be automatically disabled if the configured URL returns HTTP status code |
||||||||||||||||||||||||||||||||
custom
|
string |
Custom field to store additional information in JSON format |
||||||||||||||||||||||||||||||||
secret
|
string Read-only |
Secret token to verify that the webhooks are generated by ApiTree and not a third-party pretending to be us. |
||||||||||||||||||||||||||||||||
events
|
array [Event] |
List of events to subscribe to. Only API events are supported. |
||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
url
|
string Read-only Maximum: 1000 |
Payload URL with a maximum length of 1000 characters - RFC7230 - the webhooks are send as HTTP |
||||||||||||||||||||||||||||||||
apiId
|
string |
API ID (version 4 UUID - see Core-API) to create a webhook for a single API. In case of a private API the user must be allowed to access the API in order to receive the webhooks. |
||||||||||||||||||||||||||||||||
userId
|
string |
User identifier (see User-API) to create a webhook for a user / organization. If the |
||||||||||||||||||||||||||||||||
user
|
User Read-only |
|||||||||||||||||||||||||||||||||
Properties
Examples
|
||||||||||||||||||||||||||||||||||
id
|
string |
Unique webhook identifier (version 4 UUID) |
{
"id": "d679ce92-572a-4dcd-b5a1-c72fc449b61e",
"user": {
"id": "10123"
},
"userId": "10123",
"url": "https:\/\/hooks.slack.com\/services\/123456",
"events": [
{
"name": "api.created"
},
{
"name": "release.released"
},
{
"name": "release.deprecated"
}
],
"secret": "f0da7e08f20dffb9194d65d5b950cda8",
"active": true,
"createdAt": "2019-03-27T17:50:23Z",
"updatedAt": "2019-04-01T09:53:22Z",
"lastDelivery": {
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
}
Name | Data Type | Description |
---|---|---|
timestamp
|
dateTime Read-only |
UTC timestamp the webhook was created - ISO 8601 |
response
|
string Read-only |
HTTP response header and body |
statusCode
|
long Read-only |
HTTP response status code |
success
|
boolean Read-only |
Returns |
{
"success": true,
"statusCode": 200,
"response": "OK",
"timestamp": "2019-04-17T11:25:37Z"
}
'OAuth' Authentication Scheme
Reference: RFC5849, Section 3.5.1
JWT token from the Auth-API
Flow:password
https://auth-api.apitree.com/oauth2/token
webhook
: View and manage webhookswebhook.readonly
: View webhooksName | ApiTree GmbH |
support@apitree.com |
API Version | 2.0.0 |