Skip to reference
AvailKit/ developers

API reference

Read the current endpoints and schemas. Enable JavaScript to use the interactive explorer.

Download OpenAPI JSON · First booking tutorial · Client authority

The explorer sends requests only after an explicit action with an in-memory bearer credential. It omits cookies. Account/passkey and public guest operations remain reference-only. Mutations change real data in the credential’s environment; there is no automatic mutation retry.

Endpoints

Generated from the current canonical OpenAPI contract
Method and pathOperation
GET /v1/workspaces/{workspaceId}/resourceslistResources
POST /v1/workspaces/{workspaceId}/resourcescreateResource
GET /v1/workspaces/{workspaceId}/resources/{resourceId}/hoursgetHours
PUT /v1/workspaces/{workspaceId}/resources/{resourceId}/hourssetHours
GET /v1/workspaces/{workspaceId}/offeringslistOfferings
POST /v1/workspaces/{workspaceId}/offeringscreateOffering
GET /v1/workspaces/{workspaceId}/availabilityavailability
GET /v1/workspaces/{workspaceId}/bookingslistBookings
POST /v1/workspaces/{workspaceId}/bookingsbook
POST /v1/workspaces/{workspaceId}/bookings/{bookingId}/cancelcancel
GET /v1/workspaces/{workspaceId}/eventsevents
GET /v1/workspaces/{workspaceId}/resources/{resourceId}getResource
PUT /v1/workspaces/{workspaceId}/resources/{resourceId}updateResource
GET /v1/workspaces/{workspaceId}/offerings/{offeringId}getOffering
PUT /v1/workspaces/{workspaceId}/offerings/{offeringId}updateOffering
GET /v1/workspaces/{workspaceId}/bookings/{bookingId}getBooking
GET /v1/workspaces/{workspaceId}/webhookslistWebhooks
POST /v1/workspaces/{workspaceId}/webhookscreateWebhook
POST /v1/workspaces/{workspaceId}/webhooks/{subscriptionId}/disabledisableWebhook
GET /v1/workspaces/{workspaceId}/webhooks/{subscriptionId}/deliverieslistWebhookDeliveries
GET /v1/workspaces/{workspaceId}/usagegetUsage
POST /v1/workspaces/{workspaceId}/bookings/{bookingId}/reschedulerescheduleBooking
POST /v1/workspaces/{workspaceId}/resources/{resourceId}/archivearchiveResource
POST /v1/workspaces/{workspaceId}/offerings/{offeringId}/archivearchiveOffering
POST /v1/workspaces/{workspaceId}/maintenance/historypruneHistory
GET /v1/workspaces/{workspaceId}/customerslistCustomers
POST /v1/workspaces/{workspaceId}/customerscreateCustomer
GET /v1/workspaces/{workspaceId}/customers/{customerId}getCustomer
PUT /v1/workspaces/{workspaceId}/customers/{customerId}replaceCustomer
POST /v1/workspaces/{workspaceId}/customers/{customerId}/archivearchiveCustomer
POST /v1/workspaces/{workspaceId}/customers/{customerId}/eraseeraseCustomer
POST /v1/workspaces/{workspaceId}/maintenance/expired-replayspruneExpiredReplays
GET /v1/human/browserhuman_browser
GET /v1/human/sessionhuman_session
GET /v1/human/credentialshuman_credentials
GET /v1/human/keyshuman_keys
POST /v1/human/keyshuman_issue_key
POST /v1/human/enroll/starthuman_enroll_start
POST /v1/human/enroll/finishhuman_enroll_finish
POST /v1/human/login/starthuman_login_start
POST /v1/human/login/provehuman_login_prove
POST /v1/human/login/finishhuman_login_finish
POST /v1/human/add/starthuman_add_start
POST /v1/human/add/finishhuman_add_finish
POST /v1/human/reauth/starthuman_reauth_start
POST /v1/human/reauth/finishhuman_reauth_finish
POST /v1/human/credentials/removehuman_credentials_remove
POST /v1/human/recovery/codeshuman_recovery_codes
POST /v1/human/recovery/starthuman_recovery_start
POST /v1/human/recovery/finishhuman_recovery_finish
POST /v1/human/logouthuman_logout
POST /v1/human/logout-allhuman_logout-all
POST /v1/human/bootstraphuman_bootstrap
POST /v1/human/keys/revokehuman_keys_revoke
POST /v1/human/members/listhuman_members_list
POST /v1/human/members/granthuman_members_grant
POST /v1/human/members/narrowhuman_members_narrow
POST /v1/human/members/removehuman_members_remove
POST /v1/human/privacy/exporthuman_privacy_export
POST /v1/human/privacy/erasehuman_privacy_erase
POST /v1/human/privacy/spool-prunehuman_privacy_spool_prune
GET /v2/human/recovery/profilerecovery_v2_profile
POST /v2/human/recovery/startrecovery_v2_start
POST /v2/human/recovery/finishrecovery_v2_finish
GET /v1/public/pages/{pageId}getPublicPage
GET /v1/public/pages/{pageId}/offeringslistPublicOfferings
GET /v1/public/pages/{pageId}/availabilitypublicAvailability
POST /v1/public/pages/{pageId}/bookingsbookPublic
GET /v1/public/pages/{pageId}/bookings/{bookingId}getPublicBooking
POST /v1/public/pages/{pageId}/bookings/{bookingId}/cancelcancelPublicBooking
POST /v1/public/pages/{pageId}/bookings/{bookingId}/reschedulereschedulePublicBooking
GET /v1/workspaces/{workspaceId}/booking-pagegetBookingPage
PUT /v1/workspaces/{workspaceId}/booking-pagereplaceBookingPage
GET /v1/workspaces/{workspaceId}/exportgetBusinessExportPage
GET /livelive
GET /readyready

