ManagementExperimental
Create a webhook endpoint
Registers an endpoint Firsty delivers the chosen event types to. The response is the only time the signing secret is returned. A client can have up to 5 endpoints, active or not.
/management/webhooksAuthorization
Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works
Request body
application/json · required
urlstring · urirequiredDestination Firsty posts events to.
eventTypesarray of stringrequiredValues from GET /catalog/webhook-event-types.
descriptionstringFree-text label for the endpoint.
Responses
201The created endpoint, with its signing secretapplication/jsonShow response bodyHide response body
dataobjectShow propertiesHide properties
webhookEndpointReferencestringIdentifies the endpoint in GET /management/webhooks/{webhookEndpointReference}/deliveries.
urlstring · uriDestination Firsty posts events to.
eventTypesarray of stringEvent types delivered to this endpoint. Values this client subscribed to before an event type was retired are returned as stored, so an entry may be absent from GET /catalog/webhook-event-types.
descriptionstring | nullFree-text label for the endpoint.
activebooleanWhether events are delivered to this endpoint.
createdAtstring · date-timeupdatedAtstring · date-timesigningSecretstringKey that signs every delivery to this endpoint: whsec_ followed by base64. The HMAC key is the base64-decoded bytes after the prefix. Returned only by create and rotate-secret.
409The client already has 5 webhook endpointsapplication/problem+jsonShow response bodyHide response body
typestring · uriURI reference to error documentation
titlestringShort, consistent error summary
statusintegerHTTP status code
detailstringHuman-readable explanation specific to this occurrence
codestringExtensible enum. Machine-readable error slug. This is the field clients should branch on. The URI in type documents the code. Handle an unknown code by its HTTP status.
bad_requestvalidation_failedunauthorizedpayment_requiredfeature_not_enabledforbiddenbalance_not_foundesim_not_foundnot_foundnumber_registration_not_foundport_in_not_foundprofile_not_foundscheduled_action_not_foundsubscription_not_foundsubscription_plan_not_foundwebhook_endpoint_not_foundbalance_not_availablebalance_update_pendingconcurrent_modificationconflictesim_change_pendingesim_not_activeesim_not_provisionedesim_suspendedesim_swap_cooldownesim_swap_pendingesim_terminatedinvalid_state_transitionlimit_reachedno_esim_availablenumber_registration_pendingport_in_pendingservices_change_pendingservices_not_availablebalance_not_supportedbalance_operation_not_supportedbalance_update_refusedclient_transaction_id_reusedesim_variant_not_allowedesim_variant_not_swappableidempotency_key_reusedinsufficient_balancenumber_not_availablenumber_registration_not_supportedport_in_cancel_refusedporting_not_supportedservices_change_refusedservices_not_changeableservices_not_supportedsim_refused_by_networkunprocessable_entitylockedrate_limit_exceededinternal_errorbad_gatewayservice_unavailable400Bad request - invalid parameters401Unauthorized - missing or invalid API key429Rate limit exceeded. A `429` can also arrive without these headers or this body; handle it by its status code.500Internal server error