Create collection
create_collectionCreate a new content collection. A new collection starts with the built-in Name and Slug fields; call update_collection_schema with this result's updatedAt to define the rest of the field schema (text/html/number/checkbox/date/image/icon/option/reference fields), keeping those two in the list. Entries feed listings and sections bound to the collection. hasPages=true (default false) also gives every published entry its own page, laid out by an entry-page template that starts EMPTY and can only be designed in the dashboard: until someone designs and publishes it there, published entry pages show no body. A retry makes a second collection: if the answer was lost, look for the slug with list_collections before trying again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Collection display name | |
| slug | Yes | Collection URL slug (used in entry-page paths if hasPages) | |
| hasPages | No | Give every entry its own page, laid out by an entry-page template that starts empty and is designed in the dashboard. Default false. | |
| projectId | Yes | The project ID |