Skip to content
Get started

Webhook Endpoints

Create
teams.webhook_endpoints.create(strteam_id, WebhookEndpointCreateParams**kwargs) -> WebhookEndpointCreateResponse
POST/teams/{teamId}/webhook-endpoints
Delete
teams.webhook_endpoints.delete(strwebhook_endpoint_id, WebhookEndpointDeleteParams**kwargs) -> object
DELETE/teams/{teamId}/webhook-endpoints/{webhookEndpointId}
List
teams.webhook_endpoints.list(strteam_id) -> WebhookEndpointListResponse
GET/teams/{teamId}/webhook-endpoints
Update
teams.webhook_endpoints.update(strwebhook_endpoint_id, WebhookEndpointUpdateParams**kwargs) -> WebhookEndpointUpdateResponse
PUT/teams/{teamId}/webhook-endpoints/{webhookEndpointId}
ModelsExpand Collapse
class WebhookEndpointCreateResponse: …
webhook_endpoint: WebhookEndpoint

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: str

The ID of the webhook endpoint

created_at: str

The date and time the webhook endpoint was created

enabled: bool

Whether the webhook is enabled

enabled_events: List[Literal["*", "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"
nb_failed_calls: float

The number of calls to the webhook endpoint that have failed

nb_total_calls: float

The number of calls to the webhook endpoint

owner_id: str

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

owner_type: Literal["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: str

The endpoint’s secret, used to generate webhook signatures

updated_at: str

The date and time the webhook endpoint was updated

url: str

The URL of the webhook endpoint

description: Optional[str]

A description of the webhook endpoint

class WebhookEndpointListResponse: …
webhook_endpoints: List[WebhookEndpoint]

A list of the team webhooks

id: str

The ID of the webhook endpoint

created_at: str

The date and time the webhook endpoint was created

enabled: bool

Whether the webhook is enabled

enabled_events: List[Literal["*", "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"
nb_failed_calls: float

The number of calls to the webhook endpoint that have failed

nb_total_calls: float

The number of calls to the webhook endpoint

owner_id: str

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

owner_type: Literal["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"
updated_at: str

The date and time the webhook endpoint was updated

url: str

The URL of the webhook endpoint

description: Optional[str]

A description of the webhook endpoint

class WebhookEndpointUpdateResponse: …
webhook_endpoint: WebhookEndpoint
id: str

The ID of the webhook endpoint

created_at: str

The date and time the webhook endpoint was created

enabled: bool

Whether the webhook is enabled

enabled_events: List[Literal["*", "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"
nb_failed_calls: float

The number of calls to the webhook endpoint that have failed

nb_total_calls: float

The number of calls to the webhook endpoint

owner_id: str

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

owner_type: Literal["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"
updated_at: str

The date and time the webhook endpoint was updated

url: str

The URL of the webhook endpoint

description: Optional[str]

A description of the webhook endpoint

Webhook EndpointsEvents

List
teams.webhook_endpoints.events.list(strwebhook_endpoint_id, EventListParams**kwargs) -> EventListResponse
GET/teams/{teamId}/webhook-endpoints/{webhookEndpointId}/events
Retrieve
teams.webhook_endpoints.events.retrieve(strevent_id, EventRetrieveParams**kwargs) -> EventRetrieveResponse
GET/teams/{teamId}/webhook-endpoints/{webhookEndpointId}/events/{eventId}
ModelsExpand Collapse
class EventListResponse: …
items: List[Item]

A list of the team webhook events

id: str
endpoint_id: str
status: Literal["created", "failed", "retrying", "success"]
One of the following:
"created"
"failed"
"retrying"
"success"
type: Literal["*", "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"
updated_at: str
next_pagination_token: Optional[str]

A token to query the next page of events

class EventRetrieveResponse: …
webhook_event: WebhookEvent
id: str
attempts: List[WebhookEventAttempt]
response_status_code: float
sent_at: str
created_at: str
endpoint_id: str
payload: object
sent_at: str
status: Literal["created", "failed", "retrying", "success"]
One of the following:
"created"
"failed"
"retrying"
"success"
type: Literal["*", "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"
updated_at: str