Detach files from entities
Changed onUnlinks one or more previously attached files from a person, company, or project without deleting the file or its stored content. The file remains available and can be re-attached later via POST /api/v1/files/attach.
Each detachment group unlinks the file in fileId from every entity in entities. A file ID may appear in only one group; requests listing the same file in two groups return 422.
Exact match only: a link is removed only when the file is linked to that exact entity. A combination where the file is not linked to the requested entity — including a link that points at a different entity of the same type — is returned as skipped with a reason, and the existing link is left untouched.
Redacted copies: when a redacted version of the file was created in Atlas, detaching the original also detaches every redacted copy still linked to the same entity, so no derived version of the document stays on the record. results reports only the requested file × entity combinations.
Detaching a resume file from a person does not undo CV enrichment already applied to that person.
Only files uploaded via the API (source = api) can be detached. Files belonging to a different agency return 404. entityType: "opportunity" is not supported in v1 and returns 422.
Request
- Base URLhttps://api.recruitwithatlas.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"detachments": [
{
"fileId": "550e8400-e29b-41d4-a716-446655440000",
"entities": [
{
"entityType": "person",
"entityId": "a1b2c3d4-e29b-41d4-a716-446655440000"
}
]
}
]
}Response
Outcome for every file × entity combination
Example response
{
"data": {
"results": [
{
"fileId": "550e8400-e29b-41d4-a716-446655440000",
"entityType": "person",
"entityId": "a1b2c3d4-e29b-41d4-a716-446655440000",
"status": "detached",
"reason": "File is not attached to this entity"
}
]
}
}Changes
- info
added the optional property
to the response with the status
- info