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

# Create Candidate

> Create a new candidate and associate them with a job. Optionally trigger interview outreach via SMS and/or email. If neither send_sms nor send_email is set, the candidate is created without initiating the interview — use the returned webcall_url to share the interview link through your own channels. When outreach is sent, `call_id` is the id GET /v2/calls/{callId} resolves (v1 parity); it is null when nothing was sent. A 409 means a candidate with the same email or phone already exists on this job — its links are under `data`.

Create a new candidate and associate them with a job. Optionally trigger interview outreach via SMS and/or email.

If neither `send_sms` nor `send_email` is set, the candidate is created without initiating the interview. Use the returned `webcall_url` to share the interview link through your own communication channels.

Pass `external_id` to store your own id for the applicant. It is saved where `POST /v2/calls` saves it, and comes back as `remote_application_id` and `remote_candidate_id`. It is not unique and the API does not deduplicate on it: two requests with the same `external_id` can create two candidates (for example with `force_create`). To make a retry safe, send an [`Idempotency-Key`](/docs/guides/idempotency).

When outreach is sent, the response carries `call_id`, the id [Get Call](/docs/api-reference/calls/get-call.md) resolves, the same value v1 returned. It is `null` when nothing was sent.

When `send_sms` or `send_email` is true, this endpoint counts against your organization's interview invite send caps. Those caps are shared with dashboard single-send and CSV campaign sends.

```bash cURL theme={null}
curl -X POST https://api.classet.ai/v2/candidates \
  -H "X-API-KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane@example.com",
    "phone": "+14155551234",
    "job_id": "your-job-id",
    "external_id": "ats-applicant-8812",
    "send_sms": true,
    "send_email": true
  }'
```

```json 201 theme={null}
{
  "data": {
    "candidate_id": "Xk3pQ9vT2mLr8bNc4Hd1s",
    "call_id": "call_9f2c1d7e",
    "webcall_url": "https://call.classet.ai/call/Xk3pQ9vT2mLr8bNc4Hd1s",
    "interview_panel_url": "https://call.classet.ai/interview-panel/Xk3pQ9vT2mLr8bNc4Hd1s"
  }
}
```

```json 409 theme={null}
{
  "error": "Candidate already exists. Set force_create to true to override.",
  "code": "conflict",
  "request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f",
  "data": {
    "candidate_id": "Pq7wE2rT9yU4iO1aS6dF3",
    "webcall_url": "https://call.classet.ai/call/Pq7wE2rT9yU4iO1aS6dF3",
    "interview_panel_url": "https://call.classet.ai/interview-panel/Pq7wE2rT9yU4iO1aS6dF3"
  }
}
```

> [!TIP]
>
> We recommend setting both `send_sms` and `send_email` to `true` for optimal completed interview conversion.

> [!WARNING]
>
> If your invite send cap is exhausted, the API returns `429 Interview invite limit exceeded` and does not create the candidate. The body adds `message`, `exceeded_window`, `limit` and `retry_at`, and `Retry-After` says when to try again. `code` is `rate_limited`, the same as a request-rate 429, so tell them apart by `exceeded_window`.


## OpenAPI

````yaml POST /v2/candidates
openapi: 3.1.0
info:
  title: Classet API
  version: 2.0.3
  description: >-
    AI-powered recruiting and phone screening API.


    **API key scopes.** `read` covers every GET; any other method needs `write`
    (403 `insufficient_scope`); starting or stopping an interview also needs
    `interviews:send`. A branch-limited key sees and writes only jobs in its
    branches (not jobs with no branch) and their candidates, applications and
    calls; anything outside is a 404. An organization-group key is read-only
    across every organization in its group. Branch-limited and group keys cannot
    use organization configuration (scripts, knowledge, webhooks, message
    automations, agent settings, AI generation, organization): 403
    `restricted_key_unsupported`. `GET /v2/me` reports what the calling key can
    do.
