Developers

Candidates

List and get candidates and their comments, update a candidate, and attach or remove its labels. Reads need Read candidate data, writes need Write candidate data.

Overview

GET /api/v1/candidates lists the candidates in your workspace, and GET /api/v1/candidates/{id} returns one of them. Both need the Read candidate data permission, which Full access does not include. A key can hold it only while an admin has turned on Candidate data in the API in Settings → API. When an admin turns it off, every key loses it, and both operations answer 403 with the code insufficient-scope.

You get the candidates you can see in the app. A key limited to some teams gets fewer. It sees only candidates with an application on one of its teams, so it never sees a candidate in the talent pool or one you reach only through a privately shared application. Use a key with access to all your teams to read those. Authentication covers team access.

A candidate here carries the name, headline and location from the top of the candidate's page. These two operations leave out the email address, the phone number, notes, files and everything else on the record. GET /api/v1/candidates/{id}/comments lists the comments on a candidate, under the same permission.

PATCH /api/v1/candidates/{id} changes a candidate's name, headline, location, phone number or email address, and POST /api/v1/candidates/{id}/labels attaches or removes a label. Both need the Write candidate data permission, which the API names candidates:write, and the same switch. The API cannot create a candidate yet.

Request

curl "https://attia.app/api/v1/candidates?limit=50" \  -H "Authorization: Bearer $ATTIA_API_KEY"

All three query parameters are optional.

ParameterTypeDefaultMeaning
limitinteger, 1 to 10025How many candidates to return
cursorstringnoneThe next_cursor of the previous page
updated_sinceRFC 3339 timestampnoneOnly candidates updated at or after this time

A parameter outside this table gets a 400 with the code invalid-request. So does a parameter sent twice.

Response

The answer holds the candidates in data, sorted by updated_at and then id, oldest change first. next_cursor is a string when more candidates exist and null on the last page.

{  "data": [    {      "id": "0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93",      "full_name": "Kari Eksempel",      "headline": "Backend developer",      "location": "Eksempelvik",      "created_at": "2026-09-25T12:04:51.220417Z",      "updated_at": "2026-10-01T09:42:10.118305Z"    }  ],  "next_cursor": null}
FieldTypeMeaning
idUUIDThe candidate's id in your workspace. It never changes
full_namestringThe candidate's name
headlinestring or nullThe line under the name, often the candidate's current role
locationstring or nullWhere the candidate is, as the record states it
created_attimestampWhen the candidate was added to your workspace
updated_attimestampWhen the candidate last changed

Version 1 can gain a field, so ignore one you do not know. Timestamps, nulls and enums describes each format.

Page through every candidate

Ask for a page, then send next_cursor back as cursor until it is null.

curl "https://attia.app/api/v1/candidates?limit=100&cursor=eyJ1IjoiMjAyNi0xMC0wMlQwODoxNTozMC40ODI5MTNaIiwiaSI6IjAxOTJmM2I0LTJjMTgtN2E1ZS05ZDA3LTZlMWY0YThiMmM5MyJ9" \  -H "Authorization: Bearer $ATTIA_API_KEY"

The cursor stays stable while people edit candidates. A candidate 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.

Poll for changes

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.

curl "https://attia.app/api/v1/candidates?updated_since=2026-10-01T09:37:10.118305Z" \  -H "Authorization: Bearer $ATTIA_API_KEY"

A candidate who is deleted or erased stops appearing, and the list does not tell you. If you keep a copy, ask for each stored id now and then. A 404 means the candidate is gone for your key.

Get one candidate

GET /api/v1/candidates/{id} returns the candidate with that id. It takes no query parameters, so one gets a 400 with the code invalid-request.

curl "https://attia.app/api/v1/candidates/0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93" \  -H "Authorization: Bearer $ATTIA_API_KEY"

The answer holds the candidate in data, with the same fields as a candidate in the list.

{  "data": {    "id": "0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93",    "full_name": "Kari Eksempel",    "headline": "Backend developer",    "location": "Eksempelvik",    "created_at": "2026-09-25T12:04:51.220417Z",    "updated_at": "2026-10-01T09:42:10.118305Z"  }}

A 404 with the code not-found means no candidate your key can see has that id. The candidate may not exist, may be deleted or erased, may belong to another workspace, or may sit outside your key's teams. Every one of these gets the same answer, so a 404 never tells you whether the candidate exists. An id that is not a UUID gets the same 404.

List a candidate's comments

GET /api/v1/candidates/{id}/comments lists the comments on one candidate that you can read in the app. It needs Read candidate data, and a key with Read alone gets a 403 with the code insufficient-scope. A message to the candidate is not a comment and never comes back. Neither does a comment on one of the candidate's applications: GET /api/v1/applications/{id}/comments lists those.

curl "https://attia.app/api/v1/candidates/0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93/comments?limit=50" \  -H "Authorization: Bearer $ATTIA_API_KEY"

All three query parameters are optional.

ParameterTypeDefaultMeaning
limitinteger, 1 to 10025How many comments to return
cursorstringnoneThe next_cursor of the previous page
updated_sinceRFC 3339 timestampnoneOnly comments updated at or after this time

The answer holds the comments in data, sorted by updated_at and then id, oldest change first. next_cursor is a string when more comments exist and null on the last page.

