# Field keys and custom fields

## Field keys

Every field of a task has a **key**: a stable name the API uses in answers, in requests and in `fields=` and `sort=`.

- projqo's own fields have plain keys: `summary`, `description`, `status`, `assignee`, `due`, and so on.
- Custom fields are `cf_` followed by the field's key: `cf_customer_tier`.

A key never changes when someone renames the field in projqo, so your code keeps working when a label changes.

A custom field's key is made from its name once, when the field is made, and is never changed afterwards:

- the name in lower case, with every run of other characters than `a`-`z` and `0`-`9` turned into one `_`, and at most 40 characters: "Customer tier" is `customer_tier`;
- `f_` in front when it would start with a digit ("2nd reviewer" is `f_2nd_reviewer`), and `field` when nothing is left (a name written only in another script);
- `_2`, `_3` and so on when the organisation already has a field with that key (a second "Customer tier" made for another project is `customer_tier_2`).

Organisation admins can't set or change a key. The fields calls always tell you a field's key, so read it from there rather than working it out.

## Finding the keys

The fields calls (Metadata in the reference) list the fields, system and custom, each with its key, name and type:

- `GET /orgs/{org}/fields`: every field of the organisation you can see.
- `GET /orgs/{org}/projects/{project}/fields`: the fields a project's tasks have, and for each task type whether the field is required and on the create screen. A project with its own field scheme (or a Team project's own fields) answers its own.
- `GET /orgs/{org}/projects/{project}/task-types/{type}/fields`: the fields of one task type in the project, with the options of a list field in that project and type, and the default a new task gets.

`writable` says whether a create or an update sets the field by its key. Status, type and resolution change through their own calls (a transition, `POST /tasks/{task}/type`); worked-out fields are never written.

## Custom fields in a request

Use the field's key like any other field:

```json
{
  "summary": "Renew the support contract",
  "cf_customer_tier": "3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f"
}
```

A list field (a dropdown, radio buttons, checkboxes) takes an option's id: take it from the type's fields call. Leave a required field out and its default fills it when it has one, as the create dialog does; send it empty and the call is refused with `field_required`, naming the key.

In the [query language](/guides/query-language/), a custom field is named by its name, in quotes when it has spaces, and a list field's value by the option's words: `"Customer tier" = Gold`.

## Custom field types

These are the types an organisation can make fields of, with the JSON value each one takes and gives back. A field's type is in its answer from the fields calls.

| Type | `type` | JSON value | Limit | Example |
|---|---|---|---|---|
| Short text | `short_text` | A string on one line. | 255 characters | `"Gold customer"` |
| Paragraph (rich text) | `paragraph` | projqo's document JSON ({ "type": "doc", "content": [ … ] }), the editor's format (the Document schema in the reference). | 256,000 characters of JSON | `{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Signed off by legal."}]}]}` |
| Paragraph (plain text) | `paragraph_plain` | A string; line breaks allowed. | 32,000 characters | `"Call before 10:00.\nAsk for the site manager."` |
| Date | `date` | A date, YYYY-MM-DD. | — | `"2026-12-15"` |
| Date and time | `datetime` | A date-time with Z or an offset; answered in UTC with Z. | — | `"2026-12-15T09:30:00.000Z"` |
| Number | `number` | A number, with or without decimals. | the field's lowest and highest value, when it has them (config.min, config.max) | `12.5` |
| Dropdown (one choice) | `select` | One option's id (the type's fields call lists the options). | an option of the field in the task's project and type, switched on | `"3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f"` |
| Dropdown (several choices) | `multi_select` | A list of option ids. | 100 options | `["3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f","4a3b0d2f-8c5e-4f9b-8d3a-2b3c4d5e6f7a"]` |
| Dependent dropdown | `cascading_select` | An object: { "parent": option id, "child": the id of an option under it }; child may be left out. | — | `{"parent":"3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f","child":"4a3b0d2f-8c5e-4f9b-8d3a-2b3c4d5e6f7a"}` |
| Radio buttons | `radio` | One option's id. | — | `"3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f"` |
| Checkboxes | `checkboxes` | A list of option ids. | 100 options | `["3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f"]` |
| Person | `user` | A person's id (GET /people). | someone the token's person can see | `"8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a"` |
| People | `multi_user` | A list of people's ids. | 100 people | `["8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a","9e1f6a8b-2d3c-4e4f-9a0b-1c2d3e4f5a6b"]` |
| Group | `group` | A group's id. | — | `"5b4c1e3a-9d6f-4a0c-9e4b-3c4d5e6f7a8b"` |
| Groups | `multi_group` | A list of group ids. | 100 groups | `["5b4c1e3a-9d6f-4a0c-9e4b-3c4d5e6f7a8b"]` |
| Project | `project` | A project's id (GET /projects). | a project the token's person can open | `"1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e"` |
| Web address | `url` | A string starting with https:// or http://. | 2000 characters | `"https://example.com/contracts/42"` |
| Labels | `labels` | A list of words without spaces. | 100 labels of 255 characters each | `["renewal","q1"]` |
| Read-only text | `read_only_text` | A string on one line. Set only through this API (create and update) and automation rules; people see it read only in the app. | 255 characters | `"Imported from the old tracker"` |
| Formula | `formula` | A number or a date. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Custom formula | `custom_formula` | A number, a date or a string. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Rating | `rating` | A whole number from 1 to the field's top score (config.scale, 5 by default). | — | `4` |
| Slider | `slider` | A number between the field's lowest and highest value (0 to 100 by default). | config.min to config.max | `70` |
| Yes or no | `yes_no` | true or false (false when empty). | — | `true` |
| Time interval | `time_interval` | An object: { "start": date-time, "end": date-time }, the end not before the start; answered in UTC with Z. | — | `{"start":"2026-12-15T09:00:00.000Z","end":"2026-12-15T17:30:00.000Z"}` |
| Reactions | `reactions` | Answered as { "<emoji>": [people's ids] }. Sent as { "emoji": "👍" }: it adds the token's person's reaction, or takes it away when they already gave it. | one emoji | `{"emoji":"👍"}` |
| Message on the task view | `message_view` | No value: a note shown on the task. | — | — |
| Message while editing | `message_edit` | No value: a note shown while creating or editing. | — | — |
| Person detail | `person_property` | A string (a person's email, job title, department or name). Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Days since the last comment | `days_since_comment` | A whole number of days. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Last commenter | `last_commenter` | A person. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Last comment visible to everyone | `last_public_comment` | A date-time. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Reporter's email domain | `reporter_domain` | A string. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Assignee's email domain | `assignee_domain` | A string. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Number of files | `attachment_count` | A whole number. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Number of comments | `comment_count` | A whole number. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Time in the current status | `time_in_status` | A duration. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| First response | `first_response` | A date-time. Worked out by projqo: shown in the app, not sent in task answers yet, never written. | — | — |
| Version picker (single version) | `version` | A release's id, of the task's project. | an unarchived release (an archived one only when the task holds it) | `"6a7b8c9d-0e1f-4a2b-9c3d-5e6f7a8b9c0d"` |
| Version picker (multiple versions) | `versions` | A list of release ids, of the task's project. | 100 releases | `["6a7b8c9d-0e1f-4a2b-9c3d-5e6f7a8b9c0d"]` |

Fields worked out by projqo (formulas, counts, "days since the last comment" and the like) are shown in the app; they aren't sent in task answers yet, and they are never written.

A Read-only text field is the one people can't change in the app: it is set only through this API (create and update, like a Short text field) and by automation rules. Use it for values another system owns, such as the id a task had in the tool it was imported from.
