v1

latestOpenAPI 3.1.02026-07-13305453.8 KB
Fields

Update field

Update a custom field definition by ID or key. Type and options cannot be changed after values have been saved.

patch/v1/fields/{identifier}

Path parameters

identifierstring required

Field ID or key

Example:audience

Field ID or key

Request body

keystring
namestring
descriptionstring nullable
type'text' | 'number' | 'boolean' | 'date' | 'richtext' | 'select' | 'multiselect'
requiredboolean

Example request

{
  "key": "audience",
  "name": "Audience",
  "description": "Who this post is for",
  "options": [
    {
      "value": "developers",
      "label": "Developers"
    },
    {
      "value": "founders",
      "label": "Founders"
    }
  ]
}

Response

Field updated successfully

Example response

{
  "field": {
    "id": "cryitfjp7890yz12abcdefg",
    "key": "audience",
    "name": "Audience",
    "description": "Who this post is for",
    "options": [
      {
        "id": "cryitfjp9012ab34cdefghij",
        "value": "developers",
        "label": "Developers",
        "createdAt": "2024-01-15T10:00:00Z",
        "updatedAt": "2024-01-16T12:00:00Z"
      }
    ],
    "createdAt": "2024-01-15T10:00:00Z",
    "updatedAt": "2024-01-16T12:00:00Z"
  }
}