Schema definitions

References beginning with #/components/schemas/ point to another named definition below. OpenAPI JSON contains the complete request, response and security declarations.

ResourceInput
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "timeZone": {
      "type": "string"
    },
    "capacity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "name",
    "timeZone",
    "capacity"
  ],
  "additionalProperties": false
}
Resource
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "timeZone": {
      "type": "string"
    },
    "capacity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "archived": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "timeZone",
    "capacity",
    "archived"
  ],
  "additionalProperties": false
}
OfferingInput
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "resourceId": {
      "type": "string"
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    }
  },
  "required": [
    "name",
    "resourceId",
    "durationMinutes"
  ],
  "additionalProperties": false
}
Offering
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "resourceId": {
      "type": "string"
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    },
    "archived": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "resourceId",
    "durationMinutes",
    "archived"
  ],
  "additionalProperties": false
}
Hours
{
  "type": "object",
  "properties": {
    "windows": {
      "type": "array",
      "maxItems": 28,
      "items": {
        "type": "object",
        "properties": {
          "weekday": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7
          },
          "start": {
            "type": "string",
            "pattern": "^[0-2][0-9]:[0-5][0-9]$"
          },
          "end": {
            "type": "string",
            "pattern": "^[0-2][0-9]:[0-5][0-9]$"
          }
        },
        "required": [
          "weekday",
          "start",
          "end"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "windows"
  ],
  "additionalProperties": false
}
Booking
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "offeringId": {
      "type": "string"
    },
    "resourceId": {
      "type": "string"
    },
    "start": {
      "type": "string",
      "format": "date-time"
    },
    "end": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "enum": [
        "confirmed",
        "cancelled"
      ]
    },
    "customerId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$",
      "description": "Present only when linked, including retained erased contact links; never contact values."
    }
  },
  "required": [
    "id",
    "offeringId",
    "resourceId",
    "start",
    "end",
    "status"
  ],
  "additionalProperties": false
}
BookingInput
{
  "type": "object",
  "properties": {
    "offeringId": {
      "type": "string"
    },
    "start": {
      "type": "string",
      "format": "date-time"
    },
    "customerId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$",
      "description": "Optional existing active contact in this exact environment. Explicit null invalid; requires BOOK+MANAGE. Normalized linked ID participates in idempotency intent."
    }
  },
  "required": [
    "offeringId",
    "start"
  ],
  "additionalProperties": false
}
Availability
{
  "type": "object",
  "properties": {
    "slots": {
      "type": "array",
      "maxItems": 256,
      "items": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "remainingCapacity": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "start",
          "end",
          "remainingCapacity"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "slots"
  ],
  "additionalProperties": false
}
Events
{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sequence": {
            "type": "integer"
          },
          "type": {
            "enum": [
              "booking.created",
              "booking.cancelled",
              "booking.rescheduled"
            ]
          },
          "bookingId": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "sequence",
          "type",
          "bookingId",
          "occurredAt"
        ],
        "additionalProperties": false
      }
    },
    "nextAfter": {
      "type": "integer"
    },
    "retentionFloor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "highWater": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "events",
    "nextAfter",
    "retentionFloor",
    "highWater"
  ],
  "additionalProperties": false
}
Error
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "error"
  ],
  "additionalProperties": false
}
ResourcePage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/Resource"
      }
    },
    "nextAfter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last emitted ID only when more results remain; otherwise null."
    }
  }
}
OfferingPage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/Offering"
      }
    },
    "nextAfter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last emitted ID only when more results remain; otherwise null."
    }
  }
}
BookingPage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/Booking"
      }
    },
    "nextAfter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last emitted ID only when more results remain; otherwise null."
    }
  }
}
WebhookCreate
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "HTTPS hostname, port443; no IP, userinfo, query or fragment. Syntactic admission only; transport must validate DNS/address/redirect policy."
    }
  }
}
Webhook
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "url",
    "enabled",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "url": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
