# Building on NOPOS

> Agent context v2026-06-12.1. Generated from the live NOPOS endpoint
> catalog (388 endpoints across 66 groups).
> Authoritative source for AI coding tools building a front end against NOPOS.

You are helping a developer build a front end (point of sale, booking,
membership, or clinical app) on top of the **NOPOS** backend. NOPOS owns the
data and business logic; you build the UI, data fetching, state, validation,
and API wiring. Do not design new backend tables or change route behavior — if
something is missing, the developer files a feature request in the portal.

## Connection

- **Base URL:** `https://nopos.vercel.app/v1`
- **Auth:** every request sends the developer's key as the `X-API-Key` header. There is no `Authorization: Bearer` scheme for API-key calls.
- **First smoke test:** `GET https://nopos.vercel.app/v1/auth/verify` with the `X-API-Key` header. A 200 returns the `store_id` the key is scoped to. Wire this up before building deeper flows.
- **Format:** JSON request and response bodies. Collection routes (e.g. `GET /v1/products`) return lists; `:id` routes return a single record.
- **Errors:** non-2xx responses are JSON with an `error` or `message` field. Map these to your UI's error states.

```bash
curl -s https://nopos.vercel.app/v1/auth/verify -H "X-API-Key: $NOPOS_API_KEY"
```

```ts
const NOPOS_BASE_URL = "https://nopos.vercel.app/v1";

async function nopos<T>(path: string, init: RequestInit = {}): Promise<T> {
  const res = await fetch(`${NOPOS_BASE_URL}${path}`, {
    ...init,
    headers: {
      "X-API-Key": process.env.NOPOS_API_KEY!,
      "content-type": "application/json",
      ...init.headers,
    },
  });
  if (!res.ok) {
    const body = await res.json().catch(() => ({}));
    throw new Error(body.error ?? body.message ?? `NOPOS ${res.status}`);
  }
  return res.json() as Promise<T>;
}
```

## Rules to code by

- **There is no published `@nopos/sdk` npm package.** Call the REST API directly with `fetch`/`axios`, or generate a typed client from the OpenAPI document below. Ignore any sample that imports an SDK or a `transactions` resource — neither exists.
- **Keep API keys server-side in production.** Proxy NOPOS calls through your own backend / serverless route; never ship a live key in a browser bundle. A sandbox key in local dev is fine.
- **Everything is scoped to one store.** The key resolves to a `store_id`; model your tenant data around it. You cannot read another store's data with your key.
- **Patients are customers.** In clinical verticals there is no `patients` table — `/v1/customers` is the canonical patient record and clinical tables link via `patient_id`. See the clinical planning contract.
- **Prefer real endpoints over invented ones.** If you need a capability that is not in the catalog below, say so and point the developer to the portal feature-request flow rather than fabricating a route.

## Worked example: a POS checkout

A minimal "ring up a sale" flow uses four endpoint groups:

1. **List what is for sale** — `GET /v1/products` (retail) or `GET /v1/services` (service businesses).
2. **Identify the buyer** — `GET /v1/customers/search`, or `POST /v1/customers` to create one.
3. **Create the order** — `POST /v1/orders` with the line items.
4. **Take payment** — `POST /v1/payments` against the order.

For appointment-driven businesses, swap orders for **bookings**: `GET /v1/services`
→ `GET /v1/availability/next-slot` → `POST /v1/bookings` →
`POST /v1/bookings/:id/check-in` → `POST /v1/payments`.

## Suggested first prompts

- "Build a product grid that lists `GET /v1/products`, lets me add items to a cart, and creates an order with `POST /v1/orders`."
- "Add a checkout screen that takes payment via `POST /v1/payments` and shows the receipt."
- "Build a customer lookup using `GET /v1/customers/search` with create-on-the-fly via `POST /v1/customers`."
- "Make a booking screen: pick a service, find the next slot, and create a booking."
- "Wire all NOPOS calls through a server route so the API key never reaches the browser."

## Reference documents

- OpenAPI (JSON): https://nopos.vercel.app/docs/openapi.json
- OpenAPI (YAML): https://nopos.vercel.app/docs/openapi.yaml
- Swagger UI: https://nopos.vercel.app/docs/ui
- ReDoc: https://nopos.vercel.app/docs/redoc
- Clinical planning contract: https://developers.nopos.dev/docs/planning-ai.json
- Portal endpoint reference: https://developers.nopos.dev/docs/api/endpoints

