API Examples

Concrete request and response shapes for the most common Vytal workflows.

📘

Every call needs an API key

The examples below send Authorization: Bearer $VYTAL_API_KEY. Create a key
in Settings → API Keys (see Authentication). The
base URL is https://api.vytal.fit/v1.

Book a class

A full class auto-waitlists instead of failing.

curl -X POST https://api.vytal.fit/v1/bookings/book \
  -H "authorization: Bearer $VYTAL_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"classId":"class_123","memberId":"mem_123"}'
{
  "id": "book_123",
  "classId": "class_123",
  "memberId": "mem_123",
  "status": "booked",
  "createdAt": "2026-06-30T10:30:00.000Z"
}

Cancel a booking

curl -X POST https://api.vytal.fit/v1/bookings/cancel \
  -H "authorization: Bearer $VYTAL_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"bookingId":"book_123"}'

Register a member

curl -X POST https://api.vytal.fit/v1/members \
  -H "authorization: Bearer $VYTAL_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "name":"Ana Silva",
    "email":"[email protected]",
    "phone":"+351912345678"
  }'
{
  "id": "mem_123",
  "name": "Ana Silva",
  "email": "[email protected]",
  "status": "active"
}

Check in a member

curl -X POST https://api.vytal.fit/v1/check-ins \
  -H "authorization: Bearer $VYTAL_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "memberId":"mem_123",
    "classId":"class_123",
    "method":"manual"
  }'

List the class schedule

curl 'https://api.vytal.fit/v1/classes/schedule?from=2026-06-30&to=2026-07-06' \
  -H "authorization: Bearer $VYTAL_API_KEY"
{ "items": [ { "id": "class_123", "date": "2026-06-30", "capacity": 20, "booked": 12 } ] }

What you get back

  • GET returns a single resource, or { "items": [...] } for a collection.
  • POST creates and returns the new resource (201).
  • PATCH updates and returns the resource (200).
  • DELETE returns the affected resource (200).
  • Errors share one shape; list responses follow the
    conventions.

Did this page help you?