Skip to content
Get started

Webhook Endpoints

Create
client.teams.webhookEndpoints.create(stringteamID, WebhookEndpointCreateParams { enabledEvents, url, description } body, RequestOptionsoptions?): WebhookEndpointCreateResponse { webhookEndpoint }
POST/teams/{teamId}/webhook-endpoints
Delete
client.teams.webhookEndpoints.delete(stringwebhookEndpointID, WebhookEndpointDeleteParams { teamId } params, RequestOptionsoptions?): WebhookEndpointDeleteResponse
DELETE/teams/{teamId}/webhook-endpoints/{webhookEndpointId}
List
client.teams.webhookEndpoints.list(stringteamID, RequestOptionsoptions?): WebhookEndpointListResponse { webhookEndpoints }
GET/teams/{teamId}/webhook-endpoints
Update
client.teams.webhookEndpoints.update(stringwebhookEndpointID, WebhookEndpointUpdateParams { teamId, description, enabled, 2 more } params, RequestOptionsoptions?): WebhookEndpointUpdateResponse { webhookEndpoint }
PUT/teams/{teamId}/webhook-endpoints/{webhookEndpointId}
ModelsExpand Collapse
WebhookEndpointCreateResponse { webhookEndpoint }
webhookEndpoint: WebhookEndpoint { id, createdAt, enabled, 9 more }

The creation response, and the only one that carries the secret: it is generated once and never returned again, so a client that loses it has to recreate the endpoint.

id: string

The ID of the webhook endpoint

createdAt: string

The date and time the webhook endpoint was created

enabled: boolean

Whether the webhook is enabled

enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>

The events that trigger the webhook. [’*’] indicates that all events are enabled

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
nbFailedCalls: number

The number of calls to the webhook endpoint that have failed

nbTotalCalls: number

The number of calls to the webhook endpoint

ownerId: string

The ID of the owner of the webhook endpoint: a project id for job lifecycle events, a team id for alert events

ownerType: "project" | "team"

Whether the owner is a project or a team. Required to tell them apart: a project created before the team/project split shares its team’s id

One of the following:
"project"
"team"
secret: string

The endpoint’s secret, used to generate webhook signatures

updatedAt: string

The date and time the webhook endpoint was updated

url: string

The URL of the webhook endpoint

description?: string

A description of the webhook endpoint

WebhookEndpointDeleteResponse = unknown
WebhookEndpointListResponse { webhookEndpoints }
webhookEndpoints: Array<WebhookEndpoint>

A list of the team webhooks

id: string

The ID of the webhook endpoint

createdAt: string

The date and time the webhook endpoint was created

enabled: boolean

Whether the webhook is enabled

enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>

The events that trigger the webhook. [’*’] indicates that all events are enabled

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
nbFailedCalls: number

The number of calls to the webhook endpoint that have failed

nbTotalCalls: number

The number of calls to the webhook endpoint

ownerId: string

The ID of the owner of the webhook endpoint: a project id for job lifecycle events, a team id for alert events

ownerType: "project" | "team"

Whether the owner is a project or a team. Required to tell them apart: a project created before the team/project split shares its team’s id

One of the following:
"project"
"team"
updatedAt: string

The date and time the webhook endpoint was updated

url: string

The URL of the webhook endpoint

description?: string

A description of the webhook endpoint

WebhookEndpointUpdateResponse { webhookEndpoint }
webhookEndpoint: WebhookEndpoint { id, createdAt, enabled, 8 more }
id: string

The ID of the webhook endpoint

createdAt: string

The date and time the webhook endpoint was created

enabled: boolean

Whether the webhook is enabled

enabledEvents: Array<"*" | "asset.download.completed" | "asset.download.created" | 16 more>

The events that trigger the webhook. [’*’] indicates that all events are enabled

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
nbFailedCalls: number

The number of calls to the webhook endpoint that have failed

nbTotalCalls: number

The number of calls to the webhook endpoint

ownerId: string

The ID of the owner of the webhook endpoint: a project id for job lifecycle events, a team id for alert events

ownerType: "project" | "team"

Whether the owner is a project or a team. Required to tell them apart: a project created before the team/project split shares its team’s id

One of the following:
"project"
"team"
updatedAt: string

The date and time the webhook endpoint was updated

url: string

The URL of the webhook endpoint

description?: string

A description of the webhook endpoint

Webhook EndpointsEvents

List
client.teams.webhookEndpoints.events.list(stringwebhookEndpointID, EventListParams { teamId, paginationToken } params, RequestOptionsoptions?): EventListResponse { items, nextPaginationToken }
GET/teams/{teamId}/webhook-endpoints/{webhookEndpointId}/events
Retrieve
client.teams.webhookEndpoints.events.retrieve(stringeventID, EventRetrieveParams { teamId, webhookEndpointId } params, RequestOptionsoptions?): EventRetrieveResponse { webhookEvent }
GET/teams/{teamId}/webhook-endpoints/{webhookEndpointId}/events/{eventId}
ModelsExpand Collapse
EventListResponse { items, nextPaginationToken }
items: Array<Item>

A list of the team webhook events

id: string
endpointId: string
status: "created" | "failed" | "retrying" | "success"
One of the following:
"created"
"failed"
"retrying"
"success"
type: "*" | "asset.download.completed" | "asset.download.created" | 16 more

Every event a webhook endpoint can subscribe to: a project endpoint takes the job lifecycle events, a team endpoint takes the alert events.

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
updatedAt: string
nextPaginationToken?: string

A token to query the next page of events

EventRetrieveResponse { webhookEvent }
webhookEvent: WebhookEvent { id, attempts, createdAt, 6 more }
id: string
attempts: Array<Attempt>
responseStatusCode: number
sentAt: string
createdAt: string
endpointId: string
payload: unknown
sentAt: string
status: "created" | "failed" | "retrying" | "success"
One of the following:
"created"
"failed"
"retrying"
"success"
type: "*" | "asset.download.completed" | "asset.download.created" | 16 more

Every event a webhook endpoint can subscribe to: a project endpoint takes the job lifecycle events, a team endpoint takes the alert events.

One of the following:
"*"
"asset.download.completed"
"asset.download.created"
"asset.download.failed"
"generation.completed"
"generation.created"
"generation.failed"
"inference.cancelled"
"inference.completed"
"inference.created"
"inference.failed"
"model.download.completed"
"model.download.created"
"model.download.failed"
"model.training.cancelled"
"model.training.completed"
"model.training.failed"
"model.training.started"
"team.credit.threshold.crossed"
updatedAt: string