## Endpoint catalog

Auth column: endpoints are API-key unless noted otherwise. Session and
webhook routes are listed for completeness but are usually called by the NOPOS
apps themselves, not by your API key.

### Authentication

API key validation, account auth, password recovery, and key administration.

- `POST /v1/auth/register` — Register an account
- `POST /v1/auth/admin/register` — Register an admin account
- `POST /v1/auth/resolve` — Resolve stores available to an email
- `POST /v1/auth/login` — Sign in to a store account
- `POST /v1/auth/logout` — End an auth session
- `POST /v1/auth/change-password` — Change account password
- `POST /v1/auth/request-password-reset` — Request a password reset
- `POST /v1/auth/reset-password` — Reset a password
- `POST /v1/auth/verify-email` — Verify email ownership
- `POST /v1/auth/logout-all` — Revoke all sessions
- `POST /v1/auth/refresh` — Refresh an auth session
- `GET /v1/auth/me` — Load current auth account
- `POST /v1/auth/api-keys` — Create an API key
- `GET /v1/auth/api-keys` — List API keys
- `PATCH /v1/auth/api-keys/:id/revoke` — Revoke an API key
- `DELETE /v1/auth/api-keys/:id` — Delete an API key
- `GET /v1/auth/verify` — Verify an API key
- `GET /v1/auth/debug` — Debug authenticated API key context
- `POST /v1/auth/admin/create-store` — Create a store as an admin

### Users

Profile and password management for authenticated users.

- `GET /v1/users/profile` — Load user profile
- `PUT /v1/users/profile` — Update user profile
- `PUT /v1/users/change-password` — Change user password

### Customer Auth

Customer portal registration, sessions, and self-service profile updates.

- `POST /v1/customer-auth/register` — Register a customer
- `POST /v1/customer-auth/login` — Sign in a customer
- `POST /v1/customer-auth/logout` — Sign out a customer
- `GET /v1/customer-auth/me` — Load current customer
- `PATCH /v1/customer-auth/me` — Update current customer
- `POST /v1/customer-auth/change-password` — Change customer password
- `POST /v1/customer-auth/request-password-reset` — Request customer password reset
- `POST /v1/customer-auth/reset-password` — Reset customer password

### Stores

Store profile, organization store lists, settings, and store lifecycle.

- `GET /v1/stores` — Load authenticated store
- `GET /v1/stores/all` — List stores in the same organization
- `GET /v1/stores/stats` — Load store statistics
- `GET /v1/stores/:id` — Load a store by id
- `PATCH /v1/stores/:id` — Update a store
- `POST /v1/stores/:id/archive` — Archive a store
- `POST /v1/stores/:id/unarchive` — Unarchive a store
- `POST /v1/stores` — Create a store
- `DELETE /v1/stores/:id` — Delete a store
- `GET /v1/settings` — Load store settings
- `PATCH /v1/settings` — Update store settings

### Products

Product catalog CRUD and product archive lifecycle.

- `GET /v1/products` — List products
- `GET /v1/products/:id` — Load a product
- `POST /v1/products` — Create a product
- `PATCH /v1/products/:id` — Update a product
- `DELETE /v1/products/:id` — Delete a product
- `POST /v1/products/:id/archive` — Archive a product
- `POST /v1/products/:id/unarchive` — Unarchive a product

### Services

Service catalog, specialty matching, recommendations, and service lifecycle.

- `GET /v1/services/debug` — Debug service configuration
- `GET /v1/services` — List services
- `GET /v1/services/grouped` — List grouped services
- `GET /v1/services/search` — Search services
- `GET /v1/services/categories` — List service categories
- `GET /v1/services/specialties` — List specialties
- `GET /v1/services/specialties/professionals` — List professionals by specialty
- `GET /v1/services/specialties/recommendations` — Recommend specialties
- `GET /v1/services/:id` — Load a service
- `POST /v1/services` — Create a service
- `PATCH /v1/services/:id` — Update a service
- `DELETE /v1/services/:id` — Delete a service
- `POST /v1/services/:id/archive` — Archive a service
- `POST /v1/services/:id/unarchive` — Unarchive a service

