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

# Add attachment to candidate

> Uploads an attachment file for the specified candidate.

<Accordion title="Supported integrations" icon="list-check">
  This feature is currently available for the following integrations:

  <ul>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/workday/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/workday">Workday</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/smartrecruiters/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/smartrecruiters">SmartRecruiters</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/oraclerecruiting/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/oraclerecruiting">Oracle Recruiting Cloud</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/lever/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/lever">Lever</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/icims/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/icims">iCIMS</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/recruitee/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/recruitee">Recruitee</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/recruiterflow/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/recruiterflow">RecruiterFlow</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/greenhouse/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/greenhouse">Greenhouse (V1)</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/teamtailor/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/teamtailor">Teamtailor</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/ashby/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/ashby">Ashby</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/onlyfy/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/onlyfy">Onlyfy</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/ukgready/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/ukgready">UKG Ready</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/bullhorn4salesforce/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/bullhorn4salesforce">Bullhorn for Salesforce</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/bullhorn/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/bullhorn">Bullhorn</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/bullhornlogin/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/bullhornlogin">Bullhorn Login</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/workable/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/workable">Workable</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/welcometothejungle/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/welcometothejungle">Welcome to the Jungle</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/erecruiter/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/erecruiter">eRecruiter</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/taleez/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/taleez">Taleez</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hrworks/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/hrworks">HR WORKS</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/otys/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/otys">OTYS</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/jazzhr/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/jazzhr">JazzHR</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/homerun/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/homerun">Homerun</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/carerix/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/carerix">Carerix</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/inrecruiting/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/inrecruiting">InRecruiting by Zucchetti</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/jobadder/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/jobadder">JobAdder</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hr4you/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/hr4you">HR4YOU</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/odoo/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/odoo">Odoo</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/mercury/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/mercury">Mercury</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/manatal/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/manatal">Manatal</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/avionte/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/avionte">Avionté</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/breezyhr/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/breezyhr">Breezy HR</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/sandbox/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/sandbox">Kombo Sandbox</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/loxo/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/ats/connectors/loxo">Loxo</a></li>
  </ul>

  You'd like to see this feature for another integration? Please reach out!
  We're always happy to discuss extending our coverage.
</Accordion>

<Warning>
  **We recommend using the [add attachment to application](/ats/v1/post-applications-application-id-attachments) endpoint instead.**

  We realized that in practice it was always more about adding attachments to *applications* instead of *candidates*, so we created a new, more aptly named one that you should use instead: [add attachment to application](/ats/v1/post-applications-application-id-attachments)
</Warning>

<Note>
  This endpoint requires the permission **Add attachments** to be enabled in [your scope config](/scopes).
</Note>

### Example Request Body

```json theme={null}
{
  "candidate_id": "GRKdd9dibYKKCrmGRSMJf3wu",
  "attachment": {
    "name": "Frank Doe CV.txt",
    "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
    "type": "CV",
    "content_type": "text/plain"
  }
}
```


## OpenAPI

````yaml POST /ats/candidates/{candidate_id}/attachments
openapi: 3.1.0
info:
  title: Kombo API
  version: 1.0.0
servers:
  - url: https://api.kombo.dev/v1
    description: Kombo EU API
  - url: https://api.us.kombo.dev/v1
    description: Kombo US API
security:
  - ApiKey: []
tags:
  - name: General
  - name: Kombo Connect
    description: >-
      Endpoints for Kombo Connect, our end-user-facing flow for setting up new
      integrations.
  - name: Unified HRIS API
    description: Unified endpoints to access all the HR concepts you might need.
  - name: Unified ATS API
    description: Unified endpoints to access all the ATS concepts you might need.
  - name: Unified ATS (Assessment & Background Check) API
    description: >-
      Unified endpoints to operate Assessments and Background Checks for many
      applicant tracking systems.
  - name: Unified LMS API
    description: Unified endpoints to access all the LMS concepts you might need.
  - name: AI Apply
    description: Endpoints for AI-powered job application features.
  - name: Custom Endpoints
    description: Custom integration-specific endpoints.
