API Authentication
Every API call carries an API key. A key acts as the person who created it, inside their organisation, and never with more rights than they hold. On top of that it carries its own, narrower list of permissions, so an integration only reaches what it needs.
Create a key
- Open Settings → API access.
- Click Create API Key.
- Give it a name that says which integration uses it (for example "Ticketing sync").
- Choose what it can do:
- Agents and conversations (default): list and run agents, start conversations and send messages.
- FinOps feeds, read only: read cost and billing data, for a cost-management tool.
- Choose an expiry: Never expires, 30 days, 90 days or 1 year (maximum).
- Click Create Key, then copy the key immediately. It is shown once and never again.
Keys start with ml_. The list in API access shows each key's name, its first characters, its permissions, when it was created, when it was last used and when it expires. Every key also has an audit-trail button that shows who created it and every change.
Use a key
Send it as a bearer token on every request:
curl https://api.meetloyd.com/api/v1/agents \
-H "Authorization: Bearer ml_…"
With the TypeScript SDK:
import { MeetLoyd } from '@meetloyd/client'
const client = new MeetLoyd({ apiKey: process.env.MEETLOYD_API_KEY! })
What a key can do
A request succeeds only when both are true:
- the person who created the key may do it (their role, custom roles and workspace access), and
- the key's own permission list covers it.
The default key carries agents:read, agents:execute, conversations:read and conversations:write. To create a key with other permissions, for example tasks:write or manifests:write, use the API (below) or the CLI. A key can only carry permissions its creator holds. Asking for more is refused with permissions_exceed_creator.
Revoke or replace a key
- Revoke: click the delete icon on the key in Settings → API access. It stops working immediately.
- Replace: there is no in-place rotation. Create a new key, move your integration to it, check that the old key's "last used" date stops moving, then revoke the old one.
Manage keys through the API
These endpoints need the apikeys:read / apikeys:write permissions.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/keys | List the organisation's keys (never the key values) |
| POST | /api/v1/keys | Create a key: { "name", "permissions"?, "expiresInDays"? } (1-365 days) |
| GET | /api/v1/keys/:id | One key's details |
| PATCH | /api/v1/keys/:id | Rename: { "name" } |
| DELETE | /api/v1/keys/:id | Revoke |
POST answers 201 with { "apiKey": { … }, "key": "ml_…" }. The key field is the only time the full value is returned.
Applications that act as you
Some outside applications, such as an agent platform connected to MeetLoyd over MCP, sign in through MeetLoyd's OAuth 2.0 authorization server instead of using an API key. The person is shown a consent screen listing exactly what the application asks for, and the application then acts as them within that list.
- Applications are registered by MeetLoyd. Ask your MeetLoyd contact to register yours.
- The server uses the authorization-code flow with PKCE (S256). Its metadata is published at
https://app.meetloyd.com/.well-known/oauth-authorization-server. - Settings → Security lists the applications you have authorised. Admins also see every application authorised in the organisation under Settings → API access. Disconnect removes an application's access straight away.
Good practice
- Keep keys in a secret store or environment variable, never in source code.
- One key per integration and per environment, so one can be revoked alone.
- Give each key the narrowest permissions and an expiry.
- Replace production keys on a schedule, and whenever someone who had access leaves.
- Watch "last used": a key nobody uses should be revoked.