POST
/
webhooks
/
v1
/
webhook
/
Create Webhook
curl --request POST \
  --url https://api-staging.crazygoldfish.com/webhooks/v1/webhook/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "api_template": "488f4644-057d-41e7-9a74-72c040602647",
  "endpoint_url": "https://example.com/webhook/assignment-processing",
  "secret_hash": "my-secret-key-123"
}'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "api_template": "488f4644-057d-41e7-9a74-72c040602647",
  "endpoint_url": "https://example.com/webhook/assignment-processing",
  "status": "enabled",
  "created_at": "2024-01-15T10:30:00Z",
  "created_by": "user123"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
api_template
string<uuid>
required

UUID of the webhook template to use for processing

Example:

"488f4644-057d-41e7-9a74-72c040602647"

endpoint_url
string<uri>
required

The URL where webhook notifications will be sent

Example:

"https://example.com/webhook/assignment-processing"

secret_hash
string

Optional secret key for webhook authentication (will be encrypted)

Example:

"my-secret-key-123"

Response

Webhook created successfully.

id
string<uuid>
required

Unique identifier of the webhook

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

api_template
string<uuid>
required

UUID of the webhook template used

Example:

"488f4644-057d-41e7-9a74-72c040602647"

endpoint_url
string<uri>
required

The URL where webhook notifications are sent

Example:

"https://example.com/webhook/assignment-processing"

status
enum<string>
required

Current status of the webhook

Available options:
enabled,
disabled
Example:

"enabled"

created_at
string<date-time>
required

Timestamp when the webhook was created

Example:

"2024-01-15T10:30:00Z"

created_by
string
required

ID of the user who created the webhook

Example:

"user123"