Skip to content

Endpoint reference

Every route in v1, grouped by resource, with the scope each one needs. The live OpenAPI spec is the authoritative copy — this page mirrors it.

Base URL https://rigyx.com/api/public/v1. Every request needs an Authorization: Bearer header — see Authentication. All list endpoints follow the pagination rules.

Identity

GET/whoamiany token

Echo back the business ID, scopes and token ID the calling token is bound to. The fastest way to confirm a token works.

Leads

GET/leadsleads:read

List leads, cursor-paginated. Filter with ?status=.

POST/leadsleads:write

Create a lead. email is required; accepts an Idempotency-Key header.

GET/leads/{id}leads:read

Fetch a single lead by ID.

PATCH/leads/{id}leads:write

Update a lead — for example, move its status to qualified.

Creating a lead, and the object you get back:

POST /v1/leads
curl -X POST https://rigyx.com/api/public/v1/leads \
  -H "Authorization: Bearer jmt_..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "company_name": "Acme Ltd",
    "contact_name": "Sam Rivera",
    "status": "new",
    "tags": ["inbound"]
  }'
201 Created
{
  "id": "5b2e...-uuid",
  "business_id": "a1b2...-uuid",
  "company_name": "Acme Ltd",
  "contact_name": "Sam Rivera",
  "email": "[email protected]",
  "phone": null,
  "status": "new",
  "score": 0,
  "score_tier": "cold",
  "tags": ["inbound"],
  "created_at": "2026-05-22T09:14:03.221Z"
}

Contacts

GET/contactscontacts:read

List contacts, cursor-paginated.

POST/contactscontacts:write

Create a contact.

Campaigns

GET/campaignscampaigns:read

List email campaigns with their send and open counts.

Documents

GET/documentsdocuments:read

List generated documents — proposals, quotes, invoices, reports.

POST/documentsdocuments:generate

Generate a new document. May return GENERATION_REFUSED if the anti-hallucination guard blocks it for missing facts.

POST/documents/{id}/senddocuments:send

Email an approved document. Returns 409 if the document is not yet approved.

Agents

POST/agents/{type}/tasksagents:invoke

Dispatch a natural-language task to an agent. Queued — returns 202. type is one of marketing, sales, operations, project_management.

POST /v1/agents/marketing/tasks
curl -X POST https://rigyx.com/api/public/v1/agents/marketing/tasks \
  -H "Authorization: Bearer jmt_..." \
  -H "Content-Type: application/json" \
  -d '{
    "task": "Draft a cold email to 10 coastal guest houses.",
    "context": { "tone": "warm" }
  }'

Webhooks

GET/webhookswebhooks:manage

List your webhook subscriptions.

POST/webhookswebhooks:manage

Subscribe to events. The signing secret is returned once, on creation.

PATCH/webhooks/{id}webhooks:manage

Update a subscription — its URL, events, or active state.

DELETE/webhooks/{id}webhooks:manage

Delete a subscription.

Webhooks have their own page — payload shape, signature verification and retries are covered in full under Webhooks.

Events

GET/eventsevents:read

List recent events, cursor-paginated. Filter with ?type=. Use this to catch up after a webhook endpoint outage.