# Speedy Sticks API

API for retrieving healthcare price estimates and managing client integrations.

Version: 1.0.0

## Servers

Production
```
https://api.speedysticks.com
```

## Security

### BearerAuth

Type: http
Scheme: bearer
Bearer Format: JWT

### ApiKeyAuth

Type: apiKey
In: header
Name: ApiKey

### ApiOrBearerAuth

Type: http
Scheme: bearer
Bearer Format: JWT

## Download OpenAPI description

[Speedy Sticks API](https://docs.speedysticks.com/_bundle/openapi.yaml)

## Auth

Authentication endpoints for logging in and obtaining tokens.

### Send a two factor authentication login code

 - [POST /request-code](https://docs.speedysticks.com/openapi/auth/paths/~1request-code/post.md): Sends a one-time code to the provided email address.

### Login with two factor authentication code

 - [POST /login](https://docs.speedysticks.com/openapi/auth/paths/~1login/post.md): Authenticates a user using their email and the one-time code they were sent.

### Login with password

 - [POST /login-password](https://docs.speedysticks.com/openapi/auth/paths/~1login-password/post.md): Authenticates a user using their email and password.

### Request a bearer token

 - [POST /api/request-token](https://docs.speedysticks.com/openapi/auth/paths/~1api~1request-token/post.md): Exchange your API key for a short-lived bearer token. The token expires every 15 minutes and must be used in the Authorization header for all subsequent requests.

## API Keys

Manage your Speedy Sticks API key and view usage analytics.

### Get API key

 - [GET /api/key](https://docs.speedysticks.com/openapi/api-keys/paths/~1api~1key/get.md): Returns the current API key and associated analytics for the authenticated client account.

### Issue a new API key

 - [POST /api/key/regenerate](https://docs.speedysticks.com/openapi/api-keys/paths/~1api~1key~1regenerate/post.md): Generates and returns a new API key for the authenticated client account, replacing the existing one.

## Patients

Manage patients associated with your account.

### Create a patient

 - [POST /api/patient](https://docs.speedysticks.com/openapi/patients/paths/~1api~1patient/post.md): Creates a new patient record associated with the authenticated client account. If an externalId is provided and already exists for this account, a 409 is returned with the existing patient ID.

### Get patient by ID

 - [GET /api/patient/{id}](https://docs.speedysticks.com/openapi/patients/paths/~1api~1patient~1%7Bid%7D/get.md): Retrieves a patient record by their internal ID. The patient must be assigned to the authenticated account.

### Update a patient

 - [PATCH /api/patient/{id}](https://docs.speedysticks.com/openapi/patients/paths/~1api~1patient~1%7Bid%7D/patch.md): Updates an existing patient record. The externalId field cannot be changed after creation.

### Get patient by external ID

 - [GET /api/patient/{patientId}/external-id](https://docs.speedysticks.com/openapi/patients/paths/~1api~1patient~1%7Bpatientid%7D~1external-id/get.md): Looks up a patient using their external ID from your system.

## Appointments

View and manage appointments.

### List appointments

 - [GET /api/appointment](https://docs.speedysticks.com/openapi/appointments/paths/~1api~1appointment/get.md): Returns all appointments associated with the authenticated client account.

### Book an appointment

 - [POST /api/appointment](https://docs.speedysticks.com/openapi/appointments/paths/~1api~1appointment/post.md): Books a new appointment for a patient. Billing type determines payment requirements — bill-to-patient appointments require a valid Stripe paymentMethod ID collected via the setup intent flow. Bill-to-account falls back to the account card on file. Monthly invoice requires no payment method.

### Get appointment by ID

 - [GET /api/appointment/{id}](https://docs.speedysticks.com/openapi/appointments/paths/~1api~1appointment~1%7Bid%7D/get.md): Retrieves a single appointment by ID. The appointment must belong to the authenticated client account.

### Cancel an appointment

 - [POST /api/cancel-appointment](https://docs.speedysticks.com/openapi/appointments/paths/~1api~1cancel-appointment/post.md): Cancels an existing appointment. The appointment must be in a Pending or Confirmed state and more than 3 hours away. A cancellation reason is required, and if the reason is "Other" a note must also be provided. A $50 cancellation fee applies.

### Get cancellation reasons

 - [GET /api/cancellation-reasons](https://docs.speedysticks.com/openapi/appointments/paths/~1api~1cancellation-reasons/get.md): Returns a list of all available cancellation reasons to be used when cancelling an appointment.

## Webhooks

Receive real-time HTTP notifications when key events occur in your account. Register endpoint URLs and subscribe to specific events to keep your systems in sync automatically.

### Get webhook events

 - [GET /api/webhooks/events](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks~1events/get.md): Returns a list of all supported webhook event types available for subscription.

### Get active webhooks

 - [GET /api/webhooks](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks/get.md): Returns a list of all active webhooks associated with your account.

### Create a webhook

 - [POST /api/webhooks](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks/post.md): Register a new webhook endpoint to receive real-time event notifications.

### Get webhook by ID

 - [GET /api/webhooks/{id}](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks~1%7Bid%7D/get.md): Retrieves a single webhook by ID.

### Delete a webhook

 - [DELETE /api/webhooks/{id}](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks~1%7Bid%7D/delete.md): Permanently removes a webhook by ID.

### Update a webhook

 - [PATCH /api/webhooks/{id}](https://docs.speedysticks.com/openapi/webhooks/paths/~1api~1webhooks~1%7Bid%7D/patch.md): Update the URL or subscribed events for an existing webhook.

## Service Area

Determine if we can service a provided area.

### Check zip code serviceability

 - [GET /api/service-area/check](https://docs.speedysticks.com/openapi/service-area/paths/~1api~1service-area~1check/get.md): Returns whether Speedy Sticks can service the provided zip code based on nearby phlebotomist availability.

## Payments

Manage patient payment methods and Stripe setup intents for bill-to-patient appointments.

### Create a stripe setup intent

 - [POST /api/booking/setup-intent](https://docs.speedysticks.com/openapi/payments/paths/~1api~1booking~1setup-intent/post.md): Creates a Stripe SetupIntent for collecting a patient's card on file. Only required for bill-to-patient appointments. Returns a client secret and publishable key to initialize Stripe.js on the client side.

