# Returns AppointmentTaskV1 which has been created

Creates a resource from the request body. Validation errors return **400**; a successful create returns **201** with the created resource in `data`.

Endpoint: POST /v1/appointmenttasks
Version: 191.0.3
Security: bearerAuth, oAuthSandbox

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `oAuthSandbox` (unknown)
    oauth2

## Header parameters:

  - `Organization-ID` (string, required)
    Organization context for the request. Must match the organization authorized by the access token.

## Request body:

  - `application/json` (unknown)
    **Purpose:** Create a Appointment Task.
**Required fields:** See schema — properties marked required must be present.
**Idempotency:** Not supported.

## Request fields (application/json):

  - `appointment` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `appointment.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `taskType` (string, required)
    Enum: "SCHEDULE_RECARE", "COLLECT_PAYMENT", "COLLECT_PHONE", "COLLECT_EMAIL"

  - `skippedReason` (string)
    Enum: "WE_DID_NOT_ASK", "PATIENT_DECLINED", "PATIENT_WAS_UNABLE_TO_COMPLY", "PATIENT_DEPARTED_WITHOUT_CHECKOUT", "OTHER"

  - `comment` (string)
    Can be provided only if skippedReason has value OTHER
    Example: comments

  - `user` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `user.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

## Request examples:

  - `default` (unknown)

## Response 201:

  - `201` (unknown)
    The request was successful, record was created

## Response 201 fields (application/json):

  - `data` (object)
    This Endpoint is being rate limited. More information can be found here: https://portal.hs1api.com/guide
    Example: {}

  - `data.appointment` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.appointment.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.appointment.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.appointment.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.id` (integer)

  - `data.taskType` (string, required)
    Enum: "SCHEDULE_RECARE", "COLLECT_PAYMENT", "COLLECT_PHONE", "COLLECT_EMAIL"

  - `data.succeeded` (boolean)

  - `data.skippedReason` (string)
    Enum: "WE_DID_NOT_ASK", "PATIENT_DECLINED", "PATIENT_WAS_UNABLE_TO_COMPLY", "PATIENT_DEPARTED_WITHOUT_CHECKOUT", "OTHER"

  - `data.comment` (string)
    Can be provided only if skippedReason has value OTHER
    Example: comments

  - `data.user` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.user.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.user.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.user.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `warnings` (array)

  - `warnings.code` (string)

  - `warnings.title` (string)

  - `warnings.description` (string)

  - `warnings.source` (string)

  - `errors` (array)

## Response 400:

  - `400` (unknown)
    The request was invalid or cannot be processed

## Response 401:

  - `401` (unknown)
    Authentication is required and has failed or has not been provided

## Response 403:

  - `403` (unknown)
    The request is understood, but it has been refused or access is not allowed

## Response 404:

  - `404` (unknown)
    The requested resource is either missing or does not exist

## Response 408:

  - `408` (unknown)
    The server timed out while processing the request

## Response 429:

  - `429` (unknown)
    Rate limit exceeded

## Response 500:

  - `500` (unknown)
    An unexpected error occurred

## Response 201 examples:

  - `default` (unknown)

