JavaScript client

Galleries

Create, list, retrieve, update, and publish galleries.

const created = await client.galleries.create({
  name: 'Summer collection',
  slug: 'summer-collection',
  layout: 'Masonry',
  visibility: 'private',
});

const gallery = await client.galleries.retrieve(created.id, {
  includeAssets: true,
});

const link = await client.galleries.link(created.id);

Available resource methods include create, list, retrieve, update, attachAssets, and link. The convenience method client.getGallery(id) maps a detailed response to the client-facing React shape.

Gallery IDs and slugs are accepted by resource methods where supported. Use IDs for stable automation and slugs for human-facing routes.