---
title: "Create appointment"
description: "Use the organization gMedic account. No automatic write retries; reconcile an unknown outcome before repeating.\n\n- **Scope:** `gmedic:appointments:write`\n- **Credentials:** an API key, a client-credentials token or a person's access token\n- **Effect:** writes; not idempotent: check the outcome before you retry\n- **Limits:** request body up to 32 KB, response up to 256 KB\n- **CLI:** `arbol gmedic appointments create` · **MCP tool:** `gmedic_appointments_create`"
---

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

Path: gMedic API › Appointments

`POST /v1/gmedic/appointments`

Use the organization gMedic account. No automatic write retries; reconcile an unknown outcome before repeating.

- **Scope:** `gmedic:appointments:write`
- **Credentials:** an API key, a client-credentials token or a person's access token
- **Effect:** writes; not idempotent: check the outcome before you retry
- **Limits:** request body up to 32 KB, response up to 256 KB
- **CLI:** `arbol gmedic appointments create` · **MCP tool:** `gmedic_appointments_create`

## Authentication

Requires one of the following:

- `arbolHuman`, oauth2, scopes: `gmedic:appointments:write`
- `arbolMachine`, oauth2, scopes: `gmedic:appointments:write`
- `arbolApiKey`, http, header `Authorization`

## Request body

_Required._

- `data` (`gmedic.appointments.create.data`; object, required)
  - `title` (`gmedic.appointments.create.data.title`; string, required)
    - maxLength 255
  - `agendaId` (`gmedic.appointments.create.data.agendaId`; string, required)
    - pattern `^[1-9][0-9]{0,14}$`
  - `patientId` (`gmedic.appointments.create.data.patientId`; string, required)
    - pattern `^[1-9][0-9]{0,14}$`
  - `description` (`gmedic.appointments.create.data.description`; string, optional)
    - maxLength 255
  - `allDay` (`gmedic.appointments.create.data.allDay`; boolean, optional)
  - `block` (`gmedic.appointments.create.data.block`; boolean, optional)
  - `startsAt` (`gmedic.appointments.create.data.startsAt`; string, optional)
    - format `date-time`
  - `endsAt` (`gmedic.appointments.create.data.endsAt`; string, optional)
    - format `date-time`
  - `startDate` (`gmedic.appointments.create.data.startDate`; string, optional, deprecated) — Deprecated: use `startsAt`. Answered until 2027-01-28.
    - maxLength 20000; pattern `^[0-9]{8} [0-9]{2}:[0-9]{2}$`
  - `endDate` (`gmedic.appointments.create.data.endDate`; string, optional, deprecated) — Deprecated: use `endsAt`. Answered until 2027-01-28.
    - maxLength 20000; pattern `^[0-9]{8} [0-9]{2}:[0-9]{2}$`
  - `desiredDate` (`gmedic.appointments.create.data.desiredDate`; string, optional)
    - maxLength 20000; pattern `^[0-9]{8}$`
  - `branchOfficeId` (`gmedic.appointments.create.data.branchOfficeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `notificationMail` (`gmedic.appointments.create.data.notificationMail`; string, optional)
    - maxLength 255
  - `notificationNumber` (`gmedic.appointments.create.data.notificationNumber`; string, optional)
    - maxLength 255
  - `colorId` (`gmedic.appointments.create.data.colorId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `location` (`gmedic.appointments.create.data.location`; string, optional)
    - maxLength 255
  - `stateId` (`gmedic.appointments.create.data.stateId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `modality` (`gmedic.appointments.create.data.modality`; string, optional)
    - maxLength 20000
  - `serviceId` (`gmedic.appointments.create.data.serviceId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `authorization` (`gmedic.appointments.create.data.authorization`; string, optional)
    - maxLength 255
  - `medicalAuthorizationId` (`gmedic.appointments.create.data.medicalAuthorizationId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `authorizationSessions` (`gmedic.appointments.create.data.authorizationSessions`; integer, optional)
    - min 0; max 9007199254740991
  - `currentSessions` (`gmedic.appointments.create.data.currentSessions`; string, optional)
    - maxLength 255
  - `invoice` (`gmedic.appointments.create.data.invoice`; string, optional)
    - maxLength 255
  - `attentionTypeId` (`gmedic.appointments.create.data.attentionTypeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `cupCode` (`gmedic.appointments.create.data.cupCode`; string, optional)
    - maxLength 255
  - `consultationPurposeId` (`gmedic.appointments.create.data.consultationPurposeId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `externalCauseId` (`gmedic.appointments.create.data.externalCauseId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `medicalServiceId` (`gmedic.appointments.create.data.medicalServiceId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `servicesGroupId` (`gmedic.appointments.create.data.servicesGroupId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `serviceModalityId` (`gmedic.appointments.create.data.serviceModalityId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `viaEntryId` (`gmedic.appointments.create.data.viaEntryId`; string, optional)
    - pattern `^[1-9][0-9]{0,14}$`
- `connectionId` (`gmedic.appointments.create.connectionId`; string, optional)
  - pattern `^con_[0-9A-Za-z]{26}$`

## Example request

```json
{
  "data": {
    "title": "string",
    "description": "string",
    "allDay": true,
    "block": true,
    "startsAt": "2019-08-24T14:15:22Z",
    "endsAt": "2019-08-24T14:15:22Z",
    "startDate": "string",
    "endDate": "string",
    "desiredDate": "string",
    "agendaId": "string",
    "patientId": "string",
    "branchOfficeId": "string",
    "notificationMail": "string",
    "notificationNumber": "string",
    "colorId": "string",
    "location": "string",
    "stateId": "string",
    "modality": "string",
    "serviceId": "string",
    "authorization": "string",
    "medicalAuthorizationId": "string",
    "authorizationSessions": 0,
    "currentSessions": "string",
    "invoice": "string",
    "attentionTypeId": "string",
    "cupCode": "string",
    "consultationPurposeId": "string",
    "externalCauseId": "string",
    "medicalServiceId": "string",
    "servicesGroupId": "string",
    "serviceModalityId": "string",
    "viaEntryId": "string"
  },
  "connectionId": "string"
}
```

## Code samples

### cURL

```bash
curl https://api.getarbol.com/v1/gmedic/appointments \
  --request POST \
  --header "Authorization: Bearer $ARBOL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "data": {
    "title": "<title>",
    "agendaId": "<agendaId>",
    "patientId": "<patientId>"
  }
}'
```

### TypeScript

```typescript
import { createClient } from "@arbol-ai/sdk";

const arbol = createClient({
  baseUrl: "https://api.getarbol.com",
  token: process.env.ARBOL_API_KEY!,
});

const { data } = await arbol.gmedic.appointments.create({
  data: {
    title: "<title>",
    agendaId: "<agendaId>",
    patientId: "<patientId>",
  },
});
```

### Rust

```rust
use arbol_sdk::{types, Client, Credential};

let arbol = Client::new(Credential::ApiKey(std::env::var("ARBOL_API_KEY")?))?;

let data = arbol
    .gmedic()
    .appointments()
    .create(&types::GmedicAppointmentsCreateInput {
        data: types::GmedicAppointmentsCreateInputData {
            title: "<title>".into(),
            agenda_id: "<agendaId>".into(),
            patient_id: "<patientId>".into(),
            description: None,
            all_day: None,
            block: None,
            starts_at: None,
            ends_at: None,
            start_date: None,
            end_date: None,
            desired_date: None,
            branch_office_id: None,
            notification_mail: None,
            notification_number: None,
            color_id: None,
            location: None,
            state_id: None,
            modality: None,
            service_id: None,
            authorization: None,
            medical_authorization_id: None,
            authorization_sessions: None,
            current_sessions: None,
            invoice: None,
            attention_type_id: None,
            cup_code: None,
            consultation_purpose_id: None,
            external_cause_id: None,
            medical_service_id: None,
            services_group_id: None,
            service_modality_id: None,
            via_entry_id: None,
        },
        connection_id: None,
    })
    .await?;
```

### CLI

```bash
arbol gmedic appointments create --input - <<'JSON'
{
  "data": {
    "title": "<title>",
    "agendaId": "<agendaId>",
    "patientId": "<patientId>"
  }
}
JSON
```

### MCP

```json
{
  "name": "gmedic_appointments_create",
  "arguments": {
    "data": {
      "title": "<title>",
      "agendaId": "<agendaId>",
      "patientId": "<patientId>"
    }
  }
}
```

## Responses

### 200

Successful operation.

#### Example

```json
{
  "success": true,
  "data": {
    "id": "string",
    "key": "string",
    "createdAt": "string",
    "creationDate": "string",
    "updatedAt": "string",
    "modificationDate": "string",
    "title": "string",
    "description": "string",
    "allDay": true,
    "block": true,
    "readOnly": true,
    "startsAt": "2019-08-24T14:15:22Z",
    "endsAt": "2019-08-24T14:15:22Z",
    "startDate": "string",
    "endDate": "string",
    "desiredDate": "string",
    "opportunityIndicator": -2147483648,
    "mainAttendantId": "string",
    "mainAttendantName": "string",
    "mainAttendantIdentification": "string",
    "mainAttendantDocumentType": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "mainAttendantPhone": "string",
    "mainAttendantMobile": "string",
    "mainAttendantEmail": "string",
    "appointmentColor": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "status": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "state": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "rejectReason": {
      "id": "string",
      "name": "string",
      "label": "string",
      "value": "string"
    },
    "modality": "FACE_TO_FACE",
    "videocallProvider": "string",
    "meetURL": "string",
    "agendaId": "string",
    "agendaName": "string",
    "selfServiceAllowCancel": true,
    "selfServiceAllowReschedule": true,
    "branchOffice": "string",
    "location": "string",
    "service": "string",
    "serviceId": "string",
    "authorization": "string",
    "medicalAuthorizationId": "string",
    "authorizationSessions": 0,
    "currentSessions": "string",
    "entidad": "string",
    "invoice": "string",
    "userType": "string",
    "cupCode": "string",
    "cupName": "string",
    "mainDiagnosticCode": "string",
    "mainDiagnosticName": "string",
    "consultationPurposeId": "string",
    "consultationPurposeCode": "string",
    "consultationPurposeName": "string",
    "externalCauseId": "string",
    "externalCauseCode": "string",
    "externalCauseName": "string",
    "medicalServiceId": "string",
    "medicalServiceCode": "string",
    "medicalServiceName": "string",
    "servicesGroupId": "string",
    "servicesGroupCode": "string",
    "servicesGroupName": "string",
    "serviceModalityId": "string",
    "serviceModalityCode": "string",
    "serviceModalityName": "string",
    "viaEntryId": "string",
    "viaEntryCode": "string",
    "viaEntryName": "string",
    "userObjectId": "string",
    "personCreator": "string",
    "date": "string",
    "time": "string"
  },
  "error": null,
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.200.success`; boolean, required)
  - one of `true`
- `data` (`gmedic.appointments.create.response.200.data`; object, required)
  - `id` (`gmedic.appointments.create.response.200.data.id`; string, required)
    - pattern `^[1-9][0-9]{0,14}$`
  - `key` (`gmedic.appointments.create.response.200.data.key`; string | null, optional)
    - maxLength 20000
  - `createdAt` (`gmedic.appointments.create.response.200.data.createdAt`; string | null, optional)
    - maxLength 20000
  - `creationDate` (`gmedic.appointments.create.response.200.data.creationDate`; string | null, optional, deprecated) — Deprecated: use `createdAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `updatedAt` (`gmedic.appointments.create.response.200.data.updatedAt`; string | null, optional)
    - maxLength 20000
  - `modificationDate` (`gmedic.appointments.create.response.200.data.modificationDate`; string | null, optional, deprecated) — Deprecated: use `updatedAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `title` (`gmedic.appointments.create.response.200.data.title`; string | null, optional)
    - maxLength 20000
  - `description` (`gmedic.appointments.create.response.200.data.description`; string | null, optional)
    - maxLength 20000
  - `allDay` (`gmedic.appointments.create.response.200.data.allDay`; boolean | null, optional)
  - `block` (`gmedic.appointments.create.response.200.data.block`; boolean | null, optional)
  - `readOnly` (`gmedic.appointments.create.response.200.data.readOnly`; boolean | null, optional)
  - `startsAt` (`gmedic.appointments.create.response.200.data.startsAt`; string | null, optional)
    - format `date-time`
  - `endsAt` (`gmedic.appointments.create.response.200.data.endsAt`; string | null, optional)
    - format `date-time`
  - `startDate` (`gmedic.appointments.create.response.200.data.startDate`; string | null, optional, deprecated) — Deprecated: use `startsAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `endDate` (`gmedic.appointments.create.response.200.data.endDate`; string | null, optional, deprecated) — Deprecated: use `endsAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `desiredDate` (`gmedic.appointments.create.response.200.data.desiredDate`; string | null, optional)
    - maxLength 20000
  - `opportunityIndicator` (`gmedic.appointments.create.response.200.data.opportunityIndicator`; integer | null, optional)
    - min -2147483648; max 2147483647
  - `mainAttendantId` (`gmedic.appointments.create.response.200.data.mainAttendantId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `mainAttendantName` (`gmedic.appointments.create.response.200.data.mainAttendantName`; string | null, optional)
    - maxLength 20000
  - `mainAttendantIdentification` (`gmedic.appointments.create.response.200.data.mainAttendantIdentification`; string | null, optional)
    - maxLength 20000
  - `mainAttendantDocumentType` (`gmedic.appointments.create.response.200.data.mainAttendantDocumentType`; object | null, optional)
    - `id` (`gmedic.appointments.create.response.200.data.mainAttendantDocumentType.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.appointments.create.response.200.data.mainAttendantDocumentType.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.appointments.create.response.200.data.mainAttendantDocumentType.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.appointments.create.response.200.data.mainAttendantDocumentType.value`; string | null, optional)
      - maxLength 20000
  - `mainAttendantPhone` (`gmedic.appointments.create.response.200.data.mainAttendantPhone`; string | null, optional)
    - maxLength 20000
  - `mainAttendantMobile` (`gmedic.appointments.create.response.200.data.mainAttendantMobile`; string | null, optional)
    - maxLength 20000
  - `mainAttendantEmail` (`gmedic.appointments.create.response.200.data.mainAttendantEmail`; string | null, optional)
    - maxLength 20000
  - `appointmentColor` (`gmedic.appointments.create.response.200.data.appointmentColor`; object | null, optional)
    - `id` (`gmedic.appointments.create.response.200.data.appointmentColor.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.appointments.create.response.200.data.appointmentColor.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.appointments.create.response.200.data.appointmentColor.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.appointments.create.response.200.data.appointmentColor.value`; string | null, optional)
      - maxLength 20000
  - `status` (`gmedic.appointments.create.response.200.data.status`; object | null, optional)
    - `id` (`gmedic.appointments.create.response.200.data.status.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.appointments.create.response.200.data.status.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.appointments.create.response.200.data.status.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.appointments.create.response.200.data.status.value`; string | null, optional)
      - maxLength 20000
  - `state` (`gmedic.appointments.create.response.200.data.state`; object | null, optional, deprecated) — Deprecated: use `status`. Answered until 2027-01-28.
    - `id` (`gmedic.appointments.create.response.200.data.state.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.appointments.create.response.200.data.state.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.appointments.create.response.200.data.state.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.appointments.create.response.200.data.state.value`; string | null, optional)
      - maxLength 20000
  - `rejectReason` (`gmedic.appointments.create.response.200.data.rejectReason`; object | null, optional)
    - `id` (`gmedic.appointments.create.response.200.data.rejectReason.id`; string, required)
      - pattern `^[1-9][0-9]{0,14}$`
    - `name` (`gmedic.appointments.create.response.200.data.rejectReason.name`; string | null, optional)
      - maxLength 20000
    - `label` (`gmedic.appointments.create.response.200.data.rejectReason.label`; string | null, optional)
      - maxLength 20000
    - `value` (`gmedic.appointments.create.response.200.data.rejectReason.value`; string | null, optional)
      - maxLength 20000
  - `modality` (`gmedic.appointments.create.response.200.data.modality`; string | null, optional)
    - one of `"FACE_TO_FACE"`, `"VIRTUAL"`, `"HOME_VISIT"`, `"NOT_APPLICABLE"`, `null`
  - `videocallProvider` (`gmedic.appointments.create.response.200.data.videocallProvider`; string | null, optional)
    - maxLength 20000
  - `meetURL` (`gmedic.appointments.create.response.200.data.meetURL`; string | null, optional)
    - maxLength 20000
  - `agendaId` (`gmedic.appointments.create.response.200.data.agendaId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `agendaName` (`gmedic.appointments.create.response.200.data.agendaName`; string | null, optional)
    - maxLength 20000
  - `selfServiceAllowCancel` (`gmedic.appointments.create.response.200.data.selfServiceAllowCancel`; boolean | null, optional)
  - `selfServiceAllowReschedule` (`gmedic.appointments.create.response.200.data.selfServiceAllowReschedule`; boolean | null, optional)
  - `branchOffice` (`gmedic.appointments.create.response.200.data.branchOffice`; string | null, optional)
    - maxLength 20000
  - `location` (`gmedic.appointments.create.response.200.data.location`; string | null, optional)
    - maxLength 20000
  - `service` (`gmedic.appointments.create.response.200.data.service`; string | null, optional)
    - maxLength 20000
  - `serviceId` (`gmedic.appointments.create.response.200.data.serviceId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `authorization` (`gmedic.appointments.create.response.200.data.authorization`; string | null, optional)
    - maxLength 20000
  - `medicalAuthorizationId` (`gmedic.appointments.create.response.200.data.medicalAuthorizationId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `authorizationSessions` (`gmedic.appointments.create.response.200.data.authorizationSessions`; integer | null, optional)
    - min 0; max 9007199254740991
  - `currentSessions` (`gmedic.appointments.create.response.200.data.currentSessions`; string | null, optional)
    - maxLength 20000
  - `entidad` (`gmedic.appointments.create.response.200.data.entidad`; string | null, optional)
    - maxLength 20000
  - `invoice` (`gmedic.appointments.create.response.200.data.invoice`; string | null, optional)
    - maxLength 20000
  - `userType` (`gmedic.appointments.create.response.200.data.userType`; string | null, optional)
    - maxLength 20000
  - `cupCode` (`gmedic.appointments.create.response.200.data.cupCode`; string | null, optional)
    - maxLength 20000
  - `cupName` (`gmedic.appointments.create.response.200.data.cupName`; string | null, optional)
    - maxLength 20000
  - `mainDiagnosticCode` (`gmedic.appointments.create.response.200.data.mainDiagnosticCode`; string | null, optional)
    - maxLength 20000
  - `mainDiagnosticName` (`gmedic.appointments.create.response.200.data.mainDiagnosticName`; string | null, optional)
    - maxLength 20000
  - `consultationPurposeId` (`gmedic.appointments.create.response.200.data.consultationPurposeId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `consultationPurposeCode` (`gmedic.appointments.create.response.200.data.consultationPurposeCode`; string | null, optional)
    - maxLength 20000
  - `consultationPurposeName` (`gmedic.appointments.create.response.200.data.consultationPurposeName`; string | null, optional)
    - maxLength 20000
  - `externalCauseId` (`gmedic.appointments.create.response.200.data.externalCauseId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `externalCauseCode` (`gmedic.appointments.create.response.200.data.externalCauseCode`; string | null, optional)
    - maxLength 20000
  - `externalCauseName` (`gmedic.appointments.create.response.200.data.externalCauseName`; string | null, optional)
    - maxLength 20000
  - `medicalServiceId` (`gmedic.appointments.create.response.200.data.medicalServiceId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `medicalServiceCode` (`gmedic.appointments.create.response.200.data.medicalServiceCode`; string | null, optional)
    - maxLength 20000
  - `medicalServiceName` (`gmedic.appointments.create.response.200.data.medicalServiceName`; string | null, optional)
    - maxLength 20000
  - `servicesGroupId` (`gmedic.appointments.create.response.200.data.servicesGroupId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `servicesGroupCode` (`gmedic.appointments.create.response.200.data.servicesGroupCode`; string | null, optional)
    - maxLength 20000
  - `servicesGroupName` (`gmedic.appointments.create.response.200.data.servicesGroupName`; string | null, optional)
    - maxLength 20000
  - `serviceModalityId` (`gmedic.appointments.create.response.200.data.serviceModalityId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `serviceModalityCode` (`gmedic.appointments.create.response.200.data.serviceModalityCode`; string | null, optional)
    - maxLength 20000
  - `serviceModalityName` (`gmedic.appointments.create.response.200.data.serviceModalityName`; string | null, optional)
    - maxLength 20000
  - `viaEntryId` (`gmedic.appointments.create.response.200.data.viaEntryId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `viaEntryCode` (`gmedic.appointments.create.response.200.data.viaEntryCode`; string | null, optional)
    - maxLength 20000
  - `viaEntryName` (`gmedic.appointments.create.response.200.data.viaEntryName`; string | null, optional)
    - maxLength 20000
  - `userObjectId` (`gmedic.appointments.create.response.200.data.userObjectId`; string | null, optional)
    - pattern `^[1-9][0-9]{0,14}$`
  - `personCreator` (`gmedic.appointments.create.response.200.data.personCreator`; string | null, optional)
    - maxLength 20000
  - `date` (`gmedic.appointments.create.response.200.data.date`; string | null, optional, deprecated) — Deprecated: use `startsAt`. Answered until 2027-01-28.
    - maxLength 20000
  - `time` (`gmedic.appointments.create.response.200.data.time`; string | null, optional, deprecated) — Deprecated: use `startsAt`. Answered until 2027-01-28.
    - maxLength 20000
- `error` (`gmedic.appointments.create.response.200.error`; unknown, required)
- `metadata` (`gmedic.appointments.create.response.200.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.200.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 400

`INVALID_INPUT`: The request does not match the published schema.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "INVALID_INPUT",
    "message": "string",
    "retryable": false,
    "data": {
      "issues": [
        {
          "path": "string",
          "message": "string"
        }
      ]
    }
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.400.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.400.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.400.error`; object, required) — The request does not match the published schema.
  - `code` (`gmedic.appointments.create.response.400.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INVALID_INPUT"`
  - `message` (`gmedic.appointments.create.response.400.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.400.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.400.error.data`; object, required)
    - `issues` (`gmedic.appointments.create.response.400.error.data.issues`; array<object>, optional)
      - `path` (`gmedic.appointments.create.response.400.error.data.issues.path`; string, required) — RFC 6901 JSON Pointer to the refused field; empty for the whole input.
        - maxLength 256
      - `message` (`gmedic.appointments.create.response.400.error.data.issues.message`; string, required)
        - maxLength 256
- `metadata` (`gmedic.appointments.create.response.400.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.400.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 401

`UNAUTHORIZED`: A valid access token is required.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.401.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.401.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.401.error`; object, required) — A valid access token is required.
  - `code` (`gmedic.appointments.create.response.401.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNAUTHORIZED"`
  - `message` (`gmedic.appointments.create.response.401.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.401.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.401.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.401.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.401.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 403

`FORBIDDEN`: The token does not authorize this operation.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "FORBIDDEN",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.403.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.403.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.403.error`; object, required) — The token does not authorize this operation.
  - `code` (`gmedic.appointments.create.response.403.error.code`; string, required) — The failure code, stable across releases.
    - one of `"FORBIDDEN"`
  - `message` (`gmedic.appointments.create.response.403.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.403.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.403.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.403.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.403.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 404

- `CONNECTION_NOT_FOUND`: This organization has no gMedic connection with this id.
- `RECORD_NOT_FOUND`: gMedic has no record with one of the ids sent.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "CONNECTION_NOT_FOUND",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.404.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.404.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.404.error`; one of, required)
  - one of: `GmedicConnectionNotFoundFailure`, `GmedicRecordNotFoundFailure`
  - discriminator: `code`
- `metadata` (`gmedic.appointments.create.response.404.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.404.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 409

`NOT_CONFIGURED`: This organization has no verified gMedic connection.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "NOT_CONFIGURED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.409.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.409.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.409.error`; object, required) — This organization has no verified gMedic connection.
  - `code` (`gmedic.appointments.create.response.409.error.code`; string, required) — The failure code, stable across releases.
    - one of `"NOT_CONFIGURED"`
  - `message` (`gmedic.appointments.create.response.409.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.409.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.409.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.409.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.409.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 413

`REQUEST_TOO_LARGE`: The request exceeds the allowed size.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "REQUEST_TOO_LARGE",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.413.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.413.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.413.error`; object, required) — The request exceeds the allowed size.
  - `code` (`gmedic.appointments.create.response.413.error.code`; string, required) — The failure code, stable across releases.
    - one of `"REQUEST_TOO_LARGE"`
  - `message` (`gmedic.appointments.create.response.413.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.413.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.413.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.413.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.413.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 415

`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UNSUPPORTED_MEDIA_TYPE",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.415.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.415.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.415.error`; object, required) — The request content type is not supported.
  - `code` (`gmedic.appointments.create.response.415.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UNSUPPORTED_MEDIA_TYPE"`
  - `message` (`gmedic.appointments.create.response.415.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.415.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.415.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.415.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.415.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 422

`PROVIDER_INPUT_REJECTED`: gMedic rejected the supplied fields.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "PROVIDER_INPUT_REJECTED",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.422.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.422.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.422.error`; object, required) — gMedic rejected the supplied fields.
  - `code` (`gmedic.appointments.create.response.422.error.code`; string, required) — The failure code, stable across releases.
    - one of `"PROVIDER_INPUT_REJECTED"`
  - `message` (`gmedic.appointments.create.response.422.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.422.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.422.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.422.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.422.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 429

`RATE_LIMITED`: The request rate limit was exceeded. Try again later.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "RATE_LIMITED",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.429.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.429.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.429.error`; object, required) — The request rate limit was exceeded. Try again later.
  - `code` (`gmedic.appointments.create.response.429.error.code`; string, required) — The failure code, stable across releases.
    - one of `"RATE_LIMITED"`
  - `message` (`gmedic.appointments.create.response.429.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.429.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `true`
  - `data` (`gmedic.appointments.create.response.429.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.429.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.429.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 500

`INTERNAL_ERROR`: The service could not complete the operation.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.500.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.500.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.500.error`; object, required) — The service could not complete the operation.
  - `code` (`gmedic.appointments.create.response.500.error.code`; string, required) — The failure code, stable across releases.
    - one of `"INTERNAL_ERROR"`
  - `message` (`gmedic.appointments.create.response.500.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.500.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `false`
  - `data` (`gmedic.appointments.create.response.500.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.500.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.500.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 502

- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.
- `PROVIDER_ACCESS_REJECTED`: The configured gMedic account did not authorize this operation.
- `PROVIDER_RESPONSE_INVALID`: gMedic returned an unexpected response.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "OUTCOME_UNKNOWN",
    "message": "string",
    "retryable": false,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.502.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.502.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.502.error`; one of, required)
  - one of: `OutcomeUnknownFailure`, `GmedicProviderAccessRejectedFailure`, `GmedicProviderResponseInvalidFailure`
  - discriminator: `code`
- `metadata` (`gmedic.appointments.create.response.502.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.502.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 503

- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.
- `CATALOG_SEARCH_INCOMPLETE`: The service catalog search could not be completed within its limits. Service absence cannot be concluded.
- `PROVIDER_UNAVAILABLE`: gMedic is temporarily unavailable.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UPSTREAM_UNAVAILABLE",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.503.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.503.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.503.error`; one of, required)
  - one of: `UpstreamUnavailableFailure`, `GmedicCatalogSearchIncompleteFailure`, `GmedicProviderUnavailableFailure`
  - discriminator: `code`
- `metadata` (`gmedic.appointments.create.response.503.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.503.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.

### 504

`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.

#### Example

```json
{
  "success": false,
  "data": null,
  "error": {
    "code": "UPSTREAM_TIMEOUT",
    "message": "string",
    "retryable": true,
    "data": {}
  },
  "metadata": {
    "requestId": "string"
  }
}
```

- `success` (`gmedic.appointments.create.response.504.success`; boolean, required)
  - one of `false`
- `data` (`gmedic.appointments.create.response.504.data`; unknown, required)
- `error` (`gmedic.appointments.create.response.504.error`; object, required) — The upstream service did not respond before its deadline.
  - `code` (`gmedic.appointments.create.response.504.error.code`; string, required) — The failure code, stable across releases.
    - one of `"UPSTREAM_TIMEOUT"`
  - `message` (`gmedic.appointments.create.response.504.error.message`; string, required) — What went wrong, for people; it never contains input values.
  - `retryable` (`gmedic.appointments.create.response.504.error.retryable`; boolean, required) — Whether repeating the same request may succeed.
    - one of `true`
  - `data` (`gmedic.appointments.create.response.504.error.data`; object, required) — No fields.
- `metadata` (`gmedic.appointments.create.response.504.metadata`; object, required) — What every answer carries besides its data or error.
  - `requestId` (`gmedic.appointments.create.response.504.metadata.requestId`; string, required) — Request correlation identifier, also sent as X-Request-Id.


Source: https://docs.getarbol.com/api/gmedic/appointments/create/index.md
