> ## 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.

# Add job target companies

> Add companies to a job target company list in bulk. Resolve company IDs with POST /v1/companies/search first. Invalid company IDs fail individually and do not block other valid IDs in the same request.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/jobs/{id}/target-companies
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}/target-companies:
    post:
      tags:
        - Jobs
      summary: Add job target companies
      description: >-
        Add companies to a job target company list in bulk. Resolve company IDs
        with POST /v1/companies/search first. Invalid company IDs fail
        individually and do not block other valid IDs in the same request.
      operationId: addJobTargetCompanies
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            description: Job UUID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobTargetCompaniesMutationRequest'
      responses:
        '200':
          description: Job target companies added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobTargetCompaniesAddResponse'
              example:
                success: true
                data:
                  job_id: 123e4567-e89b-12d3-a456-426614174000
                  added_ids:
                    - 456e7890-e12b-34d5-a678-901234567890
                  already_present_ids:
                    - 567e8901-e23c-45d6-e789-012345678901
                  failed:
                    - id: 678e9012-f34d-56e7-f890-123456789012
                      reason: not_found
        '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:
    JobTargetCompaniesMutationRequest:
      type: object
      properties:
        company_ids:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
          description: >-
            Company UUIDs to add to or remove from the job target company list.
            Resolve names with POST /v1/companies/search first.
      required:
        - company_ids
    JobTargetCompaniesAddResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/JobTargetCompaniesAddResult'
      required:
        - success
        - data
    JobTargetCompaniesAddResult:
      type: object
      properties:
        job_id:
          type: string
          format: uuid
          description: Job UUID.
        added_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Company UUIDs newly added to the job target company list.
        already_present_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Company UUIDs that were already on the job target company list.
        failed:
          type: array
          items:
            $ref: '#/components/schemas/JobTargetCompanyMutationFailure'
          description: >-
            Company UUIDs that could not be added. Other valid IDs in the same
            request are still processed.
      required:
        - job_id
        - added_ids
        - already_present_ids
        - failed
    JobTargetCompanyMutationFailure:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Company UUID that could not be processed.
        reason:
          type: string
          description: Reason this company could not be processed, such as not_found.
      required:
        - id
        - reason
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````