Create Collection

Create a Collection for a site with collection fields.

Each collection includes the required name and slug fields, which are generated automatically. You can update the displayName of these fields, but the slug for them cannot be changed. Fields slugs are automatically converted to lowercase. Spaces in slugs are replaced with hyphens.

Required scope | cms:write

Authentication

AuthorizationBearer

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

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Request

Pass the Name of the collection, as well as the singular name of each item in the collection.
displayNamestringRequired
Name of the collection. Each collection name must be distinct.
singularNamestringRequired
Singular name of each item.
slugstringOptional
Part of a URL that identifier
fieldslist of objectsOptional
An array of custom fields to add to the collection

Response

Request was successful
idstringformat: "objectid"
Unique identifier for a Collection
displayNamestring
Name given to the Collection
singularNamestring

The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”)

fieldslist of objects
The list of fields in the Collection
slugstring
Slug of Collection in Site URL structure
createdOnstringRead-onlyformat: "date-time"
The date the collection was created
lastUpdatedstringRead-onlyformat: "date-time"
The date the collection was last updated

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error