List endpoints
get
/v2/organizations/{slug}/webhooks/endpointsList all Webhook endpoints based on a project's ref or an organization's slug.
Path parameters
- slugRequiredstring
Organization slug
Query parameters
- page[offset]Optionalstring
Offset for offset-based pagination.
Offset should be dividable by
page[limit]without a reminder (offset % limit === 0), otherwise it will cause weird behavior when used on a frontend. - page[limit]Optionalstring
Up to how many records to return.
Response codes
- 200
- 401
- 403
- 408
- 429
- 500
Response (200)
{ "data": [ { "type": "endpoint", "id": "00000000-0000-0000-0000-000000000000", "attributes": { "id": "00000000-0000-0000-0000-000000000000", "url": "https://mydomain.com/path/to/handler", "enabled": true, "description": "lorem", "event_types": [ { "type": "v1.project.paused" } ], "custom_headers": { "Authorization": "Bearer example_token" }, "created_by": "00000000-0000-0000-0000-000000000000", "created_at": "4404-02-29T04:24Z" } } ], "links": { "first": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", "prev": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", "next": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20", "last": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30" }}{ "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "const": "endpoint", "description": "Resource type." }, "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "description": "Identifier of an endpoint (UUID v7)." }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "description": "Identifier of an endpoint (UUID v7)." }, "url": { "type": "string", "format": "uri", "description": "Publicly available URL where to send the events, must use a domain and be resolvable to a non-reserved IP address.", "example": "https://mydomain.com/path/to/handler" }, "enabled": { "type": "boolean", "description": "Whether the endpoint is enabled or not - disabled endpoints won't emit any events." }, "description": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "description": "Optional description for the endpoint." }, "event_types": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "v1.project.paused", "v1.project.created", "v1.project.restored", "v1.project.transferred", "v1.project.removed", "v1.project.restarted", "v1.project.status.changed", "v1.project.backup.started", "v1.project.branch.created", "v1.project.branch.updated", "v1.project.branch.removed", "v1.project.secrets.leaked", "v1.organization.member.invitation.created", "v1.organization.member.invitation.canceled", "v1.organization.member.added", "v1.organization.member.removed", "v1.organization.member.role.assigned", "v1.organization.member.role.removed", "v1.organization.member.role.updated", "v1.organization.billing.plan.upgraded", "v1.organization.billing.plan.downgraded", "v1.organization.secrets.leaked", "*" ], "description": "Webhook event type." } }, "required": [ "type" ] }, "description": "List of subscribed events for which to receive the webhook event.", "example": [ { "type": "v1.project.paused" } ] }, "custom_headers": { "description": "Additional request headers to pass when performing HTTP request location defined by `url`. Both keys and values must be strings and a valid HTTP headers.", "example": { "Authorization": "Bearer example_token" }, "type": "object", "propertyNames": { "type": "string", "pattern": "^[a-zA-Z0-9-]+$" }, "additionalProperties": { "type": "string" } }, "created_by": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "description": "ID of the user who created the endpoint." }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$", "description": "Timestamp of endpoint's creation." } }, "required": [ "id", "url", "enabled", "description", "event_types", "created_by", "created_at" ] } }, "required": [ "type", "id", "attributes" ] } }, "links": { "type": "object", "properties": { "first": { "description": "URL path to the first page if available.", "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "prev": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "URL path to the previous page.", "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=0" }, "next": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "URL path to the next page.", "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=20" }, "last": { "description": "URL path to the last page if available.", "example": "/v2/organization/slug/webhooks/endpoints?page[limit]=10&page[offset]=30", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "prev", "next" ] } }, "required": [ "data", "links" ]}