### Inventory

Inventory browsing and stock adjustment front ends.

- `GET /v1/inventory` — List inventory
- `GET /v1/inventory/:id` — Load inventory item
- `PATCH /v1/inventory/:id` — Update inventory item

### Orders

Order queues, order detail screens, creation flows, updates, and cancellation.

- `GET /v1/orders` — List orders
- `GET /v1/orders/:id` — Load an order
- `POST /v1/orders` — Create an order
- `PATCH /v1/orders/:id` — Update an order
- `POST /v1/orders/:id/cancel` — Cancel an order

### Payments

Payment list, payment detail, and charge capture flows.

- `GET /v1/payments` — List payments
- `GET /v1/payments/:id` — Load a payment
- `POST /v1/payments` — Create a payment

### Subscriptions

Recurring subscription CRUD and cancellation.

- `GET /v1/subscriptions` — List subscriptions
- `GET /v1/subscriptions/:id` — Load a subscription
- `POST /v1/subscriptions` — Create a subscription
- `PATCH /v1/subscriptions/:id` — Update a subscription
- `DELETE /v1/subscriptions/:id` — Delete a subscription

### Content

Generic content records and marketing content management.

- `GET /v1/content` — List content
- `GET /v1/content/:id` — Load content
- `POST /v1/content` — Create content
- `PATCH /v1/content/:id` — Update content
- `DELETE /v1/content/:id` — Delete content

### Bookings

Appointment booking, status updates, check-in, and check-out flows.

- `GET /v1/bookings` — List bookings
- `GET /v1/bookings/:id` — Load a booking
- `POST /v1/bookings` — Create a booking
- `PATCH /v1/bookings/:id` — Update a booking
- `DELETE /v1/bookings/:id` — Delete a booking
- `POST /v1/bookings/:id/check-in` — Check in a booking
- `POST /v1/bookings/:id/check-out` — Check out a booking
- `GET /v1/bookings/checked-in` — List checked-in bookings

### Customers

Customer records, customer portal data, order history, booking history, and memberships.

- `GET /v1/customers/search` — Search customers
- `GET /v1/customers` — List customers
- `GET /v1/customers/:id` — Load a customer
- `POST /v1/customers` — Create a customer
- `PATCH /v1/customers/:id` — Update a customer
- `DELETE /v1/customers/:id` — Delete a customer
- `GET /v1/customers/my/orders` — List current customer's orders _(Customer session token)_
- `GET /v1/customers/my/bookings` — List current customer's bookings _(Customer session token)_
- `GET /v1/customers/my/profile` — Load current customer profile _(Customer session token)_
- `GET /v1/customers/:id/memberships` — List customer memberships

### Professionals

Provider profiles, availability, and service assignments.

- `GET /v1/professionals` — List professionals
- `GET /v1/professionals/:id` — Load a professional
- `GET /v1/professionals/:id/availability` — Load professional availability
- `PUT /v1/professionals/:id/availability` — Replace professional availability
- `POST /v1/professionals` — Create a professional
- `PATCH /v1/professionals/:id` — Update a professional
- `DELETE /v1/professionals/:id` — Delete a professional
- `POST /v1/professionals/:id/services` — Assign services to professional

### Classes

Class scheduling, participants, and class bookings.

- `GET /v1/classes` — List classes
- `GET /v1/classes/:id` — Load a class
- `POST /v1/classes` — Create a class
- `PATCH /v1/classes/:id` — Update a class
- `DELETE /v1/classes/:id` — Delete a class
- `GET /v1/classes/:id/participants` — List class participants
- `POST /v1/classes/:id/book` — Book a class
- `DELETE /v1/classes/:id/book/:booking_id` — Cancel class booking

### Categories

Category CRUD for catalog organization.

- `GET /v1/categories` — List categories
- `GET /v1/categories/:id` — Load a category
- `POST /v1/categories` — Create a category
- `PATCH /v1/categories/:id` — Update a category
- `DELETE /v1/categories/:id` — Delete a category

### Membership Tiers

Membership plan/tier CRUD.

- `GET /v1/membership-tiers` — List membership tiers
- `GET /v1/membership-tiers/:id` — Load membership tier
- `POST /v1/membership-tiers` — Create membership tier
- `PATCH /v1/membership-tiers/:id` — Update membership tier
- `DELETE /v1/membership-tiers/:id` — Delete membership tier

