Skip to main content

API Keys

MeshAI uses Bearer token authentication. All API keys start with msh_.

Key Types

Scopes

API keys are scoped to limit permissions:

Scope Restrictions

When creating a new API key, the scopes you can grant depend on your own key’s permissions: Attempting to grant a scope you don’t have returns 403 Forbidden.

Get Current Key Info

Returns the scopes and identity of the API key making the request. Useful for determining which scopes are available when creating new keys.

Create an API Key

Via Dashboard

Go to app.meshai.dev/settings/api-keys and click “Create API Key”. Select the scopes you need.

Via API

The API key is shown once at creation time. Store it securely. You cannot retrieve it later.

Signup

Create a new MeshAI account:

Login

Get a session token for dashboard access or exchange for an API key:

Key Rotation

Rotate keys without downtime by creating a new key before deleting the old one:
1

Create a new key

Create a new API key with the same scopes.
2

Update your agents

Deploy the new key to all agents and services.
3

Delete the old key

Once all agents are using the new key, delete the old one:

SAML SSO

SAML-based single sign-on for your organization’s identity provider. Available on the Enterprise plan (and Enterprise Plus, and internal partner tenants). All SSO endpoints require the admin scope.

Get SSO Configuration

Get the tenant’s current SSO configuration, or null if SSO has not been configured yet.

Configure SSO

Create or update the tenant’s SAML SSO configuration. Returns 403 if the tenant’s plan does not include SSO.

Enable SSO

Enable SSO for the tenant. Requires an existing SSO configuration; returns 400 if none exists yet.

Disable SSO

Disable SSO for the tenant without deleting its configuration.

Get SP Metadata

Get the MeshAI service provider metadata your identity provider needs to complete the SAML integration.