servers:
  - url: https://api.classet.ai
    description: Production
  - url: http://localhost:8081
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /v2/candidates:
    post:
      tags:
        - Candidates
      summary: Create a candidate
      description: >-
        Create a new candidate and associate them with a job. Optionally trigger
        interview outreach via SMS and/or email. If neither send_sms nor
        send_email is set, the candidate is created without initiating the
        interview — use the returned webcall_url to share the interview link
        through your own channels. When outreach is sent, `call_id` is the id
        GET /v2/calls/{callId} resolves (v1 parity); it is null when nothing was
        sent. A 409 means a candidate with the same email or phone already
        exists on this job — its links are under `data`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  nullable: true
                  format: email
                  example: jane@example.com
                  description: Candidate's email address.
                first_name:
                  type: string
                  minLength: 1
                  example: Jane
                  description: Candidate's first name.
                last_name:
                  type: string
                  minLength: 1
                  example: Doe
                  description: Candidate's last name.
                phone:
                  type: string
                  nullable: true
                  pattern: ^\+[1-9]\d{1,14}$
                  example: '+15555555555'
                  description: >-
                    Phone number in E.164 format (e.g. `+15551234567`). Required
                    for SMS/phone call interviews.
                location:
                  type: object
                  properties:
                    city:
                      type: string
                    region:
                      type: string
                    country:
                      type: string
                    zip_code:
                      type: string
                    region_code:
                      type: string
                      nullable: true
                    country_code:
                      type: string
                      nullable: true
                    location_str:
                      type: string
                  description: Candidate's location details.
                resume_url:
                  type: string
                  format: uri
                  example: https://storage.example.com/resumes/ada.pdf
                  description: >-
                    HTTPS URL we can fetch the resume from. Internal and private
                    addresses are rejected.
                experience_entries:
                  type: array
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                      company:
                        type: string
                      current:
                        type: boolean
                      summary:
                        type: string
                      start_date:
                        type: string
                      end_date:
                        type: string
                        nullable: true
                      industry:
                        type: string
                        nullable: true
                    required:
                      - title
                  description: Structured work history entries.
                education_entries:
                  type: array
                  items:
                    type: object
                    properties:
                      school:
                        type: string
                      degree:
                        type: string
                      field_of_study:
                        type: string
                      start_date:
                        type: string
                      end_date:
                        type: string
                  description: Structured education history entries.
                skills:
                  type: array
                  items:
                    type: string
                  description: List of skills.
                summary:
                  type: string
                candidate_summary:
                  type: string
                  description: Alias for `summary` (v1 compatibility).
                custom_data:
                  type: object
                  nullable: true
                  additionalProperties:
                    nullable: true
                  description: Arbitrary structured metadata to attach to the candidate.
                external_id:
                  type: string
                  minLength: 1
                  example: ats-applicant-8812
                  description: >-
                    Your own id for this applicant. Stored and returned as
                    remote_application_id / remote_candidate_id. Not unique and
                    not used to deduplicate: use an Idempotency-Key header to
                    make a retry safe.
                job_id:
                  type: string
                  minLength: 1
                  description: >-
                    The ID of the job to associate the candidate with. v1 job
                    shortcodes are also accepted during migration.
                phone_number:
                  type: string
                  pattern: ^\+[1-9]\d{1,14}$
                  deprecated: true
                  description: >-
                    Deprecated v1 alias for `phone`. Will be removed in a future
                    version.
                experience:
                  type: array
                  items:
                    nullable: true
                  deprecated: true
                  description: >-
                    Deprecated v1 alias for `experience_entries`. Will be
                    removed in a future version.
                send_sms:
                  type: boolean
                  default: false
                  description: >-
                    Send SMS to initiate interview outreach. The candidate will
                    receive a text with a link to start their AI interview.
                send_email:
                  type: boolean
                  default: false
                  description: >-
                    Send email to initiate interview outreach. The candidate
                    will receive an email with a link to their web call
                    interview.
                force_create:
                  type: boolean
                  default: false
                  description: >-
                    Create even if a candidate with the same email or phone
                    already exists on this job. Without it, a match returns `409
                    conflict`.
                answers:
                  type: array
                  items:
                    type: object
                    properties:
                      question:
                        type: object
                        properties:
                          body:
                            type: string
                        required:
                          - body
                      answer:
                        type: object
                        properties:
                          body:
                            type: string
                        required:
                          - body
                    required:
                      - question
                      - answer
                  description: >-
                    Pre-filled answers to application questions. Each element
                    has `question: { body: string }` and `answer: { body: string
                    }`.
              required:
                - first_name
                - last_name
                - job_id
      responses:
        '200':
          description: >-
            Replayed: this repeats a create from the last 12 hours for the same
            person (same phone, email and name) and job. The existing candidate
            is returned with `replayed: true` and no candidate is created. If
            the request asks for outreach and that candidate was never
            contacted, the outreach is started on it and `interview_status` is
            `in_progress`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      candidate_id:
                        type: string
                      webcall_url:
                        type: string
                        nullable: true
                        description: >-
                          URL for the candidate to take the interview via web
                          call
                      interview_panel_url:
                        type: string
                        nullable: true
                        description: Recruiter-shareable interview panel link (v1 parity).
                      call_id:
                        type: string
                        nullable: true
                      replayed:
                        type: boolean
                        enum:
                          - true
                        description: >-
                          Present when this request repeated a create from the
                          last 12 hours for the same person and job. The
                          existing candidate is returned and none is created.
                          Read `interview_status` for whether outreach has
                          started.
                      interview_status:
                        type: string
                        enum:
                          - not_sent
                          - in_progress
                          - completed
                        description: >-
                          With `replayed`: the returned candidate's interview
                          status, as GET /v2/candidates/{id}/interview reports
                          it. `in_progress` covers an interview that is queued
                          as well as one that was sent. If `not_sent`, start one
                          with POST /v2/candidates/{id}/interview.
                    required:
                      - candidate_id
                      - webcall_url
                      - interview_panel_url
                      - call_id
                required:
                  - data
        '201':
          description: Candidate created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      candidate_id:
                        type: string
                        description: The ID of the created candidate.
                      webcall_url:
                        type: string
                        nullable: true
                        description: >-
                          URL for the candidate to take their interview via web
                          call. Share this through your own channels if you
                          didn't set `send_sms` or `send_email`.
                      interview_panel_url:
                        type: string
                        nullable: true
                        description: Recruiter-shareable interview panel link (v1 parity).
                      call_id:
                        type: string
                        nullable: true
                        description: >-
                          The flow_initiated call this send created (v1 parity).
                          Null when no outreach was sent.
                    required:
                      - candidate_id
                      - webcall_url
                      - interview_panel_url
                      - call_id
                required:
                  - data
        '402':
          description: Free-trial interview allowance exhausted
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Resource not found
                  code:
                    type: string
                    enum:
                      - not_found
                      - validation_error
                      - unauthorized
                      - forbidden
                      - insufficient_scope
                      - restricted_key_unsupported
                      - branch_out_of_scope
                      - key_misconfigured
                      - quota_exceeded
                      - rate_limited
                      - rate_limit_unavailable
                      - conflict
                      - idempotency_key_reuse
                      - candidate_opted_out
                      - recently_contacted
                      - request_in_progress
                      - unprocessable
                      - bad_request
                      - payload_too_large
                      - internal_error
                      - service_unavailable
                    example: not_found
                    description: Stable machine-readable error code.
                  request_id:
                    type: string
                    example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                    description: >-
                      Request ID, also echoed in the X-Request-Id response
                      header. Include it when reporting issues.
                required:
                  - error
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Resource not found
                  code:
                    type: string
                    enum:
                      - not_found
                      - validation_error
                      - unauthorized
                      - forbidden
                      - insufficient_scope
                      - restricted_key_unsupported
                      - branch_out_of_scope
                      - key_misconfigured
                      - quota_exceeded
                      - rate_limited
                      - rate_limit_unavailable
                      - conflict
                      - idempotency_key_reuse
                      - candidate_opted_out
                      - recently_contacted
                      - request_in_progress
                      - unprocessable
                      - bad_request
                      - payload_too_large
                      - internal_error
                      - service_unavailable
                    example: not_found
                    description: Stable machine-readable error code.
                  request_id:
                    type: string
                    example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                    description: >-
                      Request ID, also echoed in the X-Request-Id response
                      header. Include it when reporting issues.
                required:
                  - error
        '409':
          description: >-
            A candidate with the same email or phone already exists on this job.
            The body is the standard error envelope plus a `data` object for the
            existing candidate: `candidate_id`, `webcall_url` and
            `interview_panel_url`. This conflict is permanent, so don't retry
            it; use the existing candidate, or resend with `force_create: true`.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/DuplicateCandidateError'
                  - $ref: '#/components/schemas/CandidateOptedOutError'
                  - $ref: '#/components/schemas/RecentlyContactedError'
                  - type: object
                    properties:
                      error:
                        type: string
                        example: Resource not found
                      code:
                        type: string
                        enum:
                          - not_found
                          - validation_error
                          - unauthorized
                          - forbidden
                          - insufficient_scope
                          - restricted_key_unsupported
                          - branch_out_of_scope
                          - key_misconfigured
                          - quota_exceeded
                          - rate_limited
                          - rate_limit_unavailable
                          - conflict
                          - idempotency_key_reuse
                          - candidate_opted_out
                          - recently_contacted
                          - request_in_progress
                          - unprocessable
                          - bad_request
                          - payload_too_large
                          - internal_error
                          - service_unavailable
                        example: not_found
                        description: Stable machine-readable error code.
                      request_id:
                        type: string
                        example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                        description: >-
                          Request ID, also echoed in the X-Request-Id response
                          header. Include it when reporting issues.
                    required:
                      - error
        '422':
          description: Candidate is unreachable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Resource not found
                  code:
                    type: string
                    enum:
                      - not_found
                      - validation_error
                      - unauthorized
                      - forbidden
                      - insufficient_scope
                      - restricted_key_unsupported
                      - branch_out_of_scope
                      - key_misconfigured
                      - quota_exceeded
                      - rate_limited
                      - rate_limit_unavailable
                      - conflict
                      - idempotency_key_reuse
                      - candidate_opted_out
                      - recently_contacted
                      - request_in_progress
                      - unprocessable
                      - bad_request
                      - payload_too_large
                      - internal_error
                      - service_unavailable
                    example: not_found
                    description: Stable machine-readable error code.
                  request_id:
                    type: string
                    example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                    description: >-
                      Request ID, also echoed in the X-Request-Id response
                      header. Include it when reporting issues.
                required:
                  - error
        '429':
          description: Interview invite limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteLimitError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Resource not found
                  code:
                    type: string
                    enum:
                      - not_found
                      - validation_error
                      - unauthorized
                      - forbidden
                      - insufficient_scope
                      - restricted_key_unsupported
                      - branch_out_of_scope
                      - key_misconfigured
                      - quota_exceeded
                      - rate_limited
                      - rate_limit_unavailable
                      - conflict
                      - idempotency_key_reuse
                      - candidate_opted_out
                      - recently_contacted
                      - request_in_progress
                      - unprocessable
                      - bad_request
                      - payload_too_large
                      - internal_error
                      - service_unavailable
                    example: not_found
                    description: Stable machine-readable error code.
                  request_id:
                    type: string
                    example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                    description: >-
                      Request ID, also echoed in the X-Request-Id response
                      header. Include it when reporting issues.
                required:
                  - error
        '503':
          description: External mutations or invite rate limiting are not available
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Resource not found
                  code:
                    type: string
                    enum:
                      - not_found
                      - validation_error
                      - unauthorized
                      - forbidden
                      - insufficient_scope
                      - restricted_key_unsupported
                      - branch_out_of_scope
                      - key_misconfigured
                      - quota_exceeded
                      - rate_limited
                      - rate_limit_unavailable
                      - conflict
                      - idempotency_key_reuse
                      - candidate_opted_out
                      - recently_contacted
                      - request_in_progress
                      - unprocessable
                      - bad_request
                      - payload_too_large
                      - internal_error
                      - service_unavailable
                    example: not_found
                    description: Stable machine-readable error code.
                  request_id:
                    type: string
                    example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
                    description: >-
                      Request ID, also echoed in the X-Request-Id response
                      header. Include it when reporting issues.
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DuplicateCandidateError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          enum:
            - conflict
        request_id:
          type: string
        data:
          type: object
          properties:
            candidate_id:
              type: string
            webcall_url:
              type: string
              nullable: true
              description: URL for the candidate to take the interview via web call
            interview_panel_url:
              type: string
              nullable: true
              description: Recruiter-shareable interview panel link (v1 parity).
          required:
            - candidate_id
            - webcall_url
            - interview_panel_url
          description: >-
            The existing candidate. Use it instead of creating another, or retry
            with force_create.
      required:
        - error
        - code
        - data
    CandidateOptedOutError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          enum:
            - candidate_opted_out
        request_id:
          type: string
        data:
          type: object
          properties:
            candidate_id:
              type: string
          required:
            - candidate_id
          description: The opted-out candidate.
      required:
        - error
        - code
        - data
    RecentlyContactedError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          enum:
            - recently_contacted
        request_id:
          type: string
        data:
          type: object
          properties:
            candidate_id:
              type: string
            retry_at:
              type: string
              nullable: true
              description: When a send to this person on this job is accepted again.
          required:
            - candidate_id
            - retry_at
          description: The candidate that was contacted. Nothing was created or sent.
      required:
        - error
        - code
        - data
    InviteLimitError:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        code:
          type: string
          enum:
            - not_found
            - validation_error
            - unauthorized
            - forbidden
            - insufficient_scope
            - restricted_key_unsupported
            - branch_out_of_scope
            - key_misconfigured
            - quota_exceeded
            - rate_limited
            - rate_limit_unavailable
            - conflict
            - idempotency_key_reuse
            - candidate_opted_out
            - recently_contacted
            - request_in_progress
            - unprocessable
            - bad_request
            - payload_too_large
            - internal_error
            - service_unavailable
          example: not_found
          description: Stable machine-readable error code.
        request_id:
          type: string
          example: 9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f
          description: >-
            Request ID, also echoed in the X-Request-Id response header. Include
            it when reporting issues.
        message:
          type: string
          description: Which cap was hit, in words.
        exceeded_window:
          type: string
          enum:
            - burst
            - sustained
            - daily
            - monthly
          description: The send-cap window that was exceeded.
        limit:
          type: integer
          description: The cap for that window.
        retry_at:
          type: string
          description: >-
            ISO-8601 time the window frees a slot. Mirrors the Retry-After
            header.
      required:
        - error
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Your Classet API key. Create and rotate keys in Settings → API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.