### Customer Memberships

Customer memberships, lifecycle actions, and billing history.

- `GET /v1/customer-memberships` — List customer memberships
- `GET /v1/customer-memberships/:id` — Load customer membership
- `POST /v1/customer-memberships` — Create customer membership
- `PATCH /v1/customer-memberships/:id` — Update customer membership
- `POST /v1/customer-memberships/:id/pause` — Pause membership
- `POST /v1/customer-memberships/:id/resume` — Resume membership
- `POST /v1/customer-memberships/:id/cancel` — Cancel membership
- `GET /v1/customer-memberships/:id/billing-history` — Load membership billing history
- `GET /v1/membership-billing-history` — List membership billing history
- `GET /v1/membership-billing-history/:id` — Load billing history entry

### Capacity

Bookable resources, availability blocks, and capacity checks.

- `GET /v1/capacity/resources` — List capacity resources
- `GET /v1/capacity/resources/:id` — Load capacity resource
- `POST /v1/capacity/resources` — Create capacity resource
- `PATCH /v1/capacity/resources/:id` — Update capacity resource
- `DELETE /v1/capacity/resources/:id` — Delete capacity resource
- `GET /v1/capacity/resources/:id/availability` — Load resource availability
- `POST /v1/capacity/resources/:id/availability` — Create resource availability
- `POST /v1/capacity/resources/:id/block` — Block resource time
- `POST /v1/capacity/check` — Check capacity

### Check-In

Tokenized check-in links and check-in processing.

- `POST /v1/check-in/bookings/:id/generate-link` — Generate check-in link
- `POST /v1/check-in/bookings/:id/send-link` — Send check-in link
- `GET /v1/check-in/validate-token/:token` — Validate check-in token
- `POST /v1/check-in/process` — Process check-in

### Patient Vitals

Patient vital sign records for clinical workflows.

- `GET /v1/patient-vitals` — List patient vitals
- `GET /v1/patient-vitals/:id` — Load patient vitals
- `POST /v1/patient-vitals` — Create patient vitals
- `PATCH /v1/patient-vitals/:id` — Update patient vitals
- `DELETE /v1/patient-vitals/:id` — Delete patient vitals

### Waitlist

Waitlist entries and matching.

- `GET /v1/waitlist` — List waitlist entries
- `GET /v1/waitlist/match` — Match waitlist entries
- `POST /v1/waitlist` — Create waitlist entry
- `DELETE /v1/waitlist/:id` — Delete waitlist entry

### Calendar Blocks

Calendar blocks and booking-linked block cleanup.

- `GET /v1/calendar-blocks` — List calendar blocks
- `POST /v1/calendar-blocks` — Create calendar block
- `PATCH /v1/calendar-blocks/:id` — Update calendar block
- `DELETE /v1/calendar-blocks/:id` — Delete calendar block
- `DELETE /v1/calendar-blocks/by-booking/:bookingId` — Delete block by booking

### Booking Resources

Rooms and equipment available for booking flows.

- `GET /v1/booking-resources/rooms` — List booking rooms
- `GET /v1/booking-resources/equipment` — List booking equipment

### Availability

Next-slot search and scheduling availability helpers.

- `GET /v1/availability/next-slot` — Find next available slot

### Packages

Package/session bundle CRUD.

- `GET /v1/packages` — List packages
- `GET /v1/packages/:id` — Load a package
- `POST /v1/packages` — Create a package
- `PATCH /v1/packages/:id` — Update a package
- `DELETE /v1/packages/:id` — Delete a package

### Platform Auth

Staff platform sessions and clinic switching.

- `POST /v1/platform/auth/login` — Staff platform login _(Staff/platform session token)_
- `GET /v1/platform/auth/session` — Load staff session _(Staff/platform session token)_
- `POST /v1/platform/auth/refresh` — Refresh staff session _(Staff/platform session token)_
- `POST /v1/platform/auth/logout` — End staff session _(Staff/platform session token)_
- `POST /v1/platform/auth/switch-clinic` — Switch active clinic _(Staff/platform session token)_

### Platform Orgs

Organizations and clinics for platform administration.

