Programmatic access to everything the dashboard shows, under /api/tenant/*.
Dashboard APIs accept a scoped tenant API key or an OAuth access token. Terri-native MCP clients discover OAuth metadata at /.well-known/oauth-protected-resource and connect to /mcp with terri.read, terri.act, or terri.manage scopes.
| Method | Path | Auth | Purpose | Key request fields | Response |
|---|---|---|---|---|---|
GET | /api/tenant/usage | Bearer API key (read) | Usage dashboard summary for a billing period. | tenantId, invoicePeriod? (query) | Totals and cost per meter for the period. |
GET | /api/tenant/usage-export | Bearer API key (read) | Download raw usage events. | tenantId, invoicePeriod?, format? = csv | json (query) | Usage events as a CSV or JSON file. |
GET | /api/tenant/invoices | Bearer API key (read) | List invoices with per-meter line items. | tenantId, invoicePeriod?, planId? (query) | Invoices: line items, credits, subtotals, total. |
POST | /api/tenant/checkout-session | Bearer API key (billing admin) | Start a Stripe checkout for a plan. | tenantId, planId | Stripe Checkout URL to complete subscription. |
POST | /api/tenant/billing-portal-session | Bearer API key (billing admin) | Open the Stripe billing portal. | tenantId | Stripe billing portal URL. |
GET | /api/tenant/audit-events | Bearer API key (read) | List audit events for the tenant. | tenantId (query) | Audit events, newest first. |
GET | /api/tenant/phone-numbers | Bearer API key (read) | List provisioned phone numbers. | tenantId (query) | Numbers with capabilities and status. |
POST | /api/tenant/phone-numbers | Bearer API key (config admin) | Register a phone number for the tenant. | tenantId, e164, status? | The phone number record after setup. |
POST | /api/tenant/phone-numbers/:id/agent-config | Bearer API key (config admin) | Bind a phone number to an agent identity, or clear it back to the tenant default. | tenantId, agentConfigId | null | The updated phone number record. |
GET | /api/tenant/contacts | Bearer API key (read) | List tenant contacts and caller-memory flags. | tenantId, limit?, cursor? (query) | Contacts with nextCursor when another page is available. |
POST | /api/tenant/contacts | Bearer API key (config admin) | Import or update up to 500 contacts. Existing contacts match by E.164 phone number. | tenantId, contacts[] (phoneE164, name, context?, tags?, agentMemoryEnabled?) | imported count. |
POST | /api/tenant/contacts/:phoneE164 | Bearer API key (config admin) | Replace notes on one contact. Empty context clears notes. | tenantId, context? | The updated contact record. |
DELETE | /api/tenant/contacts/:phoneE164 | Bearer API key (config admin) | Delete one contact by E.164 phone number. | tenantId (query) | deleted: true. |
POST | /api/tenant/contacts/:phoneE164/memory | Bearer API key (config admin) | Toggle whether a contact can use caller memory when the selected identity permits it. | tenantId, agentMemoryEnabled | The updated contact record. |
GET | /api/tenant/team-users | Bearer API key (read) | List team members. | tenantId (query) | Users with email, role, and status. |
POST | /api/tenant/team-users | Bearer API key (config admin) | Invite a team member. | tenantId, email, role? | The invited user (201). |
DELETE | /api/tenant/team-users/:userId | Bearer API key (config admin) | Disable a team member. | tenantId (query), userId (path) | The disabled user record. |
GET | /api/tenant/api-keys | Bearer API key (read) | List API keys. | tenantId (query) | Keys with name, prefix, and role — never the secret. |
POST | /api/tenant/api-keys | Bearer API key (config admin) | Create an API key. | tenantId, name, role? | The key record plus its token — shown once (201). |
DELETE | /api/tenant/api-keys/:apiKeyId | Bearer API key (config admin) | Revoke an API key. | tenantId (query), apiKeyId (path) | The revoked key record. |
GET | /api/tenant/calls | Bearer API key (read) | List call logs. | tenantId (query) | Calls with direction, duration, and status. |
GET | /api/tenant/agent-config | Bearer API key (read) | Read the tenant default agent identity. | tenantId (query) | The tenant default agent configuration. Legacy-compatible endpoint. |
POST | /api/tenant/agent-config | Bearer API key (config admin) | Create or update the tenant default agent identity. | tenantId, displayName, systemPrompt, enabledChannels, … | The saved tenant default agent configuration. Legacy-compatible endpoint. |
GET | /api/tenant/agent-configs | Bearer API key (read) | List the tenant default and phone-number identities. | tenantId (query) | Agent identity configurations. |
POST | /api/tenant/agent-configs | Bearer API key (config admin) | Create a phone-number identity. | tenantId, displayName, systemPrompt, enabledChannels, … | The saved non-default agent identity (201). |
POST | /api/tenant/agent-configs/:id | Bearer API key (config admin) | Update an agent identity, including promotion to tenant default. | Mutable agent identity fields; voice null clears the override. | The saved agent identity. |