{  "data": [    {      "id": "0192f5c2-7a10-7b3e-8c21-4d0e1f2a3b01",      "parent_comment_id": null,      "body_text": "Let's move the first interview to next week.",      "body_markdown": "Let's move the first interview to next week.",      "author_name": "Ola Eksempel",      "created_by_workspace_member_id": "0192f39f-22bb-7c3e-b2d4-9e8f7a6b5c01",      "by_agent": false,      "created_at": "2026-09-30T08:12:40.118305Z",      "edited_at": null,      "updated_at": "2026-09-30T08:12:40.118305Z"    }  ],  "next_cursor": null}
FieldTypeMeaning
idUUIDThe comment's id
parent_comment_idUUID or nullThe comment this one replies to, or null on a comment that starts a thread
body_textstringWhat the author wrote, as plain text
body_markdownstringWhat the author wrote, as Markdown. An uploaded image comes back as its markdown line. When the body holds something this Markdown cannot carry, such as a mention, it is the plain text of body_text
author_namestring or nullThe author's name, or null when there is none or the stored name looks like an email
created_by_workspace_member_idUUID or nullThe member who wrote it, or null when the Agent wrote it
by_agentbooleantrue when the Agent wrote it
created_attimestampWhen it was written
edited_attimestamp or nullWhen the author last edited it, or null if never
updated_attimestampWhen it last changed

Editing a comment moves its updated_at, so updated_since finds it. A comment someone deleted or redacted is not in the list, so a poll with updated_since never reports that it went away. To notice, read every page again.

A 404 with the code not-found means your key cannot read that candidate, as for GET /api/v1/candidates/{id}.

Update a candidate

PATCH /api/v1/candidates/{id} changes the fields you send and leaves every other field as it is.

curl -X PATCH "https://attia.app/api/v1/candidates/0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93" \  -H "Authorization: Bearer $ATTIA_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: 0192f3e2-0a4d-7c51-9b3e-5d7f1a3c5e71" \  -d '{"headline": "Staff engineer", "location": "Eksempelvik"}'

Every field is optional, and a body with none of them changes nothing. These are the fields you can edit at the top of the candidate's page, except the photo.

FieldTypeMeaning
full_namestringThe candidate's name. Spaces at either end are removed, and the name cannot be blank
headlinestring or nullThe line under the name. null or a blank value clears it
locationstring or nullWhere the candidate is. null or a blank value clears it
primary_phonestring or nullThe candidate's phone number. null or a blank value clears it
primary_emailstringThe candidate's email address. No other candidate in your workspace may hold it

The answer is a 200 with the candidate in data, as GET /api/v1/candidates/{id} gives it, so it leaves out the phone number and the email address. The app records the change as it records an edit on the candidate's page.

Only a workspace owner or admin can update a candidate, as in the app. A key whose member is neither gets a 403 with the code insufficient-scope, and so does a key without Write candidate data. A view-only workspace gets workspace-view-only.

A field the update cannot take gets a 400 with the code invalid-request that names the field: a blank name, an email that is not an address, an email another candidate in your workspace holds, and a field outside the table, the photo included. A candidate who linked their own profile keeps their name, location and email address, and a candidate who claimed it keeps their email address, so a change to those gets the same 400. A refused call changes nothing.

A 404 with the code not-found means your key cannot read that candidate, as for GET /api/v1/candidates/{id}.

Attach or remove a label

POST /api/v1/candidates/{id}/labels attaches one candidate label to a candidate, or removes it.

curl -X POST "https://attia.app/api/v1/candidates/0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93/labels" \  -H "Authorization: Bearer $ATTIA_API_KEY" \  -H "Content-Type: application/json" \  -H "Idempotency-Key: 0192f3e2-0a4d-7c51-9b3e-5d7f1a3c5e72" \  -d '{"label_id": "0192f3c0-5b7e-7a12-8d40-2c6e9f1b3a58", "attached": true}'

The body holds two fields, and both are required.

FieldTypeMeaning
label_idUUIDA candidate label in your workspace
attachedbooleantrue attaches the label, false removes it

A group works as it does in the app. A candidate has at most one label of a group, so attaching one removes the other. The API does not list candidate labels yet.

The answer is a 200 with what the write did in data.

{  "data": {    "candidate_id": "0192f3b4-2c18-7a5e-9d07-6e1f4a8b2c93",    "label_id": "0192f3c0-5b7e-7a12-8d40-2c6e9f1b3a58",    "attached": true,    "changed": true,    "replaced_label_ids": []  }}
FieldTypeMeaning
candidate_idUUIDThe candidate
label_idUUIDThe label you sent
attachedbooleanWhether the candidate has the label now
changedbooleanfalse when the candidate already had the label, or already did not. Then nothing is written
replaced_label_idsarray of UUIDsThe labels of the same group that the attach removed. Empty for a removal

Anyone who can edit the candidate in the app can label them, so the key's member does not have to be an admin. A key whose member is a guest, or has no edit rights on a team of the candidate's applications, gets a 403 with the code insufficient-scope, and so does a key without Write candidate data. A view-only workspace gets workspace-view-only.

A label_id that no candidate label in your workspace has gets a 400 with the code invalid-request on that field. So does attaching an archived label, and attaching a group instead of one of its labels. You can remove an archived label. A 404 with the code not-found means your key cannot read that candidate.

Retry a write safely

Both writes need an Idempotency-Key header. Pick a new value for each call: 1 to 255 letters, digits, - or _. A UUID works. A call without one gets a 400 idempotency-key-required.

When a call times out or the connection drops, send it again with the same key. Within 24 hours, the same key with the same body and the same API key changes nothing and gets the first answer back, plus the header Idempotency-Replayed: true. A replay checks again that your key can read the candidate, so a candidate you lost access to since gets a 404.

The same key with another body or another API key gets a 422 idempotency-key-reused, and so does the same key after 24 hours, up to 90 days. A refused call keeps nothing, so you can send it again with the same key once you have fixed the cause.