Skip to main content

Build on magtyne cadence.

Issue API keys, call REST endpoints, and receive signed webhooks in real time. JSON over HTTPS, no SDK required.

Base URL & versioning

All requests go over HTTPS to the versioned base below. We never break a version in place; new fields are additive, and breaking changes ship under a new version prefix.

https://book.magtyne.com/api/v1

Send and expect application/json. All timestamps are ISO 8601 UTC; show them in the recipient's time zone in your UI.

Authentication

Create a key under Integrations, Developer. It is shown once, so store it in a secret manager. Send it as a bearer token on every request; keys are scoped to a single workspace.

curl https://book.magtyne.com/api/v1/bookings \
  -H "Authorization: Bearer mk_live_your_key_here" \
  -H "Content-Type: application/json"

Rotate a key anytime; revoking it takes effect immediately. Never expose a key in client-side code.

Endpoints

The core resources. List endpoints accept ?limit= (max 100).

MethodPathDescription
GET/v1/bookingsList bookings, filter by date, status, or cadence type
POST/v1/bookingsCreate a booking on behalf of an invitee
GET/v1/bookings/{id}Retrieve a single booking
POST/v1/bookings/{id}/cancelCancel a booking
POST/v1/bookings/{id}/rescheduleMove a booking to a new time
GET/v1/event-typesList your cadence types (services)
GET/v1/availabilityOpen slots for a cadence type, ready to book
GET/v1/contactsList or search contacts
POST/v1/contactsCreate a contact, or return the existing one for that email

Query parameters for GET /v1/bookings

ParamTypeFilters to
scopeupcoming | pastDefault upcoming. Ignored when from or to is set
fromISO date or datetimeOnly bookings starting at or after this time
toISO date or datetimeOnly bookings starting before this time
statusconfirmed | pending | cancelled | no_show | rescheduledOnly bookings with this status
eventTypeslug or idOnly bookings for this cadence type
limitnumberMax results, up to 100 (default 50)
curl -X POST https://book.magtyne.com/api/v1/bookings \
  -H "Authorization: Bearer mk_live_..." -H "Content-Type: application/json" \
  -d '{
    "eventType": "intro-call",
    "start": "2026-06-25T15:30:00Z",
    "invitee": { "name": "Emily Carter", "email": "emily@example.com" }
  }'

Errors

Errors return the right HTTP status and a JSON body with a stable code and a human message. Branch on code, not the message.

StatusCodeMeaning
400bad_requestThe request was malformed or failed validation
401unauthorizedMissing or invalid API key
403forbiddenThe key lacks permission for this action
404not_foundNo such resource in your workspace
409conflictThe slot is taken or the resource already exists
429rate_limitedToo many requests, back off and retry

Webhooks

Add an endpoint under Integrations, Developer. We POST a signed JSON payload the moment something happens. Each delivery carries an X-Cadence-Signature header (t=<unix>,v1=<hmac>); verify it with your endpoint secret before trusting the request.

EventFires when
booking.createdA new booking is confirmed
booking.rescheduledA booking moves to a new time
booking.cancelledA booking is cancelled
booking.no_showAn invitee is marked a no-show
payment.succeededA Stripe payment clears
payment.refundedA payment is refunded

Verify the signature (Node)

import crypto from 'node:crypto';

function verify(rawBody, header, secret) {
  const [t, sig] = header.split(',').map((p) => p.split('=')[1]);
  const expected = crypto.createHmac('sha256', secret)
    .update(`${t}.${rawBody}`).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(sig));
}

Example payload

{
  "event": "booking.created",
  "createdAt": "2026-06-23T14:05:00.000Z",
  "data": {
    "id": "bk_8f2c...",
    "eventType": "intro-call",
    "start": "2026-06-25T15:30:00.000Z",
    "invitee": { "name": "Emily Carter", "email": "emily@example.com" }
  }
}

Retries & idempotency

A retried POST /v1/bookings cannot double-book: a taken slot returns 409 conflict, so treat 409 as "already done" when retrying. Failed webhook deliveries are retried three times with backoff; make your handler idempotent by keying on the booking id in the payload.

Rate limits

API requests are limited to 120 per minute per key. Over the limit, a request returns 429 with the rate_limited code and a Retry-After header; back off and retry with jitter. For sustained high-volume use, talk to us about your workload.

Keys, webhooks, and every endpoint above are live. Need one that is not here yet? Tell us. Building with AI agents? See the developer hub for the MCP server.