Developer Search

Search developer docs, public resources, and endpoint references.

Get Started
API Program

Asteri's public API should be versioned, resource-first, and decoupled from internal tRPC.

The public contract needs to be stable for external teams, boring to integrate with, and strict about tenant boundaries. That means REST-first resources, durable DTOs, scoped keys, and explicit change management.

Stable DTOs

External developers should never depend on internal tRPC procedure shapes. A public contract belongs behind versioned routes such as /api/public/v1.

Org-scoped by default

Every request should be pinned to one organization context, with explicit scope checks and audit logging on every write path.

Least privilege

API keys should remain narrow, expiring, rate-limited, and environment-specific. OAuth comes after the server-to-server model is solid.

Recommended v1 resource surface
customersappointmentsestimatesinvoicespaymentsteam membersservicesfileswebhook endpoints

Start with the operational backbone that outside systems actually need. Resist the urge to publish the entire internal surface area on day one.

Customers
Private preview

Customer identity, contact points, tags, and activity history for field-service operations.

Appointments
Private preview

Scheduling, assignment, completion lifecycle, and downstream operational triggers.

Estimates
Private preview

Quote creation, approval flows, acceptance events, and revenue transition states.

Invoices
Private preview

Billing state, payment collection hooks, and accounting-system handoff.

Payments
Private preview

Collected payments, invoice linkage, payment methods, and collection-state visibility.

Services
Private preview

Service catalog visibility for pricing, duration, and booking-facing configuration.

Files
Private preview

Uploaded file records, MIME metadata, processing status, and storage-bucket context.

Webhook Events
Available now

Signed event delivery with retries, delivery history, secret rotation, and replay-oriented operations.

API Keys
Available now

Scoped keys, expirations, and rate limits already live inside the Asteri security center.

TypeScript SDK
Available now

Generated fetch-based client package aligned with the public OpenAPI contract.

Auth model

Ship the API program in layers.

Layer 1: scoped API keys for server-to-server integrations and internal platforms.

Layer 2: OAuth clients for partner apps once consent, review, and app analytics exist.

Layer 3: SDKs, app marketplace, and changelog subscriptions once contract stability is proven.

Existing scope categories
Customers
read:customerswrite:customersdelete:customers
Appointments
read:appointmentswrite:appointmentsdelete:appointments
Invoices
read:invoiceswrite:invoicesdelete:invoices
Payments
read:paymentswrite:paymentsdelete:payments
Estimates
read:estimateswrite:estimatesdelete:estimates
Team
read:teamwrite:team
Services
read:serviceswrite:servicesdelete:services
Files
read:fileswrite:filesdelete:files
Webhooks
manage:webhooks
Auth example

API key access is now part of the preview contract.

Public preview routes accept either an authenticated session/bearer token or a scoped API key sent viax-api-key. Every request still requires an explicitx-organization-id.

curl -X GET \
  http://localhost:3000/api/public/v1/customers \
  -H "x-api-key: ast_live_your_key" \
  -H "x-organization-id: ${ORG_ID}"
401 Unauthorized

Credentials are invalid or expired.

This usually means the request is missing x-api-key, the key is inactive or expired, or bearer auth is malformed.

Check the key value, expiry, and whether the request is also sending the correct x-organization-id.

403 Forbidden

The caller lacks the required scope.

Preview routes enforce narrow scopes like read:customers and write:estimates.

If you receive a missing-scope response, update the key in Security settings or switch to the correct organization.

429 Rate limited

Honor the limit window before retrying.

Preview API keys can be limited per minute and per day. When you exceed that budget, the response includes a limit window and Retry-After.

Back off worker concurrency, avoid blind replay loops, and only retry after the returned window has reset.

Machine-readable spec

OpenAPI preview

The public contract now emits an OpenAPI document generated from the same source that powers the reference index and developer search.

Open OpenAPI JSON