API Docs
Dashboard

Admin API

Platform-wide administration under /api/v1/admin/* — manage every business, user, plan and setting across the platform.

Who can use it

Admin endpoints require a user access token belonging to a super-admin (an account whose account_type is S). Regular admins (A) and business API keys receive 403 forbidden. Get a token from the login flow like any other user.

Unlike the rest of the API, admin endpoints are platform-wide, not scoped to one business — the X-Business-Id header is ignored here. Sensitive columns (Stripe keys, OAuth tokens, password hashes) are never returned.

Manage businesses

List, inspect, create and update any business; adjust email credits; suspend or reactivate; and read usage stats. Deleting a business runs a safety check first.

Request

# List businesses
curl "https://app.appointment.dev/api/v1/admin/businesses?per_page=25" \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN"

# Add 100 email credits
curl -X POST https://app.appointment.dev/api/v1/admin/businesses/7/credits \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "credits": 100, "reason": "Support gesture" }'

# Suspend
curl -X POST https://app.appointment.dev/api/v1/admin/businesses/7/suspend \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "action": "suspend" }'

Deleting a business is guarded

A delete first checks for warnings — an active subscription, associated users or data. If any exist the API returns 409 confirmation_required with the warnings in error.details. Repeat the request with force: true to permanently delete the business and all of its data.

Request

# First attempt -> 409 with warnings
curl -X DELETE https://app.appointment.dev/api/v1/admin/businesses/7 \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN"

# Confirm
curl -X DELETE https://app.appointment.dev/api/v1/admin/businesses/7 \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "force": true }'

Manage users

List and search users, create them, patch their role or status, and delete them (you cannot delete your own account). Replace a user's business memberships in one call, or trigger a password-reset email.

Request

# Create an admin user
curl -X POST https://app.appointment.dev/api/v1/admin/users \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Staffer",
    "email": "[email protected]",
    "password": "•••••••••",
    "account_type": "A"
  }'

# Assign them to businesses 7 and 9
curl -X PUT https://app.appointment.dev/api/v1/admin/users/512/business-assignment \
  -H "Authorization: Bearer SUPER_ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "business_ids": [7, 9] }'

Plans, billing and platform settings

  • Plans — GET /api/v1/admin/plans and /plans/{id}
  • Platform invoices — GET /api/v1/admin/saas-invoices and /saas-invoices/{id}
  • Platform coupons — GET /api/v1/admin/saas-coupons, /{id} and /{id}/stats (read-only: creating one provisions a live Stripe coupon, so that stays a dashboard action)
  • Settings — GET/PATCH /api/v1/admin/settings/{category}

See the full request and response shapes in the API reference under the Admin tag.