- `GET /v1/platform/orgs/:id` — Load platform organization _(Staff/platform session token)_
- `GET /v1/platform/orgs/:id/clinics` — List organization clinics _(Staff/platform session token)_
- `POST /v1/platform/orgs` — Create platform organization _(Staff/platform session token)_
- `POST /v1/platform/orgs/:id/clinics` — Create organization clinic _(Staff/platform session token)_

### Platform Clinics

Clinic staff and role administration.

- `GET /v1/platform/clinics/:id/staff` — List clinic staff _(Staff/platform session token)_
- `POST /v1/platform/clinics/:id/staff` — Add clinic staff _(Staff/platform session token)_
- `GET /v1/platform/clinics/:id/roles` — List clinic roles _(Staff/platform session token)_
- `PATCH /v1/platform/clinics/:id/roles/:roleId` — Update clinic role _(Staff/platform session token)_
- `POST /v1/platform/clinics/:id/roles` — Create clinic role _(Staff/platform session token)_

### Platform Clinical

Clinical protocols, episodes, encounters, observations, medications, and documents.

- `GET /v1/platform/protocols` — List protocols _(Staff/platform session token)_
- `POST /v1/platform/protocols` — Create protocol _(Staff/platform session token)_
- `GET /v1/platform/protocols/:id` — Load protocol _(Staff/platform session token)_
- `GET /v1/platform/episodes` — List episodes _(Staff/platform session token)_
- `POST /v1/platform/episodes` — Create episode _(Staff/platform session token)_
- `GET /v1/platform/episodes/:id` — Load episode _(Staff/platform session token)_
- `PATCH /v1/platform/episodes/:id/stage` — Update episode stage _(Staff/platform session token)_
- `POST /v1/platform/episodes/:id/outcome-signals` — Create episode outcome signal _(Staff/platform session token)_
- `GET /v1/platform/encounters` — List encounters _(Staff/platform session token)_
- `POST /v1/platform/encounters` — Create encounter _(Staff/platform session token)_
- `GET /v1/platform/encounters/:id` — Load encounter _(Staff/platform session token)_
- `PATCH /v1/platform/encounters/:id/sign` — Sign encounter _(Staff/platform session token)_
- `POST /v1/platform/encounters/:id/observations` — Create encounter observation _(Staff/platform session token)_
- `POST /v1/platform/encounters/:id/medications` — Create encounter medication _(Staff/platform session token)_
- `POST /v1/platform/encounters/:id/documents` — Attach encounter document _(Staff/platform session token)_

### Upload

File upload helpers.

- `POST /v1/upload` — Upload file
- `GET /v1/upload/test` — Test upload route

### Slides

Slide CRUD, image-backed slide creation, stats, and bulk updates.

- `GET /v1/slides` — List slides
- `GET /v1/slides/stats` — Load slide stats
- `GET /v1/slides/:id` — Load slide
- `POST /v1/slides` — Create slide
- `POST /v1/slides/with-image` — Create slide with image
- `PUT /v1/slides/:id` — Replace slide
- `DELETE /v1/slides/:id` — Delete slide
- `POST /v1/slides/bulk-update` — Bulk update slides

### Images

Image generation, storage, retrieval, usage, and async image jobs.

- `POST /v1/images/generate-and-store` — Generate and store image
- `POST /v1/images/store` — Store image
- `GET /v1/images/:id` — Load image
- `PATCH /v1/images/:id` — Update image metadata
- `DELETE /v1/images/:id` — Delete image
- `GET /v1/images/usage/analytics` — Load image usage analytics
- `POST /v1/images-async/generate-async` — Start async image generation
- `GET /v1/images-async/status/:jobId` — Load async image job status

### AI

AI content, slide, and image generation helpers.

- `POST /v1/ai/generate-content` — Generate content
- `POST /v1/ai/generate-slide` — Generate slide
- `POST /v1/ai/generate-image` — Generate image
- `GET /v1/ai/models` — List AI models
- `GET /v1/ai/status` — Load AI service status

### Work Orders

Work order CRUD for service and operations workflows.

- `GET /v1/work-orders` — List work orders
- `GET /v1/work-orders/:id` — Load work order
- `POST /v1/work-orders` — Create work order
- `PATCH /v1/work-orders/:id` — Update work order
- `DELETE /v1/work-orders/:id` — Delete work order

### Estimates

Estimate CRUD, approval workflow, and conversion.

- `GET /v1/estimates` — List estimates
- `GET /v1/estimates/:id` — Load estimate
- `POST /v1/estimates` — Create estimate
- `PATCH /v1/estimates/:id` — Update estimate
- `POST /v1/estimates/:id/submit` — Submit estimate
- `POST /v1/estimates/:id/approve` — Approve estimate
- `POST /v1/estimates/:id/reject` — Reject estimate
- `POST /v1/estimates/:id/convert` — Convert estimate
- `DELETE /v1/estimates/:id` — Delete estimate

### Treatment Notes

Treatment note CRUD for clinical records.

- `GET /v1/treatment-notes` — List treatment notes
- `GET /v1/treatment-notes/:id` — Load treatment note
- `POST /v1/treatment-notes` — Create treatment note
- `PATCH /v1/treatment-notes/:id` — Update treatment note
- `DELETE /v1/treatment-notes/:id` — Delete treatment note

### Commission Schedules

Staff commission schedule CRUD.

- `GET /v1/commission-schedules` — List commission schedules
- `GET /v1/commission-schedules/:id` — Load commission schedule
- `POST /v1/commission-schedules` — Create commission schedule
- `PATCH /v1/commission-schedules/:id` — Update commission schedule
- `DELETE /v1/commission-schedules/:id` — Delete commission schedule

### Calendar Holds

Calendar hold lists, counts, and updates.

- `GET /v1/calendar-holds` — List calendar holds
- `PATCH /v1/calendar-holds/:id` — Update calendar hold
- `GET /v1/calendar-holds/counts` — Load calendar hold counts

### Calendar Integration

External calendar accounts, connect callbacks, and sync.

- `GET /v1/calendar-integration/accounts` — List calendar accounts
- `DELETE /v1/calendar-integration/accounts/:id` — Delete calendar account
- `GET /v1/calendar-integration/google/connect` — Start Google Calendar connection
- `GET /v1/calendar-integration/google/callback` — Handle Google Calendar callback
- `GET /v1/calendar-integration/outlook/connect` — Start Outlook Calendar connection
- `GET /v1/calendar-integration/outlook/callback` — Handle Outlook Calendar callback
- `POST /v1/calendar-integration/sync/:accountId` — Sync calendar account

### Communications

Cross-channel communications list, creation, and detail views.

- `GET /v1/communications` — List communications
- `POST /v1/communications` — Create communication
- `GET /v1/communications/:id` — Load communication

### Contacts

Contact records, DNC history, patient linking, auto-linking, and merges.

- `GET /v1/contacts` — List contacts
- `GET /v1/contacts/check-duplicate` — Check duplicate contacts
- `GET /v1/contacts/:id` — Load contact
- `POST /v1/contacts` — Create contact
- `PATCH /v1/contacts/:id` — Update contact
- `PATCH /v1/contacts/:id/dnc` — Update DNC status
- `GET /v1/contacts/:id/dnc-history` — Load DNC history
- `GET /v1/contacts/:id/patient-suggestions` — Load patient link suggestions
- `POST /v1/contacts/:id/link-patient` — Link contact to patient
- `DELETE /v1/contacts/:id/link-patient` — Unlink contact from patient
- `POST /v1/contacts/auto-link-patients` — Auto-link contacts to patients
- `POST /v1/contacts/:id/merge` — Merge contact
- `GET /v1/contacts/:id/merge-history` — Load merge history
- `DELETE /v1/contacts/:id` — Delete contact

### Threads

Conversation threads, assignment, status, history, and automation.

- `GET /v1/threads` — List threads
- `GET /v1/threads/:id` — Load thread
- `POST /v1/threads` — Create thread
- `POST /v1/threads/:id/mark-read` — Mark thread read
- `PATCH /v1/threads/:id/assign` — Assign thread
- `PATCH /v1/threads/:id/status` — Update thread status
- `GET /v1/threads/:id/history` — Load thread history
- `POST /v1/threads/internal/auto-close` — Auto-close threads

### Clinic Phone Numbers

Provisioned clinic phone number management.

- `GET /v1/clinic-phone-numbers` — List clinic phone numbers
- `POST /v1/clinic-phone-numbers` — Create clinic phone number
- `PATCH /v1/clinic-phone-numbers/:id` — Update clinic phone number
- `DELETE /v1/clinic-phone-numbers/:id` — Delete clinic phone number

### Messages

Outbound messages and segment previews.

- `POST /v1/messages` — Send message
- `GET /v1/messages/segment-preview` — Preview message segment

### Twilio Webhooks

Signature-verified Twilio SMS webhooks.

- `POST /v1/twilio/sms/inbound` — Handle inbound SMS _(Inbound webhook (signature verified))_
- `POST /v1/twilio/sms/status` — Handle SMS status _(Inbound webhook (signature verified))_

### Clinic Email Addresses

Clinic email sender/address management.

- `GET /v1/clinic-email-addresses` — List clinic email addresses
- `POST /v1/clinic-email-addresses` — Create clinic email address
- `PATCH /v1/clinic-email-addresses/:id` — Update clinic email address
- `DELETE /v1/clinic-email-addresses/:id` — Delete clinic email address

### Emails

Outbound and inbound email flows.

- `POST /v1/emails` — Send email
- `POST /v1/emails/inbound` — Handle inbound email _(Inbound webhook (signature verified))_

### Voice

Voice webhooks, call list, dialing, and voice configuration.

- `POST /v1/voice/inbound` — Handle inbound voice _(Inbound webhook (signature verified))_
- `POST /v1/voice/status` — Handle voice status _(Inbound webhook (signature verified))_
- `POST /v1/voice/recording` — Handle recording callback _(Inbound webhook (signature verified))_
- `POST /v1/voice/transcription` — Handle transcription callback _(Inbound webhook (signature verified))_
- `GET /v1/voice/calls` — List voice calls
- `POST /v1/voice/calls/dial` — Dial a call
- `PUT /v1/voice/config` — Update voice config
- `GET /v1/voice/config` — Load voice config
- `GET /v1/calls` — List calls
- `GET /v1/calls/:id` — Load call
- `POST /v1/calls` — Create call
- `PATCH /v1/calls/:id` — Update call

### Routing

Business hours, ring groups, and missed-call automation.

- `GET /v1/routing/business-hours` — Load business hours
- `PUT /v1/routing/business-hours` — Update business hours
- `GET /v1/routing/ring-groups` — List ring groups
- `POST /v1/routing/ring-groups` — Create ring group
- `PATCH /v1/routing/ring-groups/:id` — Update ring group
- `DELETE /v1/routing/ring-groups/:id` — Delete ring group
- `GET /v1/routing/missed-call-auto-text` — Load missed-call auto text
- `PUT /v1/routing/missed-call-auto-text` — Update missed-call auto text

### Templates

Message/content templates and template preview.

- `GET /v1/templates` — List templates
- `POST /v1/templates` — Create template
- `PATCH /v1/templates/:id` — Update template
- `DELETE /v1/templates/:id` — Delete template
- `POST /v1/templates/:id/preview` — Preview template

### Content Library

Reusable content library CRUD.

- `GET /v1/content-library` — List content library items
- `POST /v1/content-library` — Create content library item
- `PATCH /v1/content-library/:id` — Update content library item
- `DELETE /v1/content-library/:id` — Delete content library item

### Automation

Automation definitions, runs, scheduler hooks, and ticks.

- `GET /v1/automation/definitions` — List automation definitions
- `POST /v1/automation/definitions` — Create automation definition
- `PATCH /v1/automation/definitions/:id` — Update automation definition
- `DELETE /v1/automation/definitions/:id` — Delete automation definition
- `GET /v1/automation/runs` — List automation runs
- `POST /v1/automation/internal/schedule-for-booking` — Schedule booking automation
- `POST /v1/automation/internal/tick` — Run automation tick

### Metrics

Store-scoped daily metric ingestion, range reads, latest checks, and namespace discovery.

- `PUT /v1/metrics/daily/:namespace/:date` — Upsert one store-local daily metric record
- `POST /v1/metrics/daily/:namespace/bulk` — Bulk upsert daily metric records
- `GET /v1/metrics/daily/:namespace` — Read a daily metrics date range
- `GET /v1/metrics/daily/:namespace/latest` — Load the latest daily metric record
- `GET /v1/metrics/namespaces` — Discover metric namespaces with coverage summaries

