Create Appointment

Create a new appointment (manual booking)

POST/calendar/appointments
Requires Bearer authentication

Create a new appointment manually. The end time is automatically calculated based on the appointment type's duration.

Request Body

appointment_type_idstringrequired

The ID of the appointment type.

start_timestringrequired

Appointment start time (ISO 8601 format).

client_namestringrequired

Client's full name.

client_emailstring

Client's email address.

client_phonestring

Client's phone number.

client_languagestring

Client's preferred language. Defaults to 'en'.

client_notesstring

Notes from the client.

internal_notesstring

Internal notes (not visible to client).

POST/calendar/appointments
curl -X POST "https://api.vastal.agency/v1/calendar/appointments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "appointment_type_id": "type_def456",
  "start_time": "2024-01-25T14:00:00Z",
  "client_name": "Jane Doe",
  "client_email": "jane@example.com",
  "client_phone": "+1234567890"
}'
200Success
{
"appointment": {
  "id": "apt_new123",
  "org_id": "org_xyz789",
  "appointment_type_id": "type_def456",
  "start_time": "2024-01-25T14:00:00Z",
  "end_time": "2024-01-25T15:00:00Z",
  "client_name": "Jane Doe",
  "client_email": "jane@example.com",
  "client_phone": "+1234567890",
  "status": "confirmed",
  "confirmed_at": "2024-01-20T12:00:00Z",
  "source": "manual",
  "appointment_type": {
    "id": "type_def456",
    "name": "Tax Consultation",
    "duration_minutes": 60,
    "color": "#3b82f6"
  }
}
}
400Bad Request
{
"error": "appointment_type_id, start_time, and client_name are required"
}