Get started
Webhooks

collection

collection

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

Event typeWhat happened
collection.createdA collection was created.
collection.updatedA collection's name, description or privacy changed.
collection.deletedA collection was deleted.

The CollectionEventObject object

A collection as a webhook event carries it: its identifiers, its name and description, whether it is private, and its version. getCollection reads the itineraries and zones it holds.

object

string

required

One of: collection

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

id

string (uuid)

required

Identifier of the collection.

organization_id

string (uuid)

required

Identifier of the organization the collection belongs to.

name

string

required

The collection's name.

description

string | null

required

The collection's description, null when it has none.

is_private

boolean

required

Whether the collection is private to the organization.

version

integer (int64)

required

The collection's version once this change was made. It climbs with every change a read of the collection shows, so of two events about one collection the one carrying the higher version is the later state: events are not delivered in order. A delete is the collection's last version change: collection.deleted carries the version one past the last the collection held, so an event about it that arrives after its delete is never the later state.

created_by

object

required

The user who created the collection.

created_at

string (date-time)

required

When the collection was created.

updated_at

string (date-time)

required

When the collection last changed.

collection.created

A collection was created.

Triggered by

Payload

type

string

required

One of: collection.created

Always collection.created.

data.object

CollectionEventObject

required

Every other field is the envelope every webhook event shares.

collection.updated

A collection's own fields were changed.

Triggered by

  • collection.update: When a field changes. A request sending the values the collection already holds writes nothing and records nothing.
    • PATCH /v1/collections/{collection_id}: patchCollection, mountaya.studio.collections.patchCollection() in TypeScript. Every change accepted.

Payload

type

string

required

One of: collection.updated

Always collection.updated.

data.object

CollectionEventObject

required
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.

collection.deleted

A collection was deleted. What it held and its share link go with it, and record no event of their own.

Triggered by

  • collection.delete: Always. The itineraries and zones it held are not changed, and leave it without an event of their own.
    • DELETE /v1/collections/{collection_id}: deleteCollection, mountaya.studio.collections.deleteCollection() in TypeScript. Every collection deleted.

Payload

type

string

required

One of: collection.deleted

Always collection.deleted.

data.object

CollectionEventObject

required

Every other field is the envelope every webhook event shares.