Astrocal
API ReferenceAvailabilityV1Event typesIdAvailability

Set availability rules for an event type

Replaces all availability rules for an event type. Rules define recurring weekly time windows when the event type can be booked. Pass an empty `rules` array to clear all availability.

PUT
/v1/event-types/{id}/availability

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/event-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/availability" \  -H "Content-Type: application/json" \  -d '{    "rules": [      {        "day_of_week": 0,        "start_time": "string",        "end_time": "string"      }    ],    "timezone": "string"  }'
{
  "event_type_id": "a4ec4c3c-a3de-4a8a-983f-1791e72cea83",
  "timezone": "string",
  "rules": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "event_type_id": "a4ec4c3c-a3de-4a8a-983f-1791e72cea83",
      "day_of_week": 0,
      "start_time": "string",
      "end_time": "string",
      "created_at": "string"
    }
  ]
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}