Docs
Dashboard
API reference / WebhooksBeta

Create a webhook endpoint

The response holds the endpoint's signing secret (whsec_…): the only time it is shown. Public HTTPS addresses only (400 webhook_url_not_allowed for http, private or reserved addresses, names that resolve to one, mail ports, or a user name or password in the URL). The plan limits how many endpoints a project has (402 plan_limit). 60 changes per minute per project.

POST/v1/webhooks

Request

Method and pathPOST/v1/webhooks
Base URLhttps://api.boxline.dev
AuthenticationYour API key in the x-api-key header (or Authorization: Bearer). The examples read it from BOXLINE_API_KEY.
Rate limitYes. See Rate limits for the numbers and headers.

Body

JSON with content-type: application/json. Required.

NameTypeDefaultAllowed valuesDescription
urlrequiredstring––Up to 2048 characters. Format: uri.
eventsrequiredstring[]––1 to 100 items.
descriptionstring––Up to 200 characters.
curl -X POST "https://api.boxline.dev/v1/webhooks" \  -H "x-api-key: $BOXLINE_API_KEY" \  -H "content-type: application/json" \  -d '{    "url": "https://example.com/webhooks/boxline",    "events": ["session.stopped", "agent_run.finished"]  }'

Responses

201 Created

The endpoint, with its signing secret (shown once).

Headers

  • RateLimit-Limit: Requests allowed in the current window of this route's limit. (Rate limits)
  • RateLimit-Remaining: Requests left in the current window. (Rate limits)
  • RateLimit-Reset: Seconds until the window starts again. (Rate limits)

Fields

NameTypeDefaultAllowed valuesDescription
idstring––
urlstring––Format: uri.
eventsstring[]––The types it gets, or ["*"] for all of them.
descriptionstring | null––
enabledboolean––
disabledReasonstring | null–user, gone, failing, account_recovered, nulluser: switched off with PATCH; gone: it answered 410; failing: 3 days of failed deliveries; account_recovered: a password reset recovered an account whose email was not confirmed. null while enabled.
disabledAtstring | null––Format: date-time.
failingSincestring | null––The first failed delivery since the last success. Format: date-time.
lastSuccessAtstring | null––Format: date-time.
lastFailureAtstring | null––Format: date-time.
secretRotatedAtstring | null––Format: date-time.
previousSecretExpiresAtstring | null––Until then deliveries are signed with the secret before the last rotation too. Format: date-time.
pausedUntilstring | null––Deliveries wait until then because the endpoint timed out 3 times in a row (test events still go). Format: date-time.
createdAtstring––Format: date-time.
updatedAtstring––Format: date-time.
secretstring––The signing secret, whsec_…. Shown only in this response.
Response 201
{  "id": "wh_Hk2Lq8Zx0Vb5Nm1C",  "url": "https://example.com/",  "events": [    "session.started"  ],  "description": "…",  "enabled": false,  "disabledReason": "user",  "disabledAt": "2026-09-29T10:00:00.000Z",  "failingSince": "2026-09-29T10:00:00.000Z",  "lastSuccessAt": "2026-09-29T10:00:00.000Z",  "lastFailureAt": "2026-09-29T10:00:00.000Z",  "secretRotatedAt": "2026-09-29T10:00:00.000Z",  "previousSecretExpiresAt": "2026-09-29T10:00:00.000Z",  "pausedUntil": "2026-09-29T10:00:00.000Z",  "createdAt": "2026-09-29T10:00:00.000Z",  "updatedAt": "2026-09-29T10:00:00.000Z",  "secret": "whsec_…"}

Errors

Errors have a matching HTTP status and the same body. code is stable, so check it in your code; message is for people. See Errors and request ids.

StatusCodesWhen
400 Bad Requestinvalid_request, invalid_json, invalid_cursor, invalid_idempotency_key, invalid_extension, variables_with_extensions, terms_not_accepted, invalid_reset_token, invalid_confirmation_code, wrong_password, no_password, invalid_next, invalid_oauth_tokenThe request is not valid.
401 UnauthorizedunauthorizedMissing or invalid API key.
402 Payment Requiredfeature_not_in_plan, spend_limit, out_of_credit, plan_limit, spend_limit, out_of_credit, organization, project, plan, creditThe plan does not include this, a monthly allowance or spending limit is used up, the organization has no credit left, or the plan allows no more of this. spend_limit and out_of_credit carry error.details.limit: organization, project, plan or credit.
429 Too Many Requestsrate_limited, concurrency_limitToo many requests, or the organization's concurrent sessions (its plan's) or the project's concurrencyCap are in use.
503 Service Unavailableno_capacity, proxy_unavailable, provider_unavailable, search_unavailable, webhooks_unavailable, mail_unavailable, browser_unreachableNo machine free in time, proxies not set up, the model provider is not configured or has no key, or web search is not set up or its provider is not answering, or webhook delivery is not set up, or an email cannot be sent, or the session's browser did not answer in time.
Error body
{  "error": {    "code": "not_found",    "message": "session not found",    "requestId": "req_4fJx0aQm2Lk9Pz7N"  }}

Learn more

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.