Webhooks

Webhooks overview

Webhooks are a way to connect and communicate between applications.

Object types

Webhook

Represents details of a webhook.

type Webhook {
	projectId: ID!
	webhookId: ID!
	event: WebhookEvent!
	url: URL!
	labels: [NonEmptyString]
	createdAt: DateTime!
	updatedAt: DateTime!
}

Webhook fields

Field nameValue typeNon-nullDescription
projectId
ID
true
A globally-unique identifier.
webhookId
ID
true
A globally-unique identifier.
event
WebhookEvent
true
url
URL
true
labels
[NonEmptyString]
false
createdAt
DateTime
true
The date and time when a webhook was created.
updatedAt
DateTime
true
The date and time when a webhook was updated.

Enums

WebhookEvent

enum WebhookEvent {
	BOOKING_CREATE
	BOOKING_UPDATE
}

WebhookEvent valid values

Valid valueDescription
BOOKING_CREATE
Lorem ipsum
BOOKING_UPDATE
Lorem ipsum

Queries

webhooks

Returns a list of webhooks.

webhooks(
	projectId: ID!
	limit: NonNegativeInt
	cursor: ID
): [Webhook]

webhooks arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
limit
NonNegativeInt
false
cursor
ID
false
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN

webhook

Returns an Webhook resource by project & webhook ID.

webhook(
	projectId: ID!
	webhookId: ID!
): Webhook

webhook arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
webhookId
ID
true
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN

Mutations

webhookCreate

Creates a webhook.

webhookCreate(
	projectId: ID!
	event: WebhookEvent!
	url: URL!
	labels: [NonEmptyString]
): Webhook

webhookCreate arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
event
WebhookEvent
true
url
URL
true
labels
[NonEmptyString]
false
A list of webhook labels.
🔑
Minimal role required: ADMIN / APIADMIN

webhookDelete

Removes a webhook.

webhookDelete(
	projectId: ID!
	webhookId: ID!
): String

webhookDelete arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
webhookId
ID
true
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN