Connect a mobile app safely.
A native app is a public client. Keep workspace credentials and webhook secrets on a trusted backend.
On this page
Choose the smallest architecture
- Hosted flow: open
https://app.availkit.com/book/YOUR_PUBLIC_PAGE_IDin a system browser. Customers keep the private management link. This needs no SDK or account credential. - Native public flow: call the same published-page endpoints used by the browser example. Use TLS; omit account cookies and workspace keys. Protect per-booking capabilities with the platform secure storage and redact URLs, analytics and crash reports.
- Private business flow: authenticate the customer to your own backend. That backend checks your customer-to-booking authorization, then performs a narrow permitted operation with its scoped workspace credential.
Public endpoints on the device
GET https://api.availkit.com/v1/public/pages/YOUR_PAGE_ID
GET /v1/public/pages/YOUR_PAGE_ID/offerings?limit=25
GET /v1/public/pages/YOUR_PAGE_ID/availability?offeringId=YOUR_OFFERING_ID&from=FROM_UTC&to=TO_UTC
# Create: retain exact body/key + independent random 32-byte tokens first.
POST /v1/public/pages/YOUR_PAGE_ID/bookings
Authorization: Booking YOUR_PRIVATE_BOOKING_TOKEN
X-AvailKit-Contact-Token: YOUR_PRIVATE_CONTACT_TOKEN
Idempotency-Key: YOUR_SAVED_KEY
Content-Type: application/json
{"offeringId":"YOUR_OFFERING_ID","start":"RETURNED_UTC_START",
"contact":{"displayName":"Synthetic customer"}}Paths after the first line are relative to the same canonical API origin. Tokens are canonical unpadded base64url encodings of separate random 32-byte values. Read, move and cancel use the page/booking paths and the booking capability. Consult current schemas. No native account/passkey API or cross-origin dashboard session is offered.
Keep privileged operations narrow
If a customer should cancel a booking without holding the public capability, expose one purpose-specific endpoint in your backend, such as POST /my-bookings/:id/cancel. Authenticate with your own application’s session, enforce CSRF where appropriate, resolve the booking from your own customer mapping, ensure it belongs to the authenticated subject and allowed workspace, and permit cancellation only.
Keep the original cancellation intent in a durable server-side record tied to that subject and booking before calling AvailKit. Return a confirmed/rejected/unknown result to the app and retain unknown state for reconciliation. Never accept an arbitrary workspace, target URL, API path, method, body or key from the device. This is an architecture boundary, not an AvailKit endpoint or a ready-made native authentication flow.