Skip to main content
POST
Create a collection

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

1-63 chars: lowercase letters, digits, - and _, starting with a letter or digit.

Example:

"orders"

indexes
object[]

Up to 2 fields to index for query. This is the only way to declare them — a collection created implicitly by its first write has none, and querying an unindexed field returns 400 field_not_indexed. Indexes cannot be added later, so declare them here before the first write.

Maximum array length: 2
defaultTtlSeconds
integer
Required range: 60 <= x <= 63072000

Response

Collection created.

collection
object
required

A namespace of JSON documents addressed by key.