Store a Webhook
Creates and stores a new webhook configuration. This endpoint allows you to register a new webhook that will receive event notifications at the specified URL when the subscribed events occur.
HTTP Method and URL
POST {{host}}/api/v2/webhooks
Authentication Requirements
Requires a valid user-token (Bearer token) in the request headers.
Request Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A descriptive name for the webhook |
url | string | Yes | The destination URL where webhook payloads will be sent |
events[0] | string | Yes | The event type to subscribe to (e.g., project.completed) |
Note: You can subscribe to multiple events by adding additional events[n] parameters (e.g., events[1], events[2]).
Example Request
POST {{host}}/api/v2/webhooks
Authorization: Bearer {USER-TOKEN}
Content-Type: multipart/form-data
name: {{webhook-name}}
url: {{webhook-url}}
events[0]: project.completed
Example Successful Response
{
"success": true,
"message": "Webhook created successfully.",
"data": {
"uuid": "abc123-def456-ghi789",
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["project.completed"],
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}
}
Error Responses
-
400 Bad Request: Invalid or missing required fields in the request body. -
401 Unauthorized: Missing or invalid authentication token. -
409 Conflict: A webhook with the same URL already exists. -
422 Unprocessable Entity: The webhook URL is invalid or unreachable. -
500 Internal Server Error: Unexpected server error.
Usage Notes
-
The
user-tokenvariable should be set in your environment or as a global variable. -
Ensure the webhook URL is publicly accessible and can receive POST requests.
-
Supported events include:
project.completed,project.signed,project.validated. -
The webhook will be created in an
activestatus by default.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
