Labels
List application and job labels, and create, change, retire and restore one. The lists need Read, writes need Write.
Overview
GET /api/v1/application-labels lists the labels applications can carry, and GET /api/v1/job-labels lists the labels jobs can carry. Both need the Read permission. With the Write permission you can also create, change, retire and restore labels of both kinds, by the rules of the label settings in the app.
An application label with no team belongs to the workspace, and every key in the workspace reads it. A team's label reaches that team and the teams below it. You get those of the teams you can see in the app, minus any team your key's team access leaves out. A group that belongs to a team stays out of the list.
Request
curl "https://attia.app/api/v1/application-labels?limit=50" \ -H "Authorization: Bearer $ATTIA_API_KEY"All four query parameters are optional, on both operations.
| Parameter | Type | Default | Meaning |
|---|---|---|---|
limit | integer, 1 to 100 | 25 | How many labels to return |
cursor | string | none | The next_cursor of the previous page |
updated_since | RFC 3339 timestamp | none | Only labels updated at or after this time |
include_archived | true or false | false | Also return archived labels |
A parameter outside this table gets a 400 with the code invalid-request. So does a parameter sent twice.
Response
The answer holds the labels in data, sorted by updated_at and then id, oldest change first. next_cursor is a string when more labels exist and null on the last page.
{ "data": [ { "id": "0192f3d2-8a41-7e6b-9c22-4f7a1b3d5e68", "team_id": null, "name": "Referred", "color": "#5e6ad2", "description": "Someone at the company put the candidate forward.", "is_group": false, "parent_label_id": null, "sort_order": 10, "archived_at": null, "created_at": "2026-09-25T12:04:51.220417Z", "updated_at": "2026-10-01T09:42:10.118305Z" } ], "next_cursor": null}| Field | Type | Meaning |
|---|---|---|
id | UUID | The label's id. It never changes |
team_id | UUID or null | The team the label belongs to. null on a workspace label. Only on application labels |
name | string | The label's name |
color | string | The label's color, as a CSS color |
description | string or null | What the label means |
is_group | boolean | Whether this is a group of labels and not a label a record can carry |
parent_label_id | UUID or null | The group the label sits in. null when it sits in none |
sort_order | number | Lower comes first |
archived_at | timestamp or null | When the label was archived |
created_at | timestamp | When the label was created |
updated_at | timestamp | When the label last changed |
Version 1 can gain a field, so ignore one you do not know. Timestamps, nulls and enums describes each format.
Job labels
GET /api/v1/job-labels takes the same parameters and answers the same way. A job label has every field in the table except team_id, because it belongs to the workspace. So every key in the workspace reads all of them, whichever teams it is limited to.
curl "https://attia.app/api/v1/job-labels?limit=50" \ -H "Authorization: Bearer $ATTIA_API_KEY"Page and poll
Ask for a page, then send next_cursor back as cursor until it is null. A label edited during your read moves behind the cursor, and you may see it again on a later page. Keep the latest copy per id. Pagination explains the sort order.
updated_since is inclusive. Send a time five minutes before the largest updated_at you have stored, and drop the repeats by id. Poll for changes explains why.
The lists leave archived labels out unless you ask for them, so send include_archived=true when you keep a copy. A label that someone deletes stops appearing, and the list does not tell you. Read the whole list now and then to notice.
Create a label
POST /api/v1/application-labels creates an application label or a group, and POST /api/v1/job-labels creates a job label or a group. Both need the Write permission and an Idempotency-Key header.
curl -X POST "https://attia.app/api/v1/application-labels" \ -H "Authorization: Bearer $ATTIA_API_KEY" \ -H "Idempotency-Key: 0192f3d2-9b10-7c4e-8a51-2d6f0e9b3c17" \ -H "Content-Type: application/json" \ -d '{"name": "Referred", "description": "Someone at the company put the candidate forward."}'The body is a JSON object. Only name is required.
| Field | Type | Default | Meaning |
|---|---|---|---|
name | string | required | The label's name, at most 64 characters. It cannot be blank, and spaces at either end are removed. No other label of the same scope that is not archived may have it |
color | string | #26b5ce for a group, rgb(149, 162, 179) for a label | A CSS color, such as #26b5ce or rgb(149, 162, 179) |
description | string or null | null | What the label means, at most 256 characters. An empty string leaves none |
is_group | boolean | false | Create a group of labels. No record can carry a group |
parent_label_id | UUID or null | null | The group to put the label in. It must not be archived, must hold fewer than 250 labels and, for an application label, must have the label's own scope. A group cannot sit in a group |
team_id | UUID or null | null | Application labels only. The team the label belongs to, whose sub-teams can use it too. null creates a workspace label, which every team can use |
Only a workspace label can be a group. A job label takes every field except team_id.
The answer is a 201 with the label in data, with the fields of the list above. The Location header holds the label's path, such as /api/v1/application-labels/0192f3d2-8a41-7e6b-9c22-4f7a1b3d5e68.
A field the label settings would refuse gets a 400 invalid-request that names it, as does a field outside this table. A team you cannot create labels in gets one that names team_id, whether the team does not exist, belongs to another workspace or is one your key's team access leaves out.
Who may write labels
You may write a label when the app would let you. A workspace's application labels need the right the workspace's label settings give to manage workspace labels, and a team's labels need the right the team's settings give to manage its labels, in a team your key's team access includes. A job label needs a workspace admin with the right to manage workspace labels. Changing the name or color of an application label that candidates can see needs a workspace admin.
Without that right the answer is a 403 insufficient-scope. A view-only workspace gets workspace-view-only.
In the app, the workspace audit log names you as the one who made the change, followed by "via API", or by the app's name when an app made it with your approval.
Change a label
PATCH /api/v1/application-labels/{id} and PATCH /api/v1/job-labels/{id} change one label's name, color or description. Send only the fields you want to change, and the others keep their value. Both need the Write permission and an Idempotency-Key header.
curl -X PATCH "https://attia.app/api/v1/application-labels/0192f3d2-8a41-7e6b-9c22-4f7a1b3d5e68" \ -H "Authorization: Bearer $ATTIA_API_KEY" \ -H "Idempotency-Key: 0192f3d2-9b10-7c4e-8a51-2d6f0e9b3c18" \ -H "Content-Type: application/json" \ -d '{"color": "#5e6ad2", "description": null}'| Field | Type | Meaning |
|---|---|---|
id | UUID, in the path | The label to change |
name | string | The new name, by the rules of Create a label |
color | string | The new color, as a CSS color |
description | string or null | The new description. null or an empty string removes it |
A label cannot move to another group or team this way. Do that in the app.
The answer is a 200 with the label in data, and no Location header. A body that changes nothing writes nothing and answers the label as it is. An id that is not a label you can reach gets a 404 not-found, whether it does not exist or belongs to another workspace.
Retire and restore a label
POST /api/v1/application-labels/{id}/retire retires one application label, as Archive does in the label settings, and POST /api/v1/application-labels/{id}/restore restores it. /api/v1/job-labels/{id}/retire and /api/v1/job-labels/{id}/restore do the same for a job label. The body is an empty JSON object, {}. They need the Write permission and an Idempotency-Key header.
curl -X POST "https://attia.app/api/v1/job-labels/0192f3d2-8a41-7e6b-9c22-4f7a1b3d5e68/retire" \ -H "Authorization: Bearer $ATTIA_API_KEY" \ -H "Idempotency-Key: 0192f3d2-9b10-7c4e-8a51-2d6f0e9b3c19" \ -H "Content-Type: application/json" \ -d '{}'A retired label has archived_at set. Nobody can put it on another record, and the records that have it keep it. Retiring a group retires every label in it, and restoring a group restores every label in it. A label in a retired group cannot be restored on its own, so restore the group first. A label cannot be restored while another label that is not archived has its name, so rename one of them first. Both refusals answer a 400 invalid-request that names id.
The answer is a 200 with the label in data. Retiring a label that is already retired, or restoring one that is not, changes nothing and answers the label as it is.
Retry a write safely
Every label write needs an Idempotency-Key header of 1 to 255 characters from A-Z, a-z, 0-9, - and _, such as a UUID you make for that write. Send the same key with the same body and the same API key again within 24 hours, and you get the first answer back, with the header Idempotency-Replayed: true, and nothing is written twice. The same key with another body gets a 422 idempotency-key-reused. Retry a create safely explains the rules.