WebhookCreated
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "url",
    "enabled",
    "createdAt",
    "signingSecret"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "url": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "signingSecret": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$",
      "description": "One-time base64url encoding of32 random bytes; response only, no replay storage."
    }
  }
}
WebhookDelivery
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "subscriptionId",
    "eventId",
    "state",
    "createdAt",
    "attempts",
    "maxAttempts",
    "nextAttemptAt",
    "leaseExpiresAt",
    "lastAttemptAt",
    "lastOutcome",
    "lastHttpStatus"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "subscriptionId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "eventId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "pending",
        "suppressed",
        "leased",
        "sending",
        "delivered",
        "dead"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "attempts": {
      "type": "integer",
      "minimum": 0,
      "maximum": 5
    },
    "maxAttempts": {
      "type": "integer",
      "const": 5
    },
    "nextAttemptAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "leaseExpiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastAttemptAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastOutcome": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null,
        "admitted_unknown",
        "claim_expired",
        "lease_expired_unknown",
        "disabled_unknown",
        "not_attempted",
        "invalid_target",
        "invalid_delivery",
        "address_denied",
        "transport_unknown",
        "deadline_unknown",
        "http_drained",
        "http_body_failed",
        "http_body_deadline",
        "http_body_too_large"
      ]
    },
    "lastHttpStatus": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 100,
      "maximum": 599
    }
  },
  "description": "M4 additive attempt summary; fixed safe codes only, no lease token/payload/secret/target. Suppressed forbids future dispatch but may have an unknown admitted attempt. See m4-delivery.md."
}
WebhookPage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/Webhook"
      }
    },
    "nextAfter": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
WebhookDeliveryPage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/WebhookDelivery"
      }
    },
    "nextAfter": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
