Webhooks
Get all webhooks
Retrieve a list of all webhooks configured for the current project. Each webhook includes its URL, enabled status, and subscribed events.
Authorization
Authorization
header
string
required
Enter the project access token with the Bearer prefix, e.g. "Bearer project_access_token"
Responses
application/jsonData contains the webhook items
Whether the webhook is currently enabled
Array of event types this webhook subscribes to
Available options:
job.completedjob.failedjob.cancelledupload.completedupload.failedupload.expired
Examples:
[job.completed job.failed]
Unique identifier of the webhook
Examples:
wh_2G6MJiNz71bHQGNzGwKx5cJwPFS
ID of the project this webhook belongs to
Examples:
proj_2G6MJiNz71bHQGNzGwKx5cJwPFS
URL where webhook events will be sent
Examples:
https://example.com/webhook
status
"success"
string
required
Status indicates the response status "success"
Webhooks retrieved successfully
application/jsonError response details
Code is the HTTP status code
Message is a human-readable error description
Examples:
Authentication error: invalid token or subscription inactive
type
"AuthenticationError"
string
required
Type indicates the error category
Available options:
AuthenticationError
status
"error"
string
required
Status indicates the response status "error"
Authentication error: invalid token or subscription inactive
application/jsonError response details
Code is the HTTP status code
Message is a human-readable error description
Examples:
Rate limit exceeded
type
"TooManyRequestsError"
string
required
Type indicates the error category
Available options:
TooManyRequestsError
status
"error"
string
required
Status indicates the response status "error"
Rate limit exceeded
# Get all webhooks
> Retrieve a list of all webhooks configured for the current project. Each webhook includes its URL, enabled status, and subscribed events.
```json
{
"path": "/api/webhooks",
"method": "get",
"schema": {
"description": "Retrieve a list of all webhooks configured for the current project. Each webhook includes its URL, enabled status, and subscribed events.",
"operationId": "listWebhooks",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookListResponse"
}
}
},
"description": "Webhooks retrieved successfully"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorAuthentication"
}
}
},
"description": "Authentication error: invalid token or subscription inactive"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorTooManyRequests"
}
}
},
"description": "Rate limit exceeded"
}
},
"security": [
{
"ProjectAccessToken": []
}
],
"summary": "Get all webhooks",
"tags": [
"Webhooks"
],
"x-codeSamples": [
{
"lang": "JavaScript",
"source": "import Chunkify from '@chunkify/chunkify';\n\nconst client = new Chunkify({\n projectAccessToken: 'My Project Access Token',\n});\n\nconst webhooks = await client.webhooks.list();\n\nconsole.log(webhooks);"
},
{
"lang": "Python",
"source": "from chunkify import Chunkify\n\nclient = Chunkify(\n project_access_token=\"My Project Access Token\",\n)\nwebhooks = client.webhooks.list()\nprint(webhooks)"
},
{
"lang": "php",
"source": "\u003c?php\n\nuse Chunkify\\Client;\n\n$client = new Client(\n projectAccessToken: 'My Project Access Token',\n);\n\n$webhooks = $client-\u003ewebhooks-\u003elist();\n\nvar_dump($webhooks);"
},
{
"lang": "Go",
"source": "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/chunkifydev/chunkify-go\"\n \"github.com/chunkifydev/chunkify-go/option\"\n)\n\nfunc main() {\n client := chunkify.NewClient(\n option.WithProjectAccessToken(\"My Project Access Token\"),\n )\n webhooks, err := client.Webhooks.List(context.TODO())\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", webhooks)\n}\n"
}
]
}
}
```
```json #/components/schemas/WebhookListResponse
{
"description": "Response containing the list of all webhooks for a project",
"properties": {
"data": {
"description": "Data contains the webhook items",
"items": {
"$ref": "#/components/schemas/Webhook"
},
"type": "array"
},
"status": {
"const": "success",
"description": "Status indicates the response status \"success\"",
"type": "string"
}
},
"required": [
"data",
"status"
],
"type": "object"
}
```
```json #/components/schemas/Webhook
{
"properties": {
"enabled": {
"description": "Whether the webhook is currently enabled",
"examples": [
true
],
"type": "boolean"
},
"events": {
"description": "Array of event types this webhook subscribes to",
"examples": [
[
"job.completed",
"job.failed"
]
],
"items": {
"$ref": "#/components/schemas/WebhookEvent"
},
"type": "array"
},
"id": {
"description": "Unique identifier of the webhook",
"examples": [
"wh_2G6MJiNz71bHQGNzGwKx5cJwPFS"
],
"type": "string"
},
"project_id": {
"description": "ID of the project this webhook belongs to",
"examples": [
"proj_2G6MJiNz71bHQGNzGwKx5cJwPFS"
],
"type": "string"
},
"url": {
"description": "URL where webhook events will be sent",
"examples": [
"https://example.com/webhook"
],
"type": "string"
}
},
"required": [
"enabled",
"events",
"id",
"project_id",
"url"
],
"type": "object"
}
```
```json #/components/schemas/WebhookEvent
{
"enum": [
"job.completed",
"job.failed",
"job.cancelled",
"upload.completed",
"upload.failed",
"upload.expired"
],
"type": "string"
}
```
```json #/components/schemas/ResponseErrorAuthentication
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 401,
"description": "Code is the HTTP status code",
"examples": [
401
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Authentication error: invalid token or subscription inactive"
],
"type": "string"
},
"type": {
"const": "AuthenticationError",
"description": "Type indicates the error category",
"enum": [
"AuthenticationError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```
```json #/components/schemas/ResponseErrorTooManyRequests
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 429,
"description": "Code is the HTTP status code",
"examples": [
429
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Rate limit exceeded"
],
"type": "string"
},
"type": {
"const": "TooManyRequestsError",
"description": "Type indicates the error category",
"enum": [
"TooManyRequestsError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```