Errors

Errors use RFC 7807 Problem Details with the application/problem+json content type.

{
  "type": "about:blank",
  "title": "Forbidden",
  "status": 403,
  "detail": "This key does not have the required scope.",
  "code": "scope_required"
}

Fields

Field Meaning
type A URI identifying the problem type. about:blank is used when there is no more specific URI.
title Short human-readable summary.
status HTTP status code, repeated in the body.
detail Human-readable detail for this occurrence.
code Stable machine-readable code when one is available.
instance Optional URI for this specific occurrence.

Branch on status and code, not on title or detail.

Problem responses in the current specs

Surface Operation Status Description
storefront GET /v1/site 404 Studio has no published public site.
management GET /v1/classes 403 The key lacks the classes:read scope.
management POST /v1/classes 403 The key lacks the classes:write scope (or no studio).
management POST /v1/classes 409 The instructor is double-booked, or the Idempotency-Key was reused for a different request.
management POST /v1/classes 422 The request could not be applied (e.g. unknown instructor/plan, unsupported channel).
management PATCH /v1/classes/{classId} 403 The key lacks the classes:write scope (or no studio).
management PATCH /v1/classes/{classId} 404 No such class in this studio.
management DELETE /v1/classes/{classId} 403 The key lacks the classes:write scope (or no studio).
management DELETE /v1/classes/{classId} 404 No such class in this studio.
management GET /v1/members 403 The key lacks the members:read scope.
management POST /v1/members/invites 403 The key lacks the members:write scope (or no studio).
management POST /v1/members/invites 409 That email is already a member, or the Idempotency-Key was reused for a different request.
management GET /v1/schedule 403 The key lacks the schedule:read scope.
management PATCH /v1/schedule/{occurrenceId} 403 The key lacks the schedule:write scope (or no studio).
management PATCH /v1/schedule/{occurrenceId} 404 No such occurrence in this studio.
management PATCH /v1/schedule/{occurrenceId} 409 The move double-books the instructor, or the Idempotency-Key was reused for a different request.
management PATCH /v1/schedule/{occurrenceId} 422 The move is invalid (e.g. it would put an occurrence in the past).
management GET /v1/content 403 The key lacks the content:read scope (or no studio).
management PATCH /v1/content/{contentId} 403 The key lacks the content:write scope (or no studio).
management PATCH /v1/content/{contentId} 404 No such video in this studio.
management DELETE /v1/content/{contentId} 403 The key lacks the content:write scope (or no studio).
management DELETE /v1/content/{contentId} 404 No such video in this studio.
management GET /v1/plans 403 The key lacks the plans:read scope (or no studio).
management POST /v1/plans 403 The key lacks the plans:write scope (or no studio).
management POST /v1/plans 409 The Idempotency-Key was reused for a different request.
management POST /v1/plans 422 The plan config is invalid for its type.
management PATCH /v1/plans/{planId} 403 The key lacks the plans:write scope (or no studio).
management PATCH /v1/plans/{planId} 404 No such plan in this studio.
management DELETE /v1/plans/{planId} 403 The key lacks the plans:write scope (or no studio).
management DELETE /v1/plans/{planId} 404 No such plan in this studio.
management GET /v1/instructors 403 The key lacks the instructors:read scope (or no studio).
management POST /v1/instructors 403 The key lacks the instructors:write scope (or no studio).
management POST /v1/instructors 409 The Idempotency-Key was reused for a different request.
management PATCH /v1/instructors/{instructorId} 403 The key lacks the instructors:write scope (or no studio).
management PATCH /v1/instructors/{instructorId} 404 No such instructor in this studio.
management GET /v1/locations 403 The key lacks the locations:read scope (or no studio).
management POST /v1/locations 403 The key lacks the locations:write scope (or no studio).
management POST /v1/locations 409 The Idempotency-Key was reused for a different request.
management PATCH /v1/locations/{locationId} 403 The key lacks the locations:write scope (or no studio).
management PATCH /v1/locations/{locationId} 404 No such location in this studio.
management DELETE /v1/locations/{locationId} 403 The key lacks the locations:write scope (or no studio).
management DELETE /v1/locations/{locationId} 404 No such location in this studio.
management DELETE /v1/locations/{locationId} 409 Cannot remove the studio's last live venue.
management GET /v1/locations/{locationId}/rooms 403 The key lacks the locations:read scope (or no studio).
management GET /v1/locations/{locationId}/rooms 404 No such location in this studio.
management POST /v1/locations/{locationId}/rooms 403 The key lacks the locations:write scope (or no studio).
management POST /v1/locations/{locationId}/rooms 404 No such location in this studio.
management POST /v1/locations/{locationId}/rooms 409 The Idempotency-Key was reused for a different request.
management PATCH /v1/locations/{locationId}/rooms/{roomId} 403 The key lacks the locations:write scope (or no studio).
management PATCH /v1/locations/{locationId}/rooms/{roomId} 404 No such room in this studio.
management DELETE /v1/locations/{locationId}/rooms/{roomId} 403 The key lacks the locations:write scope (or no studio).
management DELETE /v1/locations/{locationId}/rooms/{roomId} 404 No such room in this studio.
management PATCH /v1/members/{membershipId} 403 The key lacks the members:write scope (or no studio).
management PATCH /v1/members/{membershipId} 404 No such member in this studio.
management PATCH /v1/members/{membershipId} 409 Cannot demote the studio's last admin.
management PATCH /v1/members/{membershipId} 422 The role is not a valid staff role.
management POST /v1/members/{membershipId}/cancel 403 The key lacks the members:write scope (or no studio).
management POST /v1/members/{membershipId}/cancel 404 No such membership in this studio.
management GET /v1/coupons 403 The key lacks the coupons:read scope (or no studio).
management POST /v1/coupons 403 The key lacks the coupons:write scope (or no studio).
management POST /v1/coupons 409 The code already exists, or the Idempotency-Key was reused for a different request.
management POST /v1/coupons 422 The coupon config is invalid.
management DELETE /v1/coupons/{couponId} 403 The key lacks the coupons:write scope (or no studio).
management DELETE /v1/coupons/{couponId} 404 No such coupon in this studio.
management GET /v1/programs 403 The key lacks the programs:read scope (or no studio).
management POST /v1/programs 403 The key lacks the programs:write scope (or no studio).
management POST /v1/programs 409 The Idempotency-Key was reused for a different request.
management POST /v1/programs 422 The price is invalid for a paid program.
management GET /v1/programs/{programId} 403 The key lacks the programs:read scope (or no studio).
management GET /v1/programs/{programId} 404 No such program in this studio.
management PATCH /v1/programs/{programId} 403 The key lacks the programs:write scope (or no studio).
management PATCH /v1/programs/{programId} 404 No such program in this studio.
management PATCH /v1/programs/{programId} 422 The price is invalid for a paid program.

Common handling

401 means the key is missing, invalid, revoked, or the wrong kind for the surface. 403 means the key is valid but lacks the required scope. 404 means the resource is not visible to that key. 409 means a conflict such as an idempotency-key mismatch or a business rule conflict. 422 means validation failed.