Store a Webhook

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

ParameterTypeRequiredDescription
namestringYesA descriptive name for the webhook
urlstringYesThe destination URL where webhook payloads will be sent
events[0]stringYesThe 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-token variable 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 active status by default.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
string
integer

1 | 0

Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!