---
title: "Get a collection"
method: GET
path: "/collections/{id}"
tags: ["Data"]
---

# Get a collection

`GET /collections/{id}`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/collections/{id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `data:read`)

One collection with its access, triggers, schema and document_count. The path takes the id or the name.

## Path parameters

- `id` string, required

## Response `200`

The collection.

- Collection: A collection of JSON documents: the data layer of a project.
  - `id` string, uuid, required: The id of the collection. Its name works in the path as well.
  - `name` string, required: The name, unique in the project. A form posts to it by this name.
  - `description` string, nullable, required: What the collection is for, or null.
  - `access` object, required: Who may use the collection besides your API key. All false is private.
    - `public_write` boolean, required: A form on an allowed origin may add documents, with the public token, a bot check and limits.
    - `public_read` boolean, required: A page on an allowed origin may read the newest documents (data and created_at) with the public token.
    - `assistant_read` boolean, required: The assistant gets the newest documents added through the API in its chat instructions.
  - `triggers` object, required
    - `email_on_insert` boolean, required: Every new document is emailed to the project's billing email address (live only).
    - `webhook_on_insert` boolean, required: Every new document sends the webhook document.created.
  - `email_routing` object, nullable, required: Where the email of email_on_insert goes. null: the billing email address.
    - `to` string[], required: Where the email goes when no rule matches. Empty: the billing email address.
    - `rules` object[], required: The first rule that matches decides where the email goes.
      - `field` string, required: A top-level field of the new document.
      - `equals` union, required: The value that field must have.
        - string
        - number
        - boolean
      - `to` string[], required: Where the email goes when this rule matches.
    - `recipients` object[], required: Every address in to and rules, with whether it may receive email.
      - `email` string, required: The address, in lowercase.
      - `status` 'confirmed' | 'pending', required: pending: it gets nothing until someone clicks the link in the confirmation email.
      - `confirmed_by` 'billing_email' | 'member' | 'domain' | 'link' | 'null', nullable, required: Why it is confirmed: the billing email, a project member, a domain connected to the project, or the link. null while pending.
      - `confirmation_sent_at` string, nullable, required: When the last confirmation email was sent (ISO 8601), or null.
  - `schema` object, nullable, required: The JSON Schema every document must match, or null.
  - `personal_data` boolean: true for a collection with personal data imported from WordPress (form entries, orders, customers, users, reviews). It always stays private.
  - `document_count` integer, required: How many documents the collection has now.
  - `created_at` string, date-time, required: When the collection was created.
  - `updated_at` string, date-time, required: When the collection last changed.
  - `test` boolean, required: true for a collection of a test project.

## Other responses

- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