paths:
  /ats/candidates/{candidate_id}/attachments:
    post:
      tags:
        - Unified ATS API
      summary: Add attachment to candidate
      description: >-
        Uploads an attachment file for the specified candidate.


        <Accordion title="Supported integrations" icon="list-check">

        This feature is currently available for the following integrations:


        <ul>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/workday/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/workday">Workday</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/smartrecruiters/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/smartrecruiters">SmartRecruiters</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/oraclerecruiting/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/oraclerecruiting">Oracle Recruiting
        Cloud</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/lever/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/lever">Lever</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/icims/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/icims">iCIMS</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/recruitee/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/recruitee">Recruitee</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/recruiterflow/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/recruiterflow">RecruiterFlow</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/greenhouse/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/greenhouse">Greenhouse (V1)</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/teamtailor/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/teamtailor">Teamtailor</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/ashby/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/ashby">Ashby</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/onlyfy/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/onlyfy">Onlyfy</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/ukgready/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/ukgready">UKG Ready</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/bullhorn4salesforce/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/bullhorn4salesforce">Bullhorn for
        Salesforce</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/bullhorn/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/bullhorn">Bullhorn</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/bullhornlogin/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/bullhornlogin">Bullhorn Login</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/workable/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/workable">Workable</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/welcometothejungle/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/welcometothejungle">Welcome to the
        Jungle</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/erecruiter/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/erecruiter">eRecruiter</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/taleez/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/taleez">Taleez</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hrworks/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/hrworks">HR WORKS</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/otys/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/otys">OTYS</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/jazzhr/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/jazzhr">JazzHR</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/homerun/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/homerun">Homerun</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/carerix/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/carerix">Carerix</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/inrecruiting/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/inrecruiting">InRecruiting by
        Zucchetti</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/jobadder/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/jobadder">JobAdder</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hr4you/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/hr4you">HR4YOU</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/odoo/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/odoo">Odoo</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/mercury/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/mercury">Mercury</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/manatal/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/manatal">Manatal</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/avionte/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/avionte">Avionté</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/breezyhr/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/breezyhr">Breezy HR</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/sandbox/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/sandbox">Kombo Sandbox</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/loxo/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/ats/connectors/loxo">Loxo</a></li>

        </ul>


        You'd like to see this feature for another integration? Please reach
        out!

        We're always happy to discuss extending our coverage.

        </Accordion>



        <Warning>
          **We recommend using the [add attachment to application](/ats/v1/post-applications-application-id-attachments) endpoint instead.**

          We realized that in practice it was always more about adding attachments to _applications_ instead of _candidates_, so we created a new, more aptly named one that you should use instead: [add attachment to application](/ats/v1/post-applications-application-id-attachments)
          </Warning>

        <Note>
          This endpoint requires the permission **Add attachments** to be enabled in [your scope config](/scopes).
        </Note>


        ### Example Request Body


        ```json

        {
          "candidate_id": "GRKdd9dibYKKCrmGRSMJf3wu",
          "attachment": {
            "name": "Frank Doe CV.txt",
            "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
            "type": "CV",
            "content_type": "text/plain"
          }
        }

        ```
      operationId: PostAtsCandidatesCandidateIdAttachments
      parameters:
        - in: header
          name: X-Integration-Id
          schema:
            type: string
          description: ID of the integration you want to interact with.
          example: join:HWUTwvyx2wLoSUHphiWVrp28
          required: true
        - name: candidate_id
          in: path
          required: true
          description: The Kombo ID of the candidate you want to add the attachment to.
          schema:
            $ref: >-
              #/components/schemas/PostAtsCandidatesCandidateIdAttachmentsParameterCandidateId
          examples:
            example1:
              value: GRKdd9dibYKKCrmGRSMJf3wu
      requestBody:
        description: POST /ats/candidates/:candidate_id/attachments Request body
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PostAtsCandidatesCandidateIdAttachmentsRequestBody
            examples:
              example1:
                value:
                  attachment:
                    name: Frank Doe CV.txt
                    data: >-
                      SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=
                    type: CV
                    content_type: text/plain
      responses:
        '200':
          description: POST /ats/candidates/:candidate_id/attachments Positive response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostAtsCandidatesCandidateIdAttachmentsPositiveResponse
        default:
          $ref: '#/components/responses/ErrorResponseATS'
      x-codeSamples:
        - lang: python
          label: PostAtsCandidatesCandidateIdAttachments
          source: |-
            from kombo import Kombo


            with Kombo(
                integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28",
                api_key="<YOUR_BEARER_TOKEN_HERE>",
            ) as k_client:

                res = k_client.ats.add_candidate_attachment(candidate_id="GRKdd9dibYKKCrmGRSMJf3wu", attachment={
                    "name": "Frank Doe CV.txt",
                    "content_type": "text/plain",
                    "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
                    "type": "CV",
                })

                # Handle response
                print(res)
        - lang: typescript
          label: PostAtsCandidatesCandidateIdAttachments
          source: |-
            import { Kombo } from "@kombo-api/sdk";

            const kombo = new Kombo({
              integration_id: "workday:HWUTwvyx2wLoSUHphiWVrp28",
              api_key: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await kombo.ats.addCandidateAttachment({
                candidate_id: "GRKdd9dibYKKCrmGRSMJf3wu",
                body: {
                  attachment: {
                    name: "Frank Doe CV.txt",
                    content_type: "text/plain",
                    data: "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
                    type: "CV",
                  },
                },
              });

              console.log(result);
            }

            run();
        - lang: ruby
          label: PostAtsCandidatesCandidateIdAttachments
          source: >-
            require 'kombo'


            Models = ::Kombo::Models

            s = ::Kombo::Kombo.new(
              integration_id: 'workday:HWUTwvyx2wLoSUHphiWVrp28',
              security: Models::Shared::Security.new(
                api_key: '<YOUR_BEARER_TOKEN_HERE>'
              )
            )

            res = s.ats.add_candidate_attachment(candidate_id:
            'GRKdd9dibYKKCrmGRSMJf3wu', body:
            Models::Shared::PostAtsCandidatesCandidateIdAttachmentsRequestBody.new(
              attachment: Models::Shared::PostAtsCandidatesCandidateIdAttachmentsRequestBodyAttachment.new(
                name: 'Frank Doe CV.txt',
                content_type: 'text/plain',
                data: 'SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=',
                type: Models::Shared::PostAtsCandidatesCandidateIdAttachmentsRequestBodyType::CV
              )
            ))


            unless
            res.post_ats_candidates_candidate_id_attachments_positive_response.nil?
              # handle response
            end
components:
  schemas:
    PostAtsCandidatesCandidateIdAttachmentsParameterCandidateId:
      type: string
      description: The Kombo ID of the candidate you want to add the attachment to.
    PostAtsCandidatesCandidateIdAttachmentsRequestBody:
      type: object
      properties:
        attachment:
          type: object
          properties:
            name:
              type: string
              description: >-
                File name of the file you want to upload. We recommend providing
                something human-readable with a valid file extension (like
                `Resume.pdf`), as this might be shown in your customer's system.
            content_type:
              type: string
              pattern: ^[\w.-]+\/[\w.-]+$
              description: >-
                Content/MIME type of the file (e.g., `application/pdf`).


                If you provide `data`, this is required. If you provide
                `data_url`, this is optional and we'll attempt to use the
                `Content-Type` header of the response.


                **Note:** Please validate that the content type you provide is
                actually meaningful (and not something generic like
                [`application/octet-stream`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types#applicationoctet-stream)).
                Especially when using object storage (like AWS S3), it's easy to
                accidentally discard the content types of user-provided files,
                so make sure to explicitly persist them when processing uploads
                from your users (see guides for
                [AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#SysMetadata),
                [Google
                Cloud](https://cloud.google.com/storage/docs/metadata#content-type),
                and
                [Azure](https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types)).
            data_url:
              type: string
              format: uri
              description: >-
                URL to the file you want to upload that can be accessed without
                authentication headers. We will download the content immediately
                when receiving the request, so the URL can be short-lived.


                If you're using an object storage provider (like AWS S3), we
                strongly recommend providing a signed URL for secure access (see
                guides for
                [AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html),
                [Google
                Cloud](https://cloud.google.com/storage/docs/access-control/signed-urls),
                and
                [Azure](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview)).


                **Note:** You must provide either this or `data_url`. We
                recommend `data_url` over `data` for most cases.
            data:
              type: string
              description: >-
                Base64-encoded contents of the file you want to upload.


                **Note:** You must provide either this or `data_url`. We
                recommend `data_url` over `data` for most cases.
            type:
              type: string
              enum:
                - CV
                - COVER_LETTER
                - OTHER
              description: >-
                Type of the attachment in the ATS. This may affect where the
                uploaded file will be shown in your customer's system.
          required:
            - name
            - type
        remote_fields:
          type: object
          properties:
            greenhouse:
              type: object
              properties:
                post_headers:
                  type: object
                  properties:
                    On-Behalf-Of:
                      type:
                        - string
                        - 'null'
                      description: >-
                        ID of the the user that will show up as having performed
                        the action in Greenhouse. We already pass a value by
                        default, but you can use this to override it.
                  description: Headers we will pass with `POST` requests to Greenhouse.
              description: Fields specific to Greenhouse.
            workable:
              type: object
              properties:
                on_behalf_of_user_remote_id:
                  type: string
                  description: >-
                    The remote ID of the user that will be displayed in the UI
                    as the one that performed the action.
              description: Workable specific remote fields for ATS actions.
          description: Additional fields that we will pass through to specific ATS systems.
      required:
        - attachment
    PostAtsCandidatesCandidateIdAttachmentsPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
        warnings:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: >-
            These are the interaction warnings that are shown in the dashboard.
            They are meant to provide debug information to you. We recommend
            logging them to the console.
      required:
        - status
        - data
        - warnings
  responses:
    ErrorResponseATS:
      description: The standard error response with the error codes for the ATS use case.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type:
                      - string
                      - 'null'
                    enum:
                      - PLATFORM.RATE_LIMIT_EXCEEDED
                      - PLATFORM.CONCURRENCY_LIMIT_EXCEEDED
                      - PLATFORM.INTEGRATION_NOT_FOUND
                      - PLATFORM.INPUT_INVALID
                      - PLATFORM.UNKNOWN_ERROR
                      - PLATFORM.IP_NOT_WHITELISTED
                      - PLATFORM.AUTHENTICATION_INVALID
                      - PLATFORM.TASK_TIMED_OUT
                      - INTEGRATION.PERMISSION_MISSING
                      - INTEGRATION.AUTHENTICATION_INVALID
                      - INTEGRATION.QA_FAILED
                      - INTEGRATION.SETUP_SYNC_PENDING
                      - INTEGRATION.SETUP_INCOMPLETE
                      - INTEGRATION.INACTIVE
                      - INTEGRATION.MODEL_NOT_AVAILABLE
                      - INTEGRATION.MODEL_DISABLED
                      - INTEGRATION.ACTION_NOT_AVAILABLE
                      - INTEGRATION.ACTION_DISABLED
                      - REMOTE.SERVICE_UNAVAILABLE
                      - REMOTE.RATE_LIMIT_EXCEEDED
                      - REMOTE.INPUT_INVALID
                      - REMOTE.UNKNOWN_HTTP_ERROR
                      - ATS.JOB_CLOSED
                      - ATS.APPLICATION_ALREADY_EXISTS
                    example: ATS.JOB_CLOSED
                    description: >-
                      Some errors include an error code that can be used to
                      identify their cause. See the [Error Handling
                      Docs](https://docs.kombo.dev/guides/errors) for more
                      information. For your error handling logic please use the
                      error `code` instead of other properties (e.g. message,
                      http status code, ...).
                  title:
                    type:
                      - string
                      - 'null'
                    description: A static, human-readable label.
                  message:
                    type: string
                    description: >-
                      A dynamic, detailed description of what went wrong in this
                      specific instance.
                  log_url:
                    type:
                      - string
                      - 'null'
                    format: uri
                    description: >-
                      The log page in the Kombo UI lists every interaction with
                      full details. If you need assistance, share that link with
                      our support team.
                required:
                  - code
                  - title
                  - message
                  - log_url
                description: Error details with structured code for programmatic handling.
            required:
              - status
              - error
          examples:
            Error Response:
              description: >-
                When building error handling logic, always use the `code` field
                to identify specific error types programmatically. See the
                complete list of error codes in the
                [docs](https://docs.kombo.dev/guides/errors).
              value:
                status: error
                error:
                  code: INTEGRATION.MODEL_NOT_AVAILABLE
                  title: >-
                    This data model isn't supported for the selected
                    integration.
                  message: >-
                    The "employees" model is not yet available for Greenhouse.
                    Please reach out to Kombo if you need this functionality.
                  log_url: https://app.kombo.dev/my-prod/logs?interactionId=123456
            Minimal Error Response:
              description: >-
                The "message" is always required while other fields can also be
                `null`. See the [docs](https://docs.kombo.dev/guides/errors) for
                more information.
              value:
                status: error
                error:
                  code: null
                  title: null
                  message: The message is always in the response.
                  log_url: null
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        Create an API key on the [Secrets](https://app.kombo.dev/secrets) page
        in the Kombo dashboard.

````