---
title: "Attach files to a candidate."
method: POST
path: "/candidates/{id}/attachments"
tags: ["candidates"]
deprecated: true
---

# Attach files to a candidate.

`POST /candidates/{id}/attachments`

## Request

- Base URL: `https://api.smartrecruiters.com`
- URL: `https://api.smartrecruiters.com/candidates/{id}/attachments`
- Auth: one of:
  - API key in header `x-smarttoken`
  - OAuth 2
    - Authorization code: `https://www.smartrecruiters.com/identity/oauth/allow`
    - Token URL: `https://api.smartrecruiters.com/identity/oauth/token` scopes: `candidates_create`

> **Deprecated.**

Attach files to a candidate.

## Request body `multipart/form-data`

- object
  - `attachmentType` 'GENERIC_FILE' | 'RESUME' | 'COVER_LETTER', required: Type of attachment you want to upload.
  - `file` string, binary: The file to upload.

## Response `201`

Candidate's attachment

- Attachment
  - `id` string, required
  - `name` string
  - `type` string
  - `contentType` string
  - `actions` object, required
    - `download` Action, required
      - `url` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'OPTIONS' | 'DELETE' | 'HEAD' | 'CONNECT', required

## Other responses

- `400`: with codes: * **FILE_ALREADY_EXIST** when file aleady exists, * **INVALID_FILE** when file extension not allowed, corrupted file or wrong file type.
- `401`: Candidate access denied
- `422`: with code **ATTACHMENT_LIMIT_EXCEEDED** when no more files can be added to candidate.

---

[API](https://skmtc.dev/smartrecruiters/apis/candidates-api.md) - [All operations](https://skmtc.dev/smartrecruiters/apis/candidates-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartrecruiters/apis/candidates-api/revisions/8fde9b33d46d?raw)
