createCollection
Creates a new Payload CMS collection by providing configuration for fields, endpoints, joins, and other settings, automating setup from TypeScript definitions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | Yes | ||
| endpoints | No | One of the allowed types | |
| fields | Yes | Array of field configurations | |
| flattenedFields | Yes | Fields in the database schema structure Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded | |
| joins | Yes | Object of collections to join 'Join Fields object keyed by collection | |
| polymorphicJoins | Yes | List of all polymorphic join fields | |
| sanitizedIndexes | Yes | ||
| slug | Yes | ||
| upload | Yes | Payload.SanitizedUploadConfig configuration object | |
| versions | Yes |