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

# Attach an application document

> Uploads and attaches a PDF document to an application. Kind must be either resume or cover-letter. Requires authentication.



## OpenAPI

````yaml /spec.json post /applications/{id}/documents/{kind}
openapi: 3.1.1
info:
  title: Reactive Resume
  version: 5.2.2
  description: Reactive Resume API
  license:
    name: MIT
    url: https://github.com/amruthpillai/reactive-resume/blob/main/LICENSE
  contact:
    name: Amruth Pillai
    email: hello@amruthpillai.com
    url: https://amruthpillai.com
servers:
  - url: http://localhost:3000/api/openapi
security:
  - apiKey: []
externalDocs:
  url: https://docs.rxresu.me
  description: Reactive Resume Documentation
paths:
  /applications/{id}/documents/{kind}:
    post:
      tags:
        - Applications
      summary: Attach an application document
      description: >-
        Uploads and attaches a PDF document to an application. Kind must be
        either resume or cover-letter. Requires authentication.
      operationId: attachApplicationDocument
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: kind
          in: path
          required: true
          schema:
            enum:
              - resume
              - cover-letter
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  contentMediaType: application/pdf
              required:
                - file
      responses:
        '200':
          description: The updated application.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the application.
                  company:
                    type: string
                    minLength: 1
                    description: The company applied to.
                  role:
                    type: string
                    minLength: 1
                    description: The role / job title.
                  location:
                    anyOf:
                      - type: string
                      - type: 'null'
                  salary:
                    anyOf:
                      - type: string
                      - type: 'null'
                  status:
                    enum:
                      - saved
                      - applied
                      - screening
                      - interview
                      - offer
                      - rejected
                    type: string
                    description: The current pipeline stage.
                  archived:
                    type: boolean
                  resumeId:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: The linked Reactive Resume, if any.
                  source:
                    anyOf:
                      - type: string
                      - type: 'null'
                  tags:
                    type: array
                    items:
                      type: string
                  sourceUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  jobDescription:
                    anyOf:
                      - type: string
                        maxLength: 20000
                      - type: 'null'
                  matchScore:
                    anyOf:
                      - type: integer
                        minimum: 0
                        maximum: 100
                      - type: 'null'
                  aiMetadata:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      - type: 'null'
                  notes:
                    anyOf:
                      - type: string
                      - type: 'null'
                  resumeFileUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  resumeFileName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  coverLetterUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  coverLetterName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  followUpAt:
                    anyOf:
                      - type: string
                        format: date-time
                        x-native-type: date
                      - type: 'null'
                  followUpNote:
                    anyOf:
                      - type: string
                      - type: 'null'
                  contacts:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          minLength: 1
                        role:
                          type: string
                          default: ''
                        type:
                          type: string
                          default: ''
                      required:
                        - name
                  activity:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                        type:
                          enum:
                            - stage
                            - note
                            - created
                          type: string
                        text:
                          type: string
                          minLength: 1
                        at:
                          type: string
                          format: date-time
                          x-native-type: date
                      required:
                        - id
                        - type
                        - text
                        - at
                  appliedAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  createdAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  updatedAt:
                    type: string
                    format: date-time
                    x-native-type: date
                required:
                  - id
                  - company
                  - role
                  - location
                  - salary
                  - status
                  - archived
                  - resumeId
                  - source
                  - tags
                  - sourceUrl
                  - jobDescription
                  - matchScore
                  - aiMetadata
                  - notes
                  - resumeFileUrl
                  - resumeFileName
                  - coverLetterUrl
                  - coverLetterName
                  - followUpAt
                  - followUpNote
                  - contacts
                  - activity
                  - appliedAt
                  - createdAt
                  - updatedAt
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: The API key to authenticate requests.

````