Key context
Which key is making the request, what it can see and which limits apply to it right now.
Endpoints
#The ApiContext object
Details of the key used for the request: organization, permissions, scope, limits and collection status.
Attributes
objectstringObject type, alwaysapi_context.key_idstring (uuid)Key ID. The key secret is never returned in responses.organizationobjectThe organization on whose behalf the key acts.scopesarray of stringRead permissions granted to the key. Up to 4 items.scopeobjectKey scope: which workspaces and campaigns it can see.Child attributes
workspace_modestringall: all workspaces of the organization;selected: only the listed ones. Values:allselectedworkspace_idsarray of stringSelected workspaces. An empty array whenworkspace_mode=all. Up to 50 items.workspace_include_futurebooleanWhether workspaces created after the key was issued are included in the scope.campaign_modestringall: all campaigns in the selected workspaces;selected: only the listed ones. Values:allselectedcampaign_idsarray of stringSelected campaigns. An empty array whencampaign_mode=all. Up to 500 items.campaign_include_futurebooleanWhether campaigns created after the key was issued are included in the scope.scope_versionintegerScope version number. Increases with every change to the key's scope or permissions.
api_versionstringAPI version, alwaysv1.expires_atstring (date-time) or nullWhen the key expires.nullif no expiry is set.limitsobjectRate limits currently applied to the key.Child attributes
key_secondintegerWeight units per second per key.key_minuteintegerWeight units per minute per key.org_secondintegerWeight units per second per organization, across all keys combined.org_minuteintegerWeight units per minute per organization, across all keys combined.key_concurrentintegerConcurrent requests per key.org_concurrentintegerConcurrent requests per organization.max_response_bytesstringMaximum response size in bytes (1 MiB). Long pages are shortened, no data is lost. Always1048576.modestringnormal: normal mode;emergency: temporarily reduced limits. Values:normalemergency
collectionobjectStatus of saved conversation collection for the API.Child attributes
statestringrunning: collection is active;paused: paused in Meliora;preparing: preparing after being enabled;degraded: data may be incomplete. Values:runningpausedpreparingdegradedenabled_atstring (date-time) or nullWhen collection was enabled.nullif it has not been enabled yet.pause_pendingbooleanA pause or resume was requested in Meliora but has not been applied yet.
ApiContext
{
"object": "api_context",
"key_id": "9b1e7c42-5a6d-4f83-9e0b-2d7c4a8f1e65",
"organization": {
"id": "2c8f4a61-7d3e-4b9a-8f21-6a0d5e9c3b17",
"name": "Example"
},
"scopes": [
"campaigns:read",
"events:read",
"leads:read",
"messages:read"
],
"scope": {
"workspace_mode": "all",
"workspace_ids": [],
"workspace_include_future": true,
"campaign_mode": "all",
"campaign_ids": [],
"campaign_include_future": true,
"scope_version": 1
},
"api_version": "v1",
"expires_at": null,
"limits": {
"key_second": 5,
"key_minute": 300,
"org_second": 10,
"org_minute": 600,
"key_concurrent": 5,
"org_concurrent": 10,
"max_response_bytes": 1048576,
"mode": "normal"
},
"collection": {
"state": "running",
"enabled_at": "2026-10-20T08:00:00.000Z",
"pause_pending": false
}
}#Retrieve API key details
GET/v1/me
Returns the organization, permissions, scope and limits of the key. Use it as the first request to check the connection. Available to a key with any set of permissions.
Parameters
No parameters.
Response
Returns a ApiContext object.
Endpoint-specific errors
scope_required: The key does not have permission for this read. Texts also require "Message text" to be enabled.not_found: The object was not found or is outside the key's scope. An unknown path also returns 404.
Common errors are described in Errors.
Request
curl https://api.melioralab.io/v1/me \
-H "Authorization: Bearer $MELIORA_API_KEY"const res = await fetch('https://api.melioralab.io/v1/me', {
headers: { Authorization: `Bearer ${process.env.MELIORA_API_KEY}` },
});
if (!res.ok) throw new Error(`Meliora API: ${res.status}`);
const body = await res.json();import os
import requests
resp = requests.get(
"https://api.melioralab.io/v1/me",
headers={"Authorization": f"Bearer {os.environ['MELIORA_API_KEY']}"},
timeout=15,
)
resp.raise_for_status()
body = resp.json()Response
{
"object": "api_context",
"key_id": "9b1e7c42-5a6d-4f83-9e0b-2d7c4a8f1e65",
"organization": {
"id": "2c8f4a61-7d3e-4b9a-8f21-6a0d5e9c3b17",
"name": "Example"
},
"scopes": [
"campaigns:read",
"events:read",
"leads:read",
"messages:read"
],
"scope": {
"workspace_mode": "all",
"workspace_ids": [],
"workspace_include_future": true,
"campaign_mode": "all",
"campaign_ids": [],
"campaign_include_future": true,
"scope_version": 1
},
"api_version": "v1",
"expires_at": null,
"limits": {
"key_second": 5,
"key_minute": 300,
"org_second": 10,
"org_minute": 600,
"key_concurrent": 5,
"org_concurrent": 10,
"max_response_bytes": 1048576,
"mode": "normal"
},
"collection": {
"state": "running",
"enabled_at": "2026-10-20T08:00:00.000Z",
"pause_pending": false
}
}