Route Structure
The Metabind API uses two route prefixes that determine which authentication method to use:| Route Prefix | Authentication | Access Level | Use Case |
|---|---|---|---|
/app/v1/ | JWT Bearer Token | Full CRUD | CMS dashboard, admin operations |
/api/v1/ | API Key (x-api-key) | Read-only | Client apps, content delivery |
/app/v1/ with JWT authentication. Some endpoints are also available via /api/v1/ with API key authentication for read-only access to published content.
Bearer Token Authentication
For administrative operations and full API access, use JWT bearer tokens with the Admin API (/app/v1/ routes).
Obtaining a JWT Token
JWT tokens are obtained by signing into the Metabind CMS. After authentication, your session provides the JWT tokens used for API requests. For programmatic access to admin operations, you can:- Sign into the Metabind CMS
- Use browser developer tools to inspect the
Authorizationheader in API requests - Copy the bearer token for use in your scripts or tools
JWT tokens expire periodically. For long-running integrations that require admin access, consider using the CMS interface or contact Metabind support for service account options.
Using Bearer Tokens
Include the JWT in theAuthorization header:
API Key Authentication
For client applications consuming published content, use API key authentication with the Client API (/api/v1/ routes). This is the recommended approach for mobile apps, web frontends, and other client-side integrations.
When building client applications (iOS, Android, React, web), use the
/api/v1/ routes with API keys. Reserve /app/v1/ routes for admin tools and CMS integrations that require full access.REST Client API
Include the API key in thex-api-key header:
GraphQL API
For the GraphQL API, use the samex-api-key header:
WebSocket Subscriptions
For real-time subscriptions, include the API key in the connection parameters:Obtaining API Keys
API keys are created and managed through the Metabind CMS:- Navigate to your project settings
- Go to the API Keys section
- Click Create API Key
- Provide a name and optional description
- Copy the generated key (it won’t be shown again)
API Key Access
API keys provide read-only access to published content within their project scope. They cannot:- Create, update, or delete resources
- Access draft content
- Access administrative functions
Client API Endpoints
The following endpoints are available via/api/v1/ with API key authentication. All return published content only.
For practical code examples using these endpoints, see Using API Keys.
Content Discovery
GET
/api/v1/organizations/{organizationId}/projects/{projectId}/saved-searchesGET
/api/v1/organizations/{organizationId}/projects/{projectId}/saved-searches/{savedSearchId}POST
/api/v1/organizations/{organizationId}/projects/{projectId}/saved-searches/{savedSearchId}/executeGET
/api/v1/organizations/{organizationId}/projects/{projectId}/tagsGET
/api/v1/organizations/{organizationId}/projects/{projectId}/tags/{tagId}GET
/api/v1/organizations/{organizationId}/projects/{projectId}/content-typesGET
/api/v1/organizations/{organizationId}/projects/{projectId}/content-types/{contentTypeId}GET
/api/v1/organizations/{organizationId}/projects/{projectId}/content-types/{contentTypeId}/versionsContent Access
GET
/api/v1/organizations/{organizationId}/projects/{projectId}/componentsGET
/api/v1/organizations/{organizationId}/projects/{projectId}/components/{componentId}GET
/api/v1/organizations/{organizationId}/projects/{projectId}/packagesGET
/api/v1/organizations/{organizationId}/projects/{projectId}/packages/{version}/resolvedGET
/api/v1/organizations/{organizationId}/projects/{projectId}/contentGET
/api/v1/organizations/{organizationId}/projects/{projectId}/content/{contentId}/resolvedGET
/api/v1/organizations/{organizationId}/projects/{projectId}/assetsReal-time Updates
GET
/api/v1/organizations/{organizationId}/projects/{projectId}/eventsGET
/api/v1/organizations/{organizationId}/projects/{projectId}/{resourceType}/eventsGET
/api/v1/organizations/{organizationId}/projects/{projectId}/{resourceType}/{resourceId}/eventsSecurity Best Practices
Never expose API keys in client-side code
Never expose API keys in client-side code
API keys should be kept on the server side. For mobile apps, use a backend proxy or the GraphQL API with appropriate rate limiting.
Use environment-specific keys
Use environment-specific keys
Create separate API keys for development, staging, and production environments.
Rotate keys regularly
Rotate keys regularly
Periodically revoke old API keys and create new ones, especially if you suspect a key may have been compromised.
Revoke unused keys
Revoke unused keys
Delete API keys that are no longer in use to reduce your attack surface.