v1

latestOpenAPI 3.0.12026-07-1714724311.1 KB
Collections

Create a Collection

Create a new collection in Directus.

post/collections

Query parameters

metastring

What metadata to return in the response.

Request body

collectionstring required

Unique name of the collection.

fieldsobject[] required

The fields contained in this collection. See the fields reference for more information. Each individual field requires field, type, and interface to be provided.

iconstring nullable

Name of a Google Material Design Icon that's assigned to this collection.

notestring nullable

A note describing the collection.

display_templatestring nullable

Text representation of how items from this collection are shown across the system.

hiddenboolean

Whether or not the collection is hidden from the navigation in the admin app.

singletonboolean

Whether or not the collection is treated as a single object.

translationstring nullable

Key value pairs of how to show this collection's name in different languages in the admin app.

versioningboolean

Whether or not Content Versioning is enabled for this collection.

archive_fieldstring nullable

What field holds the archive value.

archive_app_filterstring nullable

What value to use for "archived" items.

archive_valuestring nullable

What value to use to "unarchive" items.

unarchive_valuestring nullable

Whether or not to show the "archived" filter.

sort_fieldstring nullable

The sort field in the collection.

Example request

{
  "collection": "my_collection",
  "icon": "people"
}

Response

Successful request