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

# Upload job document

> Upload a document for a job. Supports two modes:

**1. Direct file upload** (`Content-Type: multipart/form-data`):
Send the file in a `file` field with `title` and `type` metadata fields. Allowed file types: PDF, DOC, DOCX, PNG, JPG, JPEG. Max size: 25 MB.

**2. JSON body** (`Content-Type: application/json`):
Provide a `file_url` — a publicly accessible HTTPS URL. The server downloads the file, validates it, and stores it.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/jobs/{id}/documents
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
paths:
  /v1/jobs/{id}/documents:
    post:
      tags:
        - Jobs
      summary: Upload job document
      description: >-
        Upload a document for a job. Supports two modes:


        **1. Direct file upload** (`Content-Type: multipart/form-data`):

        Send the file in a `file` field with `title` and `type` metadata fields.
        Allowed file types: PDF, DOC, DOCX, PNG, JPG, JPEG. Max size: 25 MB.


        **2. JSON body** (`Content-Type: application/json`):

        Provide a `file_url` — a publicly accessible HTTPS URL. The server
        downloads the file, validates it, and stores it.
      operationId: uploadJobDocument
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            description: Job UUID
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/JobDocumentUploadMultipart'
          application/json:
            schema:
              $ref: '#/components/schemas/JobDocumentUploadRequest'
      responses:
        '201':
          description: Document uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobDocumentUploadResponse'
              example:
                success: true
                data:
                  id: a1b2c3d4-e5f6-4a78-9b01-234567890123
                  created_at: '2026-08-06T13:00:00Z'
                  updated_at: '2026-08-06T13:00:00Z'
                  type: job_description
                  title: Senior Software Engineer Job Description.pdf
                  link: >-
                    https://project.supabase.co/storage/v1/object/sign/job-documents/example
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  schemas:
    JobDocumentUploadMultipart:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: >-
            The file to upload. Allowed types: PDF, DOC, DOCX, PNG, JPG, JPEG.
            Max size: 25 MB.
        title:
          type: string
          description: Document title. Defaults to the original filename if omitted.
        type:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Team document type key. Seeded values: job_description,
            offer_letter, contract, legal_document, other. Teams may add custom
            values.
      required:
        - file
        - type
    JobDocumentUploadRequest:
      type: object
      properties:
        file_url:
          type: string
          format: uri
          description: >-
            Publicly accessible HTTPS URL of the file to download and attach to
            the job. The file must be 25 MB or smaller.
        title:
          type: string
          minLength: 1
          maxLength: 255
          description: Document title or filename. Defaults to the downloaded filename.
        type:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Team document type key. Seeded values: job_description,
            offer_letter, contract, legal_document, other. Teams may add custom
            values.
      required:
        - file_url
        - type
    JobDocumentUploadResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Created document UUID.
            created_at:
              type: string
              description: ISO 8601 upload timestamp.
            updated_at:
              type: string
              description: ISO 8601 update timestamp.
            type:
              type: string
              description: Team-defined document type key.
            title:
              type:
                - string
                - 'null'
              description: Document title or filename.
            link:
              type: string
              description: >-
                Short-lived signed download URL. Re-fetch the document after
                this link expires.
          required:
            - id
            - created_at
            - updated_at
            - type
            - title
            - link
      required:
        - success
        - data
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````