Data

Create a collection

A collection holds JSON documents: the entries of a contact form, sign-ups, reservations, or facts for the assistant. Free, including in test mode. access decides who may use it besides your API key: private (all false, the default); public_write for a form on your website (with the public token, a bot check and limits); public_read to show the newest documents on a page; assistant_read to give the assistant the newest documents added through the API. triggers: email_on_insert emails every new document to the project's billing email address (live only, at most 50 emails per collection per day; beyond that, the document is still stored and the webhook is still sent), webhook_on_insert sends document.created. schema is an optional JSON Schema that every document must match. At most 20 collections per project on Free, 50 on Online, 100 on Reachable, 200 on Business.

post/collections

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/collections
  • 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:write)

Request body

namestring required

The name of the collection, unique in the project: 2 to 40 characters, a lowercase letter first, then lowercase letters, digits and underscores (contact, signups, menu). A form posts to it by this name.

descriptionstring

What the collection is for, for your own overview.

schemaobject

Optional JSON Schema (a subset of draft 2020-12, at most 16 kB) that every document must match, with type "object" at the root. Supported: type, properties, required, additionalProperties, items, minItems, maxItems, enum, const, minLength, maxLength, pattern, format (email, uri, date, date-time, time), minimum, maximum, exclusiveMinimum, exclusiveMaximum, title and description.

Response

The new collection.

idstring uuid required

The id of the collection. Its name works in the path as well.

namestring required

The name, unique in the project. A form posts to it by this name.

descriptionstring nullable required

What the collection is for, or null.

schemaobject nullable required

The JSON Schema every document must match, or null.

personal_databoolean

true for a collection with personal data imported from WordPress (form entries, orders, customers, users, reviews). It always stays private.

document_countinteger required

How many documents the collection has now.

created_atstring date-time required

When the collection was created.

updated_atstring date-time required

When the collection last changed.

testboolean required

true for a collection of a test project.

Changes

No recorded changes to this operation across all 1 revision of this API.