HubstaffDeveloper Portal

Webhooks

Subscribe to real-time event notifications via HTTP callbacks

Create organization webhook

POST/v2/organizations/{organization_id}/webhooks

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.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)

Request body

object

Create organization webhook

  • eventsarray required

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

    array<string>

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

    items
    string
  • target_urlstring required

    The URL that will receive webhook POST requests

Responses

201Create organization webhook

Create project webhook

POST/v2/projects/{project_id}/webhooks

Creates a new webhook subscription for the project. 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.

Parameters

NameInTypeDescription
project_idrequired
pathinteger (int32)

Request body

object

Create project webhook

  • eventsarray required

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

    array<string>

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

    items
    string
  • target_urlstring required

    The URL that will receive webhook POST requests

Responses

201Create project webhook

Create me webhook

POST/v2/users/me/webhooks

Creates a new webhook subscription for the me. 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.

Request body

object

Create me webhook

  • eventsarray required

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

    array<string>

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

    items
    string
  • target_urlstring required

    The URL that will receive webhook POST requests

Responses

201Create me webhook

Get webhook

GET/v2/webhooks/{webhook_id}

Returns the details of a specific webhook including its status, events, and target URL.

Parameters

NameInTypeDescription
webhook_idrequired
pathstring
Webhook ID

Responses

200Get webhook

Delete webhook

DELETE/v2/webhooks/{webhook_id}

Permanently deletes a webhook. The webhook will stop receiving events immediately.

Parameters

NameInTypeDescription
webhook_idrequired
pathstring
Webhook ID

Responses

204Delete webhook

Activate webhook

POST/v2/webhooks/{webhook_id}/activate

Activates a webhook after endpoint verification.

You must include the X-Hook-Secret header with the secret value you received during the verification step.

Once activated, the webhook will start receiving events.

Parameters

NameInTypeDescription
webhook_idrequired
pathstring
Webhook ID

Responses

201Activate webhook