webhooks

Create organization webhook

Creates a new webhook subscription for the organization. After creation, Hubstaff will send a POST request to your target_url with an empty body and an X-Hook-Secret header.

Your endpoint must respond with HTTP 200 and echo the same X-Hook-Secret header to verify ownership.

Store the secret value - you'll need it to activate the webhook.

post/v2/organizations/{organization_id}/webhooks

Request

Path parameters

organization_idinteger required

Request body

eventsstring[] required

Array of event types to subscribe to. Use ["*"] for all events.

target_urlstring required

The URL that will receive webhook POST requests

Response

The created webhook

idstring required

Webhook ID (UUID)

eventsstring[] required

Subscribed event types, ["*"] for all

target_urlstring required

The URL that receives webhook POST requests

status'inactive' | 'pending' | 'active' | 'disabled' required

inactive: verification request not sent yet. pending: the endpoint did not echo X-Hook-Secret; call activate with the secret. active: events are delivered. disabled: verification or delivery failed; delete and recreate the webhook.

created_atstring required

Creation time in UTC, ISO 8601 without an offset

updated_atstring required

Last update time in UTC, ISO 8601 without an offset

Changes

No recorded changes to this operation across all 1 revision of this API.