Create Appointment Type

Create a new appointment type

POST/calendar/appointment-types
Requires Bearer authentication

Create a new appointment type for your organization. Appointment types define the services clients can book.

Request Body

namestringrequired

Name of the appointment type (e.g., 'Tax Consultation').

durationMinutesintegerrequired

Duration in minutes.

descriptionstring

Description shown on booking page.

colorstring

Color for calendar display (hex code). Defaults to #3b82f6.

bufferBeforeMinutesinteger

Buffer time before appointments.

bufferAfterMinutesinteger

Buffer time after appointments.

maxPerDayinteger

Maximum appointments of this type per day.

maxPerWeekinteger

Maximum appointments of this type per week.

maxPerMonthinteger

Maximum appointments of this type per month.

minNoticeHoursinteger

Minimum hours notice required. Defaults to 24.

maxDaysAheadinteger

How far ahead clients can book. Defaults to 60 days.

requiresConfirmationboolean

Whether appointments require manual confirmation. Defaults to false.

confirmWithinHoursinteger

Hours to confirm before auto-cancellation.

bookingQuestionsarray

Custom questions to ask during booking.

scheduleIdstring

ID of named schedule to use for availability.

isActiveboolean

Whether this type is bookable. Defaults to true.

POST/calendar/appointment-types
curl -X POST "https://api.vastal.agency/v1/calendar/appointment-types" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "name": "Strategy Call",
  "durationMinutes": 30,
  "description": "Quick 30-minute strategy session",
  "color": "#10b981",
  "minNoticeHours": 48,
  "maxPerDay": 4,
  "bookingQuestions": [
    {
      "id": "q1",
      "type": "textarea",
      "label": "What would you like to discuss?",
      "required": true
    }
  ]
}'
200Success
{
"appointmentType": {
  "id": "type_new123",
  "orgId": "org_xyz789",
  "name": "Strategy Call",
  "description": "Quick 30-minute strategy session",
  "durationMinutes": 30,
  "color": "#10b981",
  "minNoticeHours": 48,
  "maxDaysAhead": 60,
  "maxPerDay": 4,
  "requiresConfirmation": false,
  "bookingQuestions": [
    {
      "id": "q1",
      "type": "textarea",
      "label": "What would you like to discuss?",
      "required": true
    }
  ],
  "isActive": true,
  "sortOrder": 2,
  "createdAt": "2024-01-20T12:00:00Z"
}
}