Subscriptions

Update a webhook subscription

Partially updates a webhook subscription owned by the authenticated account. Set disabled=true to stop deliveries without deleting it. The signing secret is never returned or rotated here.

patch/subscriptions/{id}

Request

  • Base URL
    https://api.textla.com/v1
  • Auth
    HTTP bearer

Path parameters

idstring required

Subscription id.

Example:sub_2c8f...b1

Request body

$schemastring uri

A URL to the JSON Schema for this object.

custom_headersobject

Replaces the whole custom-header map (at most 20; each name is non-empty and at most 256 bytes, each value at most 2048 bytes). Advisory: the delivery sink drops any that would shadow a reserved header or carry an unsafe value. Values are NOT secret — stored in plaintext and returned on read, so do not put credentials here.

disabledboolean

Disable (true) or re-enable (false) the subscription.

target_urlstring uri

Absolute https webhook destination.

typesstring[]

Replaces the whole wanted-type set.

Example request

{
  "$schema": "/v1/schemas/UpdateSubscriptionBody.json"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

account_idstring required

Account that owns the subscription.

actionstring required

What a matched event does: deliver a signed webhook, or send a notification to a user.

custom_headersobject nullable required

Additive request headers applied to each delivery. Advisory: the delivery sink drops any that would shadow a reserved header or carry an unsafe value. Values are NOT secret — stored in plaintext and returned on read, so do not put credentials here.

disabledboolean required

A disabled subscription matches nothing.

idstring required

Service-minted subscription id.

target_urlstring required

Absolute https webhook destination. Empty for a notification subscription.

typesstring[] nullable required

Event types this subscription wants.

Example response

{
  "$schema": "/v1/schemas/Subscription.json",
  "account_id": "Ab2c3d4f5g6",
  "id": "sub_2c8f...b1",
  "target_url": "https://example.com/hooks/sms",
  "types": [
    "campaign.sent"
  ]
}

Changes

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