Skip to main content
POST
/
v1
/
webhook-subscriptions
Create a webhook subscription
curl --request POST \
  --url https://tally-platform-api-xwka6vu2kq-ue.a.run.app/v1/webhook-subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tenant_id": "<string>",
  "target_url": "<string>",
  "event_types": [
    "<string>"
  ]
}
'
{
  "webhook_subscription": {
    "subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "tenant_id": "<string>",
    "target_url": "<string>",
    "subscribed_event_types": [
      "<string>"
    ],
    "secret_last_rotated_at": "2023-11-07T05:31:56Z",
    "disabled_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "secret": "<string>"
}

Authorizations

Authorization
string
header
required

Firebase Auth JWT issued by Google Identity Platform. Obtain a token by signing in at your app domain and calling firebase.auth().currentUser.getIdToken().

Body

application/json
tenant_id
string
required
target_url
string<uri>
required

HTTPS endpoint to receive webhook deliveries.

event_types
string[]
required

Domain event types to subscribe to. Known event types: snapshot.created, update.proposed, update.applied, refresh_request.created, refresh_request.fulfilled.

Minimum array length: 1

Response

Subscription created. Secret returned once.

webhook_subscription
object
secret
string

Plaintext HMAC-SHA256 signing secret. Not stored by Tally — this is the only time it is returned. Use it to verify x-tally-signature on incoming webhook deliveries.