Endpoints
You can use the following Webhooks via the Figma API:
POST webhook
Create a new webhook which will call the specified endpoint when the event triggers. By default, this webhook will automatically send a PING
event to the endpoint when it is created. If this behavior is not desired, you can create the webhook and set the status to PAUSED
and reactivate it later.
This is a Tier 2 endpoint and requires the webhooks:write
scope.
HTTP Endpoint
POST /v2/webhooks
Return value
The WebhookV2 that was successfully posted
Body parameters | Description |
---|---|
event_type |
|
context |
|
context_id |
|
endpoint |
|
passcode |
|
status |
|
description |
|
Error codes | Description |
---|---|
400 | Required parameter missing or invalid |
403 | The developer / OAuth token is invalid or expired |
GET webhook by id
Returns the WebhookV2 corresponding to the ID provided, if it exists.
This is a Tier 2 endpoint and requires the webhooks:read
scope.
HTTP Endpoint
GET /v2/webhooks/:webhook_id
Return value
The WebhookV2 requested
Path parameters | Description |
---|---|
webhook_id |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | Webhook does not exist or you do not have permissions to access this webhook |
Get webhooks
Returns a list of webhooks corresponding to the context or plan provided, if they exist. For plan, the webhooks for all contexts that you have access to will be returned, and the response is paginated.
This is a Tier 2 endpoint and requires the webhooks:read
scope.
HTTP Endpoint
GET /v2/webhooks
Return value
{
"webhooks": WebhookV2[]
"pagination": {
"next_page": String (optional)
"prev_page": String (optional)
}
}
Query parameters | Description |
---|---|
context |
|
context_id |
|
plan_api_id |
|
cursor |
|
Error codes | Description |
---|---|
403 | The developer / OAuth token is invalid or expired |
404 | Webhook does not exist or you do not have permissions to access this webhook |
PUT webhook
Updates the webhook with the specified properties.
This is a Tier 2 endpoint and requires the webhooks:write
scope.
HTTP Endpoint
PUT /v2/webhooks/:webhook_id
Return value
The WebhookV2 that was successfully updated
Path parameters | Description |
---|---|
webhook_id |
|
Body parameters | Description |
---|---|
event_type |
|
endpoint |
|
passcode |
|
status |
|
description |
|
Error codes | Description |
---|---|
400 | Required parameter missing or invalid |
403 | The developer / OAuth token is invalid or expired |
404 | Webhook does not exist or you do not have permissions to access this webhook |
DELETE webhook
Deletes the specified webhook. This operation cannot be reversed.
This is a Tier 2 endpoint and requires the webhooks:write
scope.
HTTP Endpoint
DELETE /v2/webhooks/:webhook_id
Return value
The WebhookV2 that was successfully deleted
Path parameters | Description |
---|---|
webhook_id |
|
Error codes | Description |
---|---|
400 | Required parameter missing or invalid |
403 | The developer / OAuth token is invalid or expired |
404 | Webhook does not exist or you do not have permissions to access this webhook |
GET team webhooks
[DEPRECATED] Returns all webhooks registered under the specified team. This endpoing is being deprecated. Instead, use the GET /v2/webhooks endpoint with context set to team
and context_id
set to the team id you want to query for. For example, requests to GET v2/webhooks/:team_id/webhook
should be replaced with GET v2/webhooks?context=team&context_id=:team_id
.
This is a Tier 2 endpoint and requires the webhooks:read
scope.
HTTP Endpoint
GET /v2/teams/:team_id/webhooks
Return value
{
"webhooks": WebhookV2[]
}
Path parameters | Description |
---|---|
team_id |
|
GET webhook requests
Returns all webhook requests sent within the last week. Useful for debugging.
This is a Tier 2 endpoint and requires the webhooks:read
scope.
HTTP Endpoint
GET /v2/webhooks/:webhook_id/requests
Return value
{
"requests": WebhookV2Request[]
}
Path parameters | Description |
---|---|
webhook_id |
|