> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bindbee.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Candidate Attachment

> Uploads an attachment for a given candidate.

<Tip>
  Currently this functionality is available for Success Factor and Teamtailor
</Tip>

🚨 **Note:** File size cannot exceed **5 MB**.

### **For SAP Success Factor Integration**

If integrating with **SAP\_SUCCESS\_FACTOR**, the request body must only contain:

| Key              | Type            | Required     | Description                              |
| ---------------- | --------------- | ------------ | ---------------------------------------- |
| `file_name`      | string          | **required** | Name of the file including its extension |
| `file_content`   | string (base64) | **required** | Base64 encoded file content              |
| `remote_user_id` | UUID            | **required** | UUID of remote user created by Bindbee   |

### **For Teamtailor Integration**

If integrating with **Teamtailor**, the request body must only contain:

| Key              | Type   | Required     | Description                              |
| ---------------- | ------ | ------------ | ---------------------------------------- |
| `file_name`      | string | **required** | Name of the file including its extension |
| `file_url`       | string | **required** | Publically accessible file url           |
| `remote_user_id` | UUID   | **required** | UUID of remote user created by Bindbee   |


## OpenAPI

````yaml post /api/ats/v1/candidates/{candidate_id}/attachments
openapi: 3.1.0
info:
  title: Bindbee APIs
  version: 0.1.0
servers:
  - url: https://api.bindbee.dev
  - url: https://api-eu.bindbee.dev
security: []
paths:
  /api/ats/v1/candidates/{candidate_id}/attachments:
    post:
      tags:
        - Candidate
      summary: Create Candidate Attachment
      description: Uploads an attachment for a given candidate.
      operationId: >-
        create_candidate_attachment_api_ats_v1_candidates__candidate_id__attachments_post
      parameters:
        - name: candidate_id
          in: path
          required: true
          schema:
            type: string
            title: Candidate Id
        - name: x-connector-token
          in: header
          required: true
          schema:
            type: string
            title: X-Connector-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AtsAttachmentWrite'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AtsAttachmentWrite:
      properties:
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
          description: The name of the file attached.
          examples:
            - resume.pdf
        file_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: File Url
          description: The URL where the file is stored and can be retrieved.
          examples:
            - https://example.com/path/to/resume.pdf
        attachment_type:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - RESUME
            - COVER_LETTER
            - OFFER_LETTER
            - OTHER
            - '-'
          title: Attachment Type
          description: >-
            The type of attachment. If the value is not one of the defined enum
            values, the original value passed through will be returned.
          examples:
            - RESUME
        file_content:
          anyOf:
            - type: string
            - type: 'null'
          title: File Content
          description: File in base64 format
          examples:
            - SGVsbG8sIFdvcmxkIQ==
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: The MIME type of the file (e.g., 'application/pdf', 'image/png').
          examples:
            - application/pdf
        candidate:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Candidate
          description: The candidate to whom the attachment belongs.
          examples:
            - 018b4bfb-5ece-70b1-ad5e-862a9433aa65
        remote_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Remote User Id
          description: The id of user using the integration
          examples:
            - 018b4bfb-5ece-70b1-ad5e-862a9433aa65
      type: object
      title: AtsAttachmentWrite
      description: >-
        The AtsAttachmentWriteForCandidate object is used to represent a file
        attachment linked to a candidate's application within the ATS.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````