### Form Deliveries

Clinical/intake form delivery tracking.

- `GET /v1/form-deliveries` — List form deliveries
- `POST /v1/form-deliveries` — Create form delivery
- `PATCH /v1/form-deliveries/:id` — Update form delivery

### Notification Logs

Notification log list and creation.

- `GET /v1/notification-logs` — List notification logs
- `POST /v1/notification-logs` — Create notification log

### Benefits

Benefits, patient assignment, and patient benefit lookup.

- `GET /v1/benefits` — List benefits
- `POST /v1/benefits` — Create benefit
- `PATCH /v1/benefits/:id` — Update benefit
- `DELETE /v1/benefits/:id` — Delete benefit
- `POST /v1/benefits/:id/assign` — Assign benefit
- `GET /v1/benefits/patient/:patient_id` — Load patient benefits

### Webhooks

Webhook endpoint management, deliveries, and test delivery.

- `GET /v1/webhooks` — List webhooks
- `POST /v1/webhooks` — Create webhook
- `GET /v1/webhooks/:id` — Load webhook
- `PATCH /v1/webhooks/:id` — Update webhook
- `DELETE /v1/webhooks/:id` — Delete webhook
- `GET /v1/webhooks/:id/deliveries` — List webhook deliveries
- `POST /v1/webhooks/:id/test` — Send test webhook

### Staff Credentials

Staff credential CRUD.

- `GET /v1/staff-credentials` — List staff credentials
- `POST /v1/staff-credentials` — Create staff credential
- `GET /v1/staff-credentials/:id` — Load staff credential
- `PATCH /v1/staff-credentials/:id` — Update staff credential
- `DELETE /v1/staff-credentials/:id` — Delete staff credential

### Resource Assignments

Assign resources to professionals and services.

- `GET /v1/resource-assignments/professionals/:professional_id/resources` — List professional resources
- `POST /v1/resource-assignments/professionals/:professional_id/resources` — Assign professional resource
- `DELETE /v1/resource-assignments/professionals/:professional_id/resources/:resource_id` — Remove professional resource
- `GET /v1/resource-assignments/services/:service_id/resources` — List service resources
- `POST /v1/resource-assignments/services/:service_id/resources` — Assign service resource
- `DELETE /v1/resource-assignments/services/:service_id/resources/:resource_id` — Remove service resource

### Reports

Analytics endpoints for customer, revenue, and dashboard reporting.

- `GET /v1/reports/customer-analytics` — Load customer analytics
- `GET /v1/reports/revenue-analytics` — Load revenue analytics
- `GET /v1/reports/dashboard` — Load reporting dashboard

### Time Entries

Staff time entry list, creation, and current-day lookup.

- `GET /v1/time-entries` — List time entries
- `POST /v1/time-entries` — Create time entry
- `GET /v1/time-entries/staff/:staff_id/today` — Load staff time entries for today

### Loyalty

Loyalty members, enrollment, awards, redemptions, and redemption history.

- `GET /v1/loyalty/members` — List loyalty members
- `POST /v1/loyalty/enroll` — Enroll loyalty member
- `POST /v1/loyalty/award` — Award loyalty points
- `POST /v1/loyalty/redeem` — Redeem loyalty points
- `GET /v1/loyalty/redemptions` — List loyalty redemptions

### Gift Cards

Gift card list, lookup, issue, redeem, and void workflows.

- `GET /v1/giftcards` — List gift cards
- `GET /v1/giftcards/:code` — Load gift card by code
- `POST /v1/giftcards` — Create gift card
- `POST /v1/giftcards/:code/redeem` — Redeem gift card
- `POST /v1/giftcards/:code/void` — Void gift card

### Developer Portal

Developer catalog, provisioning, and API feature request routes.

- `GET /v1/developer-portal/catalog` — Load developer portal catalog _(Public (no auth))_
- `POST /v1/developer-portal/provision` — Provision developer sandbox _(Developer portal secret (server-to-server))_
- `POST /v1/developer-portal/feature-requests` — Submit API feature request _(Developer portal secret (server-to-server))_

### Health and Docs

Public health and hosted documentation endpoints.

- `GET /health` — Health check _(Public (no auth))_
- `GET /docs` — Hosted NOPOS docs _(Public (no auth))_
