# Create a new Invitation

Creates a new Invitation resource.

Endpoint: POST /invitations
Version: v1
Security: basic_auth

## Request fields (application/json):

  - `package` (string, required)
    `slug` of the associated package.
    Example: driver_pro

  - `candidate_id` (string, required)
    ID of the Candidate for whom the Invitation is created.
    Example: 551564b7865af96a28b13f36

  - `node` (string)
    Required for hierarchy-enabled accounts.
`custom_id` of the associated node.

  - `work_locations` (array)
    Required for hierarchy-enabled accounts.
Array of locations described using country, state, and city. When country is not specified defaults to US. State is required for US candidates. Country is required for non-US candidates.

  - `work_locations.country` (string)
    The country in ISO-3166 alpha-2 format.
    Example: US

  - `work_locations.state` (string, required)
    The two letter state code.
    Example: CA

  - `work_locations.city` (string)
    Name of the city
    Example: San Francisco

  - `tags` (array)
    Array of tags for the Report.

## Response 201 fields (application/json):

  - `id` (string)
    ID of the resource.
    Example: e44aa283528e6fde7d542194

  - `object` (string)
    Enum: "invitation"

  - `uri` (string)
    URI of the resource.
    Example: /v1/invitations/e44aa283528e6fde7d542194

  - `invitation_url` (string)
    URL for the Invitation.
    Example: https://apply.checkr.com/invite/try-checkr/290f9d6d6e46/test

  - `status` (string)
    Status of the Invitation.
    Enum: "pending", "completed", "expired"

  - `created_at` (string)
    Time at which the Invitation was created.
    Example: 2015-05-14T17:45:34Z

  - `expires_at` (string)
    Time at which the Invitation will expire.
    Example: 2015-05-21T17:45:34Z

  - `completed_at` (string)
    Time at which the Invitation was completed by the candidate.
    Example: null

  - `deleted_at` (string)
    Time at which the Invitation was deleted.
    Example: null

  - `package` (string)
    Package associated with the Invitation.
    Example: driver_pro

  - `candidate_id` (string)
    ID of the Candidate to whom the Invitation was sent.
    Example: 551564b7865af96a28b13f36

  - `report_id` (string)
    ID of the Report created by the completion of this Invitation. Will be null if the Invitation has not yet been completed.
    Example: null

  - `archived` (boolean)
    Returns `true` if the invitation is archived.
    Example: false

  - `archived_info` (object)
    Information relating to an archived report or invitation

  - `archived_info.time` (string)
    Time the report or invitation was archived
    Example: 2023-08-29T23:15:34Z

  - `archived_info.user` (object)
    User information about the archiver

  - `archived_info.user.email` (string)
    User's email address
    Example: john.smith@gmail.com

  - `archived_info.user.id` (string)
    User's ID
    Example: 1234abcd5678

## Response 400 fields (application/json):

  - `error` (string)
    Example: Dl number 'F211165' does not match the license number format in CA

## Response 401 fields (application/json):

  - `error` (string)
    Example: Bad authentication error

## Response 403 fields (application/json):

  - `error` (string)
    Example: You do not have permission to access the requested resource

## Response 404 fields (application/json):

  - `error` (string)
    Example: Package not found

