Skip to main content

What is the Rep API?

The Rep API is for rep organizations — a Vita Rep, or a dual Rep + Clinic account — that recruit clinics and other reps. It does what the Refer a Tele Clinic form in the app does, but from your own system: create an invite, get the signup link back, check whether it was accepted, and revoke it. It is separate from the VitaClinic API. The VitaClinic API is for a clinic placing orders and managing its patients. The Rep API is for the people who bring clinics onto the platform.
Base URL: https://vitarelay.com/api/public/rep/v1. Authenticate with a Bearer API key, exactly as for the other VitaRelay APIs. Test keys (vr_test_…) run in a sandbox: nothing is created and no email is sent.

How it works

1

Get an API key

Ask VitaRelay for a key with invites:write (to create and revoke invites) and invites:read (to list and fetch them). See API keys. Your organization must be a rep or a dual Rep + Clinic account; any other organization gets 403 not_available.
2

Create an invite

POST /invites with the prospect’s details. The response includes an invite_url, which opens the signup page for that invite on your own branded domain when you have one. By default the invite is also emailed to the prospect.
3

The prospect signs up

They open the link and register as a Tele Clinic (or Rep Partner). They join your network, and you earn commission on their orders as usual.
4

Track it

GET /invites or GET /invites/{id} shows whether each invite is pending, accepted or expired. POST /invites/{id}/revoke cancels one that has not been used.

Create an invite

Invites created through the API use your standard commission pricing. Setting your own per-clinic pricing is done in the dashboard. An invite link is valid for 5 days; after that its status is expired and you can create a new one.

Retries are safe

Send an external_invite_id and repeat the same request after a timeout: you get the same invite back (200), not a second one. Reusing an external_invite_id with a different body returns 409 duplicate_request. A request that failed creates nothing, so its id can be reused.

List, fetch and revoke

  • GET /invites — your invites, newest first. Filter with ?status=pending|accepted|expired, page with ?limit= (max 100) and ?cursor= (use next_cursor from the previous page).
  • GET /invites/{id} — one invite.
  • POST /invites/{id}/revoke — cancels a pending invite so the link stops working. Revoking an invite that is already revoked is fine and returns it unchanged. An accepted invite cannot be revoked (409 invite_already_accepted).
An invite you did not create — or that does not exist — returns 404 invite_not_found; you can never see another organization’s invites.

Access and scopes

Errors

Errors use the same shape as the rest of the platform: { "error": { "code": "…", "message": "…" } }.