---
updatedAt: 2026-05-28T05:27:12.000Z
agentTools:
  projectIndex: https://developers.smartrecruiters.com/llms.txt
---

# Attach files to a candidate.

Attach files to a candidate.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "1",
    "title": "Candidates API",
    "contact": {
      "name": "SmartRecruiters",
      "url": "https://developers.smartrecruiters.com"
    }
  },
  "tags": [
    {
      "name": "candidates"
    }
  ],
  "paths": {
    "/candidates/{id}/attachments": {
      "parameters": [
        {
          "$ref": "#/components/parameters/candidateId"
        }
      ],
      "post": {
        "deprecated": true,
        "responses": {
          "201": {
            "description": "Candidate's attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            }
          },
          "400": {
            "description": "with codes:\n* **FILE_ALREADY_EXIST** when file aleady exists,\n* **INVALID_FILE** when file extension not allowed, corrupted file or wrong file type.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Candidate access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "with code **ATTACHMENT_LIMIT_EXCEEDED** when no more files can be added to candidate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "description": "Attach files to a candidate.",
        "tags": [
          "candidates"
        ],
        "summary": "Attach files to a candidate.",
        "operationId": "candidates.attachments.add",
        "security": [
          {
            "key": []
          },
          {
            "oauth": [
              "candidates_create"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "attachmentType": {
                    "description": "Type of attachment you want to upload.",
                    "type": "string",
                    "enum": [
                      "GENERIC_FILE",
                      "RESUME",
                      "COVER_LETTER"
                    ],
                    "default": "GENERIC_FILE"
                  },
                  "file": {
                    "description": "The file to upload.",
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "attachmentType"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-smarttoken"
      },
      "oauth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://www.smartrecruiters.com/identity/oauth/allow",
            "tokenUrl": "https://api.smartrecruiters.com/identity/oauth/token",
            "scopes": {
              "candidates_read": "Access Candidates",
              "candidates_create": "Create Candidates",
              "candidates_offers_read": "Access Offer Terms",
              "candidates_manage": "Manage Candidate Status and Properties",
              "candidate_status_read": "Access Candidate's status",
              "candidates_parse_resume": "Access Resume Parsing"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Attachment": {
        "type": "object",
        "required": [
          "id",
          "actions"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "actions": {
            "type": "object",
            "required": [
              "download"
            ],
            "properties": {
              "download": {
                "$ref": "#/components/schemas/Action"
              }
            }
          }
        }
      },
      "Action": {
        "type": "object",
        "required": [
          "url",
          "method"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "OPTIONS",
              "DELETE",
              "HEAD",
              "CONNECT"
            ]
          }
        }
      }
    },
    "parameters": {
      "candidateId": {
        "in": "path",
        "description": "candidate identifier",
        "name": "id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.smartrecruiters.com"
    }
  ]
}
```