Get started
Webhooks

organization.publishable_key

organization.publishable_key

Subscribe an endpoint to every event on this page with organization.publishable_key.*. Each is the envelope every webhook event shares, with the PublishableKeyEventObject object as its data.object.

Event typeWhat happened
organization.publishable_key.createdA publishable key was created.
organization.publishable_key.updatedA publishable key's name or scopes changed.
organization.publishable_key.revokedA publishable key was revoked.

The PublishableKeyEventObject object

A publishable key as a webhook event carries it: its identifiers, its name, its scopes and the last four characters of its value. The value itself is never carried: getOrganizationPublishableKey reads it.

object

string

required

One of: organization.publishable_key

The kind of object this is, always organization.publishable_key: the family of the event types that carry it, and what tells the members of WebhookEventObject apart.

id

string (uuid)

required

Identifier of the key.

organization_id

string (uuid)

required

Identifier of the organization the key belongs to.

name

string

required

The key's name.

scopes

array of string

required

The scopes the key carries once this change was made.

suffix

string

required

The last four characters of the key's value.

version

integer (int64)

required

The key's version once this change was made. It climbs with every change a read of the key shows, so of two events about one key the one carrying the higher version is the later state: events are not delivered in order.

created_at

string (date-time)

required

When the key was created.

revoked_at

string (date-time)

When the key was revoked. Present once it is.

organization.publishable_key.created

A publishable key was created.

Triggered by

Payload

type

string

required

One of: organization.publishable_key.created

Always organization.publishable_key.created.

data.object

PublishableKeyEventObject

required

The publishable key.

See the PublishableKeyEventObject object.

Every other field is the envelope every webhook event shares.

organization.publishable_key.updated

A publishable key's name or scopes were written.

Triggered by

  • organization.publishable_key.update: When the name or the scopes change. A request sending the values the key already holds writes nothing and records nothing.
    • PATCH /v1/organizations/{organization_id}/publishable-keys/{key_id}: patchOrganizationPublishableKey, mountaya.admin.keys.patchOrganizationPublishableKey() in TypeScript. Every change accepted.

Payload

type

string

required

One of: organization.publishable_key.updated

Always organization.publishable_key.updated.

data.object

PublishableKeyEventObject

required

The publishable key.

See the PublishableKeyEventObject object.

data.previous_attributes

object

The former value of each field of data.object the change moved, and of no other.

Every other field is the envelope every webhook event shares.

organization.publishable_key.revoked

A publishable key was revoked.

Triggered by

Payload

type

string

required

One of: organization.publishable_key.revoked

Always organization.publishable_key.revoked.

data.object

PublishableKeyEventObject

required

The publishable key.

See the PublishableKeyEventObject object.

Every other field is the envelope every webhook event shares.