WebhookDisable
{
  "type": "object",
  "additionalProperties": false,
  "required": [],
  "properties": {}
}
UsageCounter
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "used",
    "limit",
    "remaining"
  ],
  "properties": {
    "used": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "remaining": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "description": "remaining=max(0,limit-used); advisory, not a reservation."
}
UsagePeriod
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "start",
    "end"
  ],
  "properties": {
    "start": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    }
  },
  "description": "Enclosing UTC calendar month, half-open: start <= asOf < end."
}
UsageCounters
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "monthlyBookingCreates",
    "catalogObjects",
    "bookingRecords",
    "committedEvents",
    "webhookSubscriptions",
    "webhookDeliveries",
    "liveReplays",
    "customerRecords"
  ],
  "properties": {
    "monthlyBookingCreates": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "Committed M1 creates in the UTC month; replay, failure and cancellation do not consume/refund. Limit: current monthly_creates entitlement."
    },
    "catalogObjects": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "Retained M1 resources + offerings; hours are excluded. Limit: min(catalog entitlement,1000)."
    },
    "bookingRecords": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "All retained bookings including cancelled; limit10000."
    },
    "committedEvents": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "Consumed retained event sequence budget; limit20000; no pruning/refund."
    },
    "webhookSubscriptions": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "All retained subscriptions including disabled; limit16."
    },
    "webhookDeliveries": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "All retained queue rows including terminal/suppressed; limit4096. Queued does not mean delivered."
    },
    "liveReplays": {
      "$ref": "#/components/schemas/UsageCounter",
      "description": "Only entries with expires_ms > asOf; limit4096. Existing24h per-record expiry; read never deletes expired rows."
    },
    "customerRecords": {
      "$ref": "#/components/schemas/UsageCounter"
    }
  }
}
Usage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "asOf",
    "period",
    "counters"
  ],
  "properties": {
    "asOf": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "period": {
      "$ref": "#/components/schemas/UsagePeriod"
    },
    "counters": {
      "$ref": "#/components/schemas/UsageCounters"
    }
  }
}
RescheduleInput
{
  "type": "object",
  "properties": {
    "expectedStart": {
      "type": "string",
      "format": "date-time",
      "description": "UTC RFC3339 instant with millisecond precision or coarser"
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "description": "UTC RFC3339 instant with millisecond precision or coarser"
    }
  },
  "required": [
    "expectedStart",
    "start"
  ],
  "additionalProperties": false
}
HistoryPruneInput
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "kind",
    "limit"
  ],
  "properties": {
    "kind": {
      "enum": [
        "deliveries",
        "events",
        "bookings"
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 128
    }
  }
}
HistoryPruneResult
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "asOf",
    "cutoff",
    "deleted",
    "hasMore"
  ],
  "properties": {
    "asOf": {
      "type": "string",
      "format": "date-time"
    },
    "cutoff": {
      "type": "string",
      "format": "date-time"
    },
    "deleted": {
      "type": "integer",
      "minimum": 0,
      "maximum": 128
    },
    "hasMore": {
      "type": "boolean"
    }
  }
}
Customer
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "displayName",
    "email",
    "phone",
    "archived"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 254
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32
    },
    "archived": {
      "type": "boolean"
    },
    "erased": {
      "const": true
    }
  }
}
CustomerInput
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "displayName"
  ],
  "properties": {
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 254
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32
    }
  }
}
CustomerPage
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "nextAfter"
  ],
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/Customer"
      }
    },
    "nextAfter": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
