Docs
Contact

Manage your endpoints

Create, read and disable the addresses that take your deliveries, and keep each one's signing secret.

A webhook endpoint is one address of yours that takes deliveries. Your backend creates and reads its organization's endpoints with the API, with the scope webhooks:write. There is no read-only scope for endpoints: reading them takes webhooks:write too.

The routes

RouteDoes
POST /v1/webhook-endpointsCreates an endpoint, and answers its signing secret
GET /v1/webhook-endpointsLists your organization's endpoints
GET /v1/webhook-endpoints/{webhook_endpoint_id}Reads one
POST /v1/webhook-endpoints/{webhook_endpoint_id}/disableStops deliveries to it

The endpoints are your organization's: another organization's endpoint answers 404. Your sandbox has endpoints of its own.

Create an endpoint

curl https://api.youth-platform.io/v1/webhook-endpoints \  --header "Authorization: Bearer $YOUTH_ACCESS_TOKEN" \  --header "Content-Type: application/json" \  --header "Idempotency-Key: 6d1f2b0a-8f3c-4a77-9d1e-3b2f5c6a7d81" \  --data '{    "url": "https://partner.example.com/youth-webhook",    "event_types": ["AccessCode.redeemed", "Access.ended"],    "description": "Billing"  }'
FieldMeans
urlWhere deliveries go, at most 2,048 characters: see The address
event_typesThe events it receives, at least one and at most 20: see Events
descriptionA note of yours about it, such as the system it feeds, at most 200 characters. Optional

The answer is 201, with the endpoint, its signing secret, and its address in Location:

{  "id": "0193b1d2-6f10-7a3e-9c41-2b8e7d5f4a90",  "url": "https://partner.example.com/youth-webhook",  "description": "Billing",  "event_types": ["Access.ended", "AccessCode.redeemed"],  "status": "active",  "created_at": "2026-11-20T09:30:00.000Z",  "updated_at": "2026-11-20T09:30:00.000Z",  "signing_secret": "whsec_Zm9vYmFyYmF6cXV4LWV4YW1wbGUtc2VjcmV0LXZhbHVl"}
Refused withWhen
422 url_not_allowedThe address isn't https on port 443, carries a user or password, or names a host no delivery may go to: see The address
409 endpoint_limit_reachedYour organization keeps ten endpoints already, disabled ones aside: disable one first
422 unknown_event_typeAn event type isn't one YOU(th) sends
422 invalid_requestA field is missing, not valid, or not one the request takes
400 idempotency_key_requiredThe request has no Idempotency-Key
400 idempotency_key_invalidThe key is empty, or longer than 255 characters
409 idempotency_conflictThe Idempotency-Key was used for another body: use a new key
409 idempotency_in_progressA request with the key runs now: send it again after Retry-After
503 temporarily_unavailableThe secret can't be made now: send it again after Retry-After

Read and list endpoints

GET /v1/webhook-endpoints/{webhook_endpoint_id} answers one endpoint as above, without its signing_secret. GET /v1/webhook-endpoints answers your endpoints oldest first, a page at a time: limit sets the page's length, 50 unless you say, at most 100, and you pass a page's next as after for the next one. The last page's next is null. An after that isn't one of your endpoints is refused with 422 invalid_request.

{  "items": [    {      "id": "0193b1d2-6f10-7a3e-9c41-2b8e7d5f4a90",      "url": "https://partner.example.com/youth-webhook",      "description": "Billing",      "event_types": ["Access.ended", "AccessCode.redeemed"],      "status": "active",      "created_at": "2026-11-20T09:30:00.000Z",      "updated_at": "2026-11-20T09:30:00.000Z"    }  ],  "next": null}

Disable an endpoint

POST /v1/webhook-endpoints/{webhook_endpoint_id}/disable, with no body, stops an active or a paused endpoint and answers it, disabled. Every delivery it still had to receive fails at once: read what it missed from the API. A delivery already on its way when you disable it still arrives. A disabled endpoint can't be turned on again: create one for the address instead. Disabling it again answers it as it stands.

What an endpoint holds

  • Its address, where YOU(th) sends each delivery: see The address.
  • The events it receives, by event_type: see Events. An event type YOU(th) does not know is refused with 422.
  • Its status: active, paused or disabled.

An organization can have several endpoints, each with its own events and its own secret: one for your billing system and one for your data platform, for example. It keeps ten at most, disabled ones aside.

The signing secret

Creating an endpoint answers 201, with the endpoint and its signing secret, signing_secret: a string that starts with whsec_. Only the create shows it, and a repeat of the same create (see below). No read returns it, so store it in your server's secret store before you do anything else. Your receiver verifies each delivery with it.

The request that creates an endpoint must carry an Idempotency-Key, as Errors and rate limits describes, so a repeat after a timeout does not create a second one. A repeat with the same key and body, within 24 hours, answers the same endpoint as it now stands, with the same secret.

The address

RuleMeans
HTTPS, on port 443No plain HTTP, and no other port
A public addressA host that resolves to a private, loopback or link-local address gets no delivery
No redirectsA 3xx answer is a failure, and is not followed

YOU(th) resolves the host each time it sends, so the rules hold for every delivery, not only when the endpoint is created. Creating one already refuses a host that can't be public: localhost, a name of one label such as intranet, or an IP address that is private, loopback or link-local.

Status

statusMeans
activeDeliveries are sent
pausedYOU(th) stopped sending, because the address kept answering 404 or 410: see When an address is gone
disabledYou stopped it

A paused or disabled endpoint gets no new deliveries. Read what it missed from the API: access codes and checkups.

Move to a new address

Create an endpoint for the new address, give your new receiver its secret, check that deliveries arrive, then disable the old endpoint. While both are active, each event comes to both: your receivers skip an event_id they have already handled.

Last updated