Live Myra status: All systems operational

REST API

A small public REST API for leads, pipelines, client accounts and sales metrics.

Myra has a public REST API for reading and writing leads, and for reading your pipelines, client accounts and sales metrics (show rate, close rate and more). It uses JSON for all request and response bodies and standard HTTP status codes.

It is deliberately small. Only the endpoints listed below exist - anything else returns 404.

Prefer a conversational interface? The same tokens also work with our read-only MCP server, which lets Claude, Cursor or any MCP client read your business data directly - see MCP.

Authentication

Tokens are managed in Business → API, and only business owners and admins can see or create them. A token is shown once, at creation; store it somewhere safe.

Send it as a bearer token:

Authorization: Bearer pak_xxxxxxxxxxxxxxxxxxxx

Scopes

There are exactly two scopes:

Scope Allows
read All GET requests
write POST, PATCH and DELETE requests

A token can hold one or both. You can also set an optional expiry, revoke a token, or delete it.

Tokens are scoped to your business: every request is limited to the client accounts that belong to it. Passing a client_id from another business returns 403.

Base URL

https://myra-app.ai/api/public/v1

The same base URL is shown in-product on the Business → API page.

Endpoints

Method Path Scope Description
GET /leads read List leads across your client accounts
POST /leads write Create a lead
GET /leads/{id} read Fetch a single lead
PATCH /leads/{id} write Update a lead
DELETE /leads/{id} write Delete a lead
GET /pipelines read List pipelines with their stages
GET /clients read List the client accounts in your business
POST /leads/{id}/notes write Add a note to a lead's timeline
PATCH /tasks/{id} write Update a task
GET /metrics read Show rate, close rate and other sales metrics

List leads

curl "https://myra-app.ai/api/public/v1/leads?limit=50&offset=0" \
  -H "Authorization: Bearer pak_xxx"

Optional query parameters: client_id, stage_id, limit, offset.

{
  "data": [
    {
      "id": "…",
      "client_id": "…",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "phone": "+15551234567",
      "source": "website",
      "value": 1200,
      "pipeline_id": "…",
      "stage_id": "…",
      "created_at": "2026-08-26T10:00:00Z"
    }
  ],
  "total": 134,
  "limit": 50,
  "offset": 0
}

Create a lead

client_id and name are required. email, phone, source, notes, value, pipeline_id, stage_id and business_name are optional.

curl -X POST https://myra-app.ai/api/public/v1/leads \
  -H "Authorization: Bearer pak_xxx" \
  -H "Content-Type: application/json" \
  -d '{"client_id":"…","name":"Jane Doe","email":"jane@example.com"}'

Add a note to a lead

content is required (up to 8,000 characters, the same as a note in the app). The note shows on the lead's timeline like a note added in the app. It does not start automations or send anything.

curl -X POST https://myra-app.ai/api/public/v1/leads/{id}/notes \
  -H "Authorization: Bearer pak_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content":"Called back, wants a quote on Friday"}'

Update a task

Send only the fields you want to change. An assignee must be a member of the task's client account.

curl -X PATCH https://myra-app.ai/api/public/v1/tasks/{id} \
  -H "Authorization: Bearer pak_xxx" \
  -H "Content-Type: application/json" \
  -d '{"status":"done"}'

Sales metrics

Show rate, close rate, average deal value and the numbers behind them, worked out exactly as on your Home dashboard and Sales Analytics for the same dates. That includes each client account's own choices for how close rate, show rate and deal value are calculated.

curl -H "Authorization: Bearer pak_xxx" \
  "https://myra-app.ai/api/public/v1/metrics?client_id={client_id}&from=2026-11-01&to=2026-11-30"
Parameter Description
client_id Optional. One client account. Leave it out to get every client account plus a combined total.
from Optional. YYYY-MM-DD or an ISO date-time (UTC). Defaults to 30 days before to.
to Optional. YYYY-MM-DD (that whole day is included) or an ISO date-time. Defaults to now.

The range can be at most 400 days.

Calls counted are bookings with a logged outcome, phone calls with a logged outcome, and calls logged by hand (Log call). Events you left out of Sales Analytics are not counted, and rescheduled calls are left out.

Field Meaning
show_rate % of calls where the contact showed up
no_show_rate % of calls marked no-show
close_rate Closed deals ÷ showed calls, as a %
avg_deal_value Average value of closed deals that have a value, in dollars
calls, showed, no_shows, cancelled The call counts behind the rates
closed_deals, closed_deal_value, deals_with_value Deals closed in the range (by the day the outcome was logged)
new_contacts, won_contacts Contacts created in the range, and how many of those are won
speed_to_lead_hours Average hours from a new contact arriving to your first call, text or email
contacted_within_1h_rate % of contacted new contacts reached within an hour
calculation The client account's chosen calculations (empty means the defaults)

Rates are percentages from 0 to 100. A rate is null when there is nothing to divide by, for example no calls in the range.

With one client_id the response is { "period": {...}, "data": {...} }. Without it, you get { "period": {...}, "total": {...}, "clients": [...] }. Each entry in clients also has company_name. The combined total adds up the counts and works the rates out from them, using the default calculations.

Pagination

Offset-based. Use limit (default 50, maximum 200) and offset. List responses include total, limit and offset. There are no cursors.

Rate limits

  • Reads: 600 requests per minute per token
  • Writes: 60 requests per minute per token

Exceeding a limit returns 429 with a retry-after header. No X-RateLimit-* headers are sent.

Errors

Errors are a flat JSON object with a single error string:

{ "error": "client_id not in this agency" }
Status Meaning
400 Invalid JSON or failed validation
401 Missing, malformed, revoked or expired token
403 Token lacks the required scope, or wrong client
404 Record not found (or not visible to your business)
429 Rate limited
500 Server error

What the API does not cover

There are no deals, conversations, messages, calendar or automation endpoints here. To read those, use the MCP server with the same token. To push data out of Myra, use an Automation with a Webhook step, or an automation trigger webhook - see Webhooks.