Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/directus/directus/llms.txt

Use this file to discover all available pages before exploring further.

Fields are the columns in your database tables. The Fields API allows you to create and manage fields.

List Fields

Retrieve all fields in a collection.
GET /fields/:collection
Example:
curl "https://your-directus-instance.com/fields/articles" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Field

Retrieve a single field.
GET /fields/:collection/:field

Create Field

Create a new field in a collection.
POST /fields/:collection
Request Body:
{
  "field": "excerpt",
  "type": "text",
  "meta": {
    "interface": "input-multiline",
    "note": "Short description"
  },
  "schema": {}
}

Update Field

Update field metadata.
PATCH /fields/:collection/:field

Delete Field

Delete a field from a collection.
DELETE /fields/:collection/:field
Deleting a field removes the database column and all its data permanently.

Field Types

  • String types: string, text, uuid
  • Number types: integer, bigInteger, float, decimal
  • Boolean: boolean
  • Date/Time: date, time, datetime, timestamp
  • JSON: json
  • Relational: alias (virtual fields)
  • Geometry: geometry (with PostGIS)

Next Steps

Collections

Manage collections

Items

Work with items