# Create block.

Create block.

Endpoint: POST /blocks
Version: 1.0.0
Security: Token

## Request fields (application/json):

  - `company_team_member_ids` (array,null)
    The IDs of the company team members assigned to the block.
    Example: ["123e4567-e89b-12d3-a456-426614174000"]

  - `user_ids` (array,null)
    The IDs of the users assigned to the block.
    Example: ["123e4567-e89b-12d3-a456-426614174000"]

  - `start_at` (string, required)
    The start time of the block (ISO 8601 format).
    Example: "2020-10-04T12:15:00Z"

  - `end_at` (string, required)
    The end time of the block (ISO 8601 format).
    Example: "2020-10-04T12:30:00Z"

  - `title` (string, required)
    The title of the block.
    Example: "Other appointment"

  - `description` (string,null)
    The description of the block.
    Example: "This is a description of the block."

## Response 201 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "success"

  - `data` (object)
    A calendar event.

  - `data.id` (string)
    The ID of the calendar event.
    Example: "123e4567-e89b-12d3-a456-426614174000"

  - `data.type` (string)
    The type of the calendar event.
    Enum: "APPOINTMENT", "CALENDAR_BLOCK", "EXTERNAL", "BUFFER", "DECLINED_APPOINTMENT", "UNSCHEDULED_APPOINTMENT"

  - `data.title` (string)
    The title of the calendar event.
    Example: "Other appointment"

  - `data.description` (string,null)
    The description of the calendar event.
    Example: "sdjsudsudsds"

  - `data.start_at` (string,null)
    The start time of the calendar event (ISO 8601 format).
    Example: "2020-10-04T12:15:00Z"

  - `data.end_at` (string,null)
    The end time of the calendar event (ISO 8601 format).
    Example: "2020-10-04T12:30:00Z"

  - `data.is_all_day` (boolean)
    Is the calendar event all day?
    Example: true

  - `data.duration` (integer)
    The duration of the calendar event in minutes.
    Example: 60

  - `data.is_busy` (boolean)
    Is the calendar event busy?
    Example: true

  - `data.requires_confirmation` (boolean)
    Does the calendar event require confirmation?
    Example: true

  - `timestamp` (string,null)
    The request timestamp (ISO 8601).
    Example: "2021-06-30T20:30:00Z"

## Response 422 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "fail"

## Response 500 fields (application/json):

  - `status` (string, required)
    What was the state of the request?
    Example: "error"

  - `message` (string, required)
    The error message.
    Example: "{ApiError message.}"

  - `code` (integer,null)
    A numeric code corresponding to the error.
    Example: 500