CustomerErased
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "erased"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "erased": {
      "const": true
    }
  }
}
MaintenanceInput
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "limit"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 128
    }
  }
}
MaintenanceResult
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "asOf",
    "deleted",
    "hasMore"
  ],
  "properties": {
    "asOf": {
      "type": "string",
      "format": "date-time"
    },
    "deleted": {
      "type": "integer",
      "minimum": 0,
      "maximum": 128
    },
    "hasMore": {
      "type": "boolean"
    }
  }
}
Empty
{
  "type": "object",
  "additionalProperties": false,
  "properties": {}
}
GlobalProblem
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "code",
    "request_id"
  ],
  "properties": {
    "type": {
      "const": "urn:availkit:problem"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 400,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "request_id": {
      "type": "string"
    }
  }
}
HumanEmpty
{
  "type": "object",
  "additionalProperties": false,
  "properties": {},
  "required": []
}
HumanEmail
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254,
      "description": "NFC local part; preserve case/dots/plus; IDNA lowercased domain. Production email uses ASCII local parts and a real domain. Synthetic profiles require example.invalid."
    }
  },
  "required": [
    "email"
  ]
}
HumanEmailProof
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    }
  },
  "required": [
    "ceremony_id",
    "code"
  ]
}
HumanRecovery
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254
    },
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    }
  },
  "required": [
    "email",
    "code"
  ]
}
HumanRemoveCredential
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "credential_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    }
  },
  "required": [
    "credential_id"
  ]
}
HumanIssueKey
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "kind": {
      "enum": [
        "secret",
        "publishable"
      ]
    },
    "capabilities": {
      "type": "integer",
      "minimum": 0,
      "maximum": 63
    },
    "replaces": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "kind",
    "capabilities"
  ]
}
HumanAssertionResponse
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "clientDataJSON": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "authenticatorData": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "signature": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "userHandle": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 65536,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "clientDataJSON",
    "authenticatorData",
    "signature"
  ]
}
HumanRegistrationResponse
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "clientDataJSON": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "attestationObject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "transports": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "clientDataJSON",
    "attestationObject"
  ]
}
HumanCredential
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "rawId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536,
      "pattern": "^[A-Za-z0-9_-]+$"
    },
    "type": {
      "const": "public-key"
    },
    "extensions": {
      "type": "object",
      "description": "Untrusted normal browser extension outputs, interpreted by webauthn-rs0.5.5."
    },
    "response": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/HumanAssertionResponse"
        },
        {
          "$ref": "#/components/schemas/HumanRegistrationResponse"
        }
      ]
    }
  },
  "required": [
    "id",
    "rawId",
    "type",
    "response"
  ]
}
HumanFinish
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "credential": {
      "$ref": "#/components/schemas/HumanCredential"
    },
    "code": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{43}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "ceremony_id",
    "credential"
  ]
}
HumanRevokeKey
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "key_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "key_id"
  ]
}
HumanRevokedKey
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "revoked": {
      "const": true
    }
  },
  "required": [
    "id",
    "revoked"
  ]
}
HumanMemberList
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "after": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 20
    },
    "include_removed": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment"
  ]
}
HumanMemberGrant
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 1,
      "maximum": 63
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "account_id",
    "capabilities"
  ]
}
HumanMemberNarrow
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "membership_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 1,
      "maximum": 63
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "membership_id",
    "expected_revision",
    "capabilities"
  ]
}
HumanMemberRemove
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "membership_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "expected_revision": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "membership_id",
    "expected_revision"
  ]
}
HumanMembership
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "membership_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "revision": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 1,
      "maximum": 63
    },
    "removed": {
      "type": "boolean"
    }
  },
  "required": [
    "membership_id",
    "account_id",
    "revision",
    "capabilities",
    "removed"
  ]
}
HumanMembershipPage
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "#/components/schemas/HumanMembership"
      }
    },
    "next": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "next"
  ]
}
HumanSubjectExportInput
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "after_audit": {
      "type": "integer",
      "minimum": 0
    },
    "after_membership": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 100
    }
  }
}
HumanProblem
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "code",
    "request_id"
  ],
  "properties": {
    "type": {
      "const": "urn:availkit:problem"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 400,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "request_id": {
      "type": "string"
    }
  }
}
HumanBrowserProfile
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "profile": {
      "enum": [
        "local-synthetic-v1",
        "private-synthetic-v1",
        "production-v1"
      ]
    },
    "rp_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 253
    },
    "recovery_available": {
      "const": false
    },
    "preview_mailbox": {
      "type": "boolean"
    }
  },
  "required": [
    "profile",
    "rp_id",
    "recovery_available"
  ]
}
HumanPublicCredential
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    }
  },
  "required": [
    "id"
  ]
}
HumanCredentialList
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "#/components/schemas/HumanPublicCredential"
      }
    }
  },
  "required": [
    "items"
  ]
}
HumanKeyMetadata
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "kind": {
      "enum": [
        "secret",
        "publishable"
      ]
    },
    "revoked": {
      "type": "boolean"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 0,
      "maximum": 63
    },
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    }
  },
  "required": [
    "id",
    "kind",
    "revoked",
    "capabilities",
    "organization_id",
    "workspace_id",
    "environment"
  ]
}
HumanKeyMetadataList
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 128,
      "items": {
        "$ref": "#/components/schemas/HumanKeyMetadata"
      }
    }
  },
  "required": [
    "items"
  ]
}
HumanIssuedKey
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "kind": {
      "enum": [
        "secret",
        "publishable"
      ]
    },
    "secret": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 0,
      "maximum": 63
    },
    "reveal": {
      "const": "once"
    }
  },
  "required": [
    "id",
    "kind",
    "secret",
    "capabilities",
    "reveal"
  ]
}
HumanSessionIssued
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "csrf_token": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    },
    "recent_until": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "account_id",
    "csrf_token",
    "recent_until"
  ]
}
HumanDiscoveredMembership
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "membership_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "revision": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 1,
      "maximum": 63
    },
    "removed": {
      "type": "boolean"
    },
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    }
  },
  "required": [
    "membership_id",
    "account_id",
    "revision",
    "capabilities",
    "removed",
    "organization_id",
    "workspace_id",
    "environment"
  ]
}
HumanSessionState
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "csrf_token": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    },
    "recent_until": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "scope": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "organization_id": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            "workspace_id": {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            }
          },
          "required": [
            "organization_id",
            "workspace_id"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "memberships": {
      "type": "array",
      "maxItems": 128,
      "items": {
        "$ref": "#/components/schemas/HumanDiscoveredMembership"
      }
    },
    "dashboard_scopes": {
      "type": "array",
      "maxItems": 130,
      "items": {
        "$ref": "#/components/schemas/HumanDashboardScope"
      }
    }
  },
  "required": [
    "account_id",
    "csrf_token",
    "recent_until",
    "scope",
    "memberships"
  ]
}
HumanRegistrationStart
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "options": {
      "type": "object",
      "required": [
        "publicKey"
      ],
      "properties": {
        "publicKey": {
          "type": "object",
          "required": [
            "challenge",
            "rp",
            "user",
            "pubKeyCredParams"
          ],
          "description": "Standard creation options from webauthn-rs0.5.5; decode base64url challenge/user.id/credential IDs before navigator.credentials.create."
        }
      }
    }
  },
  "required": [
    "ceremony_id",
    "options"
  ]
}
HumanAuthenticationStart
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "options": {
      "type": "object",
      "required": [
        "publicKey"
      ],
      "properties": {
        "publicKey": {
          "type": "object",
          "required": [
            "challenge"
          ],
          "description": "Standard request options from webauthn-rs0.5.5; decode base64url challenge/allowCredentials IDs before navigator.credentials.get."
        }
      }
    }
  },
  "required": [
    "ceremony_id",
    "options"
  ]
}
HumanEmailSelection
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "delivery": {
      "enum": [
        "local_spool",
        "email_queued"
      ]
    }
  },
  "required": [
    "ceremony_id",
    "delivery"
  ]
}
HumanPasskeyAdded
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "added": {
      "const": true
    }
  },
  "required": [
    "added"
  ]
}
HumanPasskeyRemoved
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "removed": {
      "const": true
    }
  },
  "required": [
    "removed"
  ]
}
HumanLoggedOut
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "logged_out": {
      "const": true
    }
  },
  "required": [
    "logged_out"
  ]
}
HumanRecoveryCodes
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "codes": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{43}$"
      },
      "minItems": 10,
      "uniqueItems": true
    },
    "reveal": {
      "const": "once"
    }
  },
  "required": [
    "codes",
    "reveal"
  ]
}
HumanWorkspaceBootstrapped
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environments": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "uniqueItems": true,
      "items": {
        "enum": [
          "test",
          "live"
        ]
      }
    }
  },
  "required": [
    "organization_id",
    "workspace_id",
    "environments"
  ]
}
HumanSubjectSession
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "created": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "last_seen": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "verified_at": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "id",
    "created",
    "last_seen",
    "verified_at"
  ]
}
HumanAuditEntry
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "action": {
      "type": "string",
      "maxLength": 40
    },
    "target": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "at": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "id",
    "action",
    "target",
    "at"
  ]
}
HumanSubjectMembership
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "membership_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "revision": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "capabilities": {
      "type": "integer",
      "minimum": 1,
      "maximum": 63
    },
    "removed": {
      "type": "boolean"
    },
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    }
  },
  "required": [
    "membership_id",
    "revision",
    "capabilities",
    "removed",
    "organization_id",
    "workspace_id",
    "environment"
  ]
}
HumanSubjectExport
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "email": {
      "type": "string",
      "maxLength": 254
    },
    "credentials": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "#/components/schemas/HumanPublicCredential"
      }
    },
    "sessions": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "$ref": "#/components/schemas/HumanSubjectSession"
      }
    },
    "keys": {
      "type": "array",
      "maxItems": 128,
      "items": {
        "$ref": "#/components/schemas/HumanKeyMetadata"
      }
    },
    "audit": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "items": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "$ref": "#/components/schemas/HumanAuditEntry"
          }
        },
        "next": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "next"
      ]
    },
    "memberships": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "items": {
          "type": "array",
          "maxItems": 100,
          "items": {
            "$ref": "#/components/schemas/HumanSubjectMembership"
          }
        },
        "next": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "items",
        "next"
      ]
    },
    "consistency": {
      "type": "string"
    }
  },
  "required": [
    "account_id",
    "email",
    "credentials",
    "sessions",
    "keys",
    "audit",
    "memberships",
    "consistency"
  ]
}
HumanSubjectErased
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "erased": {
      "const": true
    }
  },
  "required": [
    "erased"
  ]
}
HumanSpoolPruned
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "deleted": {
      "type": "integer",
      "minimum": 0,
      "maximum": 256
    }
  },
  "required": [
    "deleted"
  ]
}
HumanDashboardScope
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "organization_id",
    "workspace_id",
    "environment",
    "capabilities",
    "principal"
  ],
  "properties": {
    "organization_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    },
    "capabilities": {
      "type": "integer",
      "minimum": 0,
      "maximum": 63
    },
    "principal": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    }
  }
}
RecoveryProfileV2
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "version",
        "rp_id",
        "recovery_available",
        "notice_delivery"
      ],
      "properties": {
        "version": {
          "const": 2
        },
        "rp_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 253
        },
        "recovery_available": {
          "const": false
        },
        "notice_delivery": {
          "const": "unavailable"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "version",
        "rp_id",
        "recovery_available",
        "notice_delivery"
      ],
      "properties": {
        "version": {
          "const": 2
        },
        "rp_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 253
        },
        "recovery_available": {
          "const": true
        },
        "notice_delivery": {
          "enum": [
            "email_queued",
            "synthetic_only"
          ]
        }
      }
    }
  ]
}
RecoveryStartV2
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254
    },
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{43}$"
    }
  },
  "required": [
    "email",
    "code"
  ]
}
RecoveryFinishV2
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "ceremony_id",
    "credential"
  ],
  "properties": {
    "ceremony_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "credential": {
      "$ref": "#/components/schemas/HumanCredential"
    }
  }
}
BookingPageInput
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "enabled": {
      "type": "boolean"
    }
  },
  "required": [
    "title",
    "enabled"
  ]
}
BookingPageSettings
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "pageId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "enabled": {
      "type": "boolean"
    },
    "needsRepublish": {
      "type": "boolean"
    }
  },
  "required": [
    "pageId",
    "title",
    "enabled",
    "needsRepublish"
  ]
}
PublicPage
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "title": {
      "type": "string"
    },
    "environment": {
      "type": "string",
      "enum": [
        "test",
        "live"
      ]
    },
    "emailNotifications": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "title",
    "environment"
  ]
}
PublicOffering
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "name": {
      "type": "string"
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1440
    },
    "timeZone": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "durationMinutes",
    "timeZone"
  ]
}
PublicOfferingPage
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "#/components/schemas/PublicOffering"
      }
    },
    "nextAfter": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "nextAfter"
  ]
}
PublicBookingInput
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "offeringId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "contact": {
      "$ref": "#/components/schemas/CustomerInput"
    }
  },
  "required": [
    "offeringId",
    "start",
    "contact"
  ]
}
PublicBooking
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    },
    "status": {
      "type": "string",
      "enum": [
        "confirmed",
        "cancelled"
      ]
    },
    "offering": {
      "$ref": "#/components/schemas/PublicOffering"
    },
    "page": {
      "$ref": "#/components/schemas/PublicPage"
    },
    "pageEnabled": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "start",
    "end",
    "status",
    "offering",
    "page",
    "pageEnabled"
  ]
}
BusinessExportScope
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "organizationId",
    "workspaceId",
    "environment"
  ],
  "properties": {
    "organizationId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "workspaceId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "environment": {
      "enum": [
        "test",
        "live"
      ]
    }
  }
}
BusinessExportRetention
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "retentionFloor",
    "highWater"
  ],
  "properties": {
    "retentionFloor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "highWater": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
BusinessExportConfiguration
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "bookingPage",
    "usage",
    "eventRetention"
  ],
  "properties": {
    "bookingPage": {
      "$ref": "#/components/schemas/BookingPageSettings"
    },
    "usage": {
      "$ref": "#/components/schemas/Usage"
    },
    "eventRetention": {
      "$ref": "#/components/schemas/BusinessExportRetention"
    }
  }
}
BusinessExportResource
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "timeZone": {
      "type": "string"
    },
    "capacity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "archived": {
      "type": "boolean"
    },
    "hours": {
      "type": "object",
      "properties": {
        "windows": {
          "type": "array",
          "maxItems": 28,
          "items": {
            "type": "object",
            "properties": {
              "weekday": {
                "type": "integer",
                "minimum": 1,
                "maximum": 7
              },
              "start": {
                "type": "string",
                "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
              },
              "end": {
                "type": "string",
                "pattern": "^(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"
              }
            },
            "required": [
              "weekday",
              "start",
              "end"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "windows"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "name",
    "timeZone",
    "capacity",
    "archived",
    "hours"
  ],
  "additionalProperties": false
}
BusinessExportCustomer
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "displayName",
    "email",
    "phone",
    "archived",
    "erased"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 254
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 32
    },
    "archived": {
      "type": "boolean"
    },
    "erased": {
      "type": "boolean"
    }
  }
}
BusinessExportEvent
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "sequence",
    "type",
    "bookingId",
    "occurredAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "sequence": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "type": {
      "enum": [
        "booking.created",
        "booking.cancelled",
        "booking.rescheduled"
      ]
    },
    "bookingId": {
      "type": "string",
      "pattern": "^[0-9a-f]{32}$"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "Z$"
    }
  }
}
BusinessExportUsageHistory
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "month",
    "bookingCreates"
  ],
  "properties": {
    "month": {
      "type": "string",
      "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])$"
    },
    "bookingCreates": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
BusinessExportPage
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "configuration"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 1,
          "minItems": 1,
          "items": {
            "$ref": "#/components/schemas/BusinessExportConfiguration"
          }
        },
        "nextAfter": {
          "type": "null"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "resources"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/BusinessExportResource"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "offerings"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/Offering"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "customers"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/BusinessExportCustomer"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "bookings"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/Booking"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "events"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/BusinessExportEvent"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 32,
              "pattern": "^[1-9][0-9]{0,15}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "webhooks"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/Webhook"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "deliveries"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/WebhookDelivery"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{32}$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "scope",
        "section",
        "asOf",
        "consistency",
        "items",
        "nextAfter"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "scope": {
          "$ref": "#/components/schemas/BusinessExportScope"
        },
        "section": {
          "const": "usage-history"
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "Z$"
        },
        "consistency": {
          "const": "per-response"
        },
        "items": {
          "type": "array",
          "maxItems": 100,
          "minItems": 0,
          "items": {
            "$ref": "#/components/schemas/BusinessExportUsageHistory"
          }
        },
        "nextAfter": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])$"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  ]
}