API Access

Use the Toolbelt REST API to authenticate with an API key and integrate organizations, services, and tool management into your own applications.

The Toolbelt API lets you integrate your Toolbelt account directly into scripts, internal tooling, or external applications. Every operation available in the Toolbelt dashboard—listing connected services, managing organization resources, reading usage logs—is also available through the REST API.

This page explains how to generate an API key, authenticate your requests, and make use of the key endpoints.

Note:

The Toolbelt API is a standard HTTP/JSON REST API. All requests must be made over HTTPS. The base URL for all endpoints is https://toolbelt.apexti.com.


Authentication#

Toolbelt uses API key authentication for programmatic access. Every API key is scoped to the user account that generated it. When you include your API key in a request, Toolbelt authenticates the call as that user and applies the same access controls that user has in the dashboard.

Generate an API key#

  1. Open your Account Settings:

Log in to Toolbelt and navigate to Settings → Account.

  1. Generate a new key:

Click Generate API Key. Toolbelt creates a new 64-character hex key and replaces any previously issued key.

  1. Copy and store your key securely:

The key is displayed once. Copy it immediately and store it in a secrets manager or environment variable. Toolbelt does not display the full key again after you leave the page.

Warning:

Generating a new API key immediately invalidates your previous key. Any integrations using the old key will stop working. Update all dependent systems before rotating keys.


Authenticate requests#

Pass your API key in the Authorization header using the Bearer scheme:

GET /api/services
Authorization: Bearer <your-api-key>

Alternatively, the API also accepts a cookie-based session token if you are calling from a browser context (for example, a dashboard page). For server-to-server or script use, always use the Authorization header with your API key.


Core Endpoints#

User#

Get current user#

Returns the authenticated user's profile, their organization memberships, feature flags, and — importantly — the current API key.

GET /api/user/me
Authorization: Bearer <your-api-key>

Response

{
  "user": {
    "id": "usr_abc123",
    "email": "you@example.com",
    "name": "Your Name",
    "avatarUrl": "https://...",
    "apiKey": "a3f8c2d1e94b...",
    "isVerified": true,
    "personalOrgId": "org_personal_xyz",
    "organizations": [
      { "id": "org_abc", "name": "Acme Corp", "role": "admin" }
    ],
    "featureFlags": ["pipedream", "sandbox-configured"]
  }
}

Get feature flags#

Returns a map of enabled feature flags for the authenticated user.

GET /api/user/features
Authorization: Bearer <your-api-key>

Response

{
  "features": {
    "pipedream": true,
    "sandbox-configured": true
  }
}

Services#

Services are the MCP servers and third-party integrations connected to your Toolbelt account. The services endpoints let you list, connect, and remove services programmatically.

List services#

Returns all services authorized for the authenticated user, including whether each service is connected, owned, or shared.

GET /api/services
Authorization: Bearer <your-api-key>

Query parameters

Parameter Type Description
organizationId string Optional. Filter services by organization. Use personal for personal services, or provide an organization ID for team organizations.

Response

[
  {
    "id": "svc_abc123",
    "name": "github",
    "serverId": "github",
    "description": "GitHub MCP server",
    "type": "apiKey",
    "authorized": true,
    "organizationId": "org_abc",
    "organizationName": "Acme Corp",
    "isOwned": true,
    "isShared": false,
    "isRunning": true
  }
]
Note:

The authorized field indicates whether the calling user has a connected credential for this service. A service can be visible in the list (as a discovered provider) without yet being authorized.

List organization services#

Returns all services belonging to a specific organization. The calling user must be a member of the organization.

GET /api/organizations/:organizationId/services
Authorization: Bearer <your-api-key>

Connect a service#

Connects a service to your account by storing the service's API key or configuration. If a service with the same name already exists for the user/organization, this updates it.

POST /api/services/connect
Authorization: Bearer <your-api-key>
Content-Type: application/json

Request body

{
  "serviceName": "github",
  "apiKey": "ghp_...",
  "organizationId": "org_abc"
}
Field Type Required Description
serviceName string Yes The identifier of the service to connect (e.g., github, slack).
apiKey string One of The API key for the service. Required if config is not provided.
config object One of A JSON configuration object. Required for services that use OAuth or structured config instead of a bare API key.
organizationId string No Organization to associate the service with. Omit for personal services. Use personal to explicitly target your personal organization.

Response

{
  "success": true,
  "message": "Successfully connected to 'github'",
  "service": { ... }
}

Delete a service#

Removes a connected service. The calling user must own the service.

DELETE /api/services/:serviceId
Authorization: Bearer <your-api-key>

Response

{
  "success": true,
  "message": "Successfully deleted service"
}

Toggle organization sharing#

Shares or un-shares a service with all members of its parent organization. Only the service owner can toggle this setting. The service must already belong to an organization.

PATCH /api/services/:serviceId/share-toggle
Authorization: Bearer <your-api-key>
Content-Type: application/json

Request body

{
  "isOrganizationShared": true
}

Response

{
  "success": true,
  "message": "Service is now shared with all organization members",
  "service": { ... }
}

Usage Logs#

Get API usage logs#

Returns up to 100 of the most recent API call logs for the authenticated user. Logs can be filtered by organization context and include organization and chat attribution where available.

GET /api/user/logs
Authorization: Bearer <your-api-key>

Query parameters

Parameter Type Description
organizationId string Optional. Returns logs scoped to the organization. Admins and owners see logs for all organization members. Members see only their own logs (unless canViewOrgLogs is enabled on their membership).

Response

[
  {
    "id": "log_abc123",
    "timestamp": "2026-04-02T12:00:00.000Z",
    "action": "POST /api/services/connect",
    "serviceName": "github",
    "status": 200,
    "isShared": false,
    "source": "workspace_chat",
    "assistantName": "My Assistant",
    "chatName": "Build deployment script",
    "userId": "usr_abc123",
    "userEmail": "you@example.com"
  }
]
Note:

Logs are sorted by timestamp descending and capped at 100 entries per request. This endpoint is read-only; logs cannot be deleted through the API.


Error Responses#

The API uses standard HTTP status codes. All error responses include an error field with a human-readable message.

Status Meaning
400 Bad request — a required field is missing or a parameter has an invalid value.
401 Unauthorized — the Authorization header is missing or the API key is invalid.
403 Forbidden — the authenticated user does not have permission to perform this action.
404 Not found — the requested resource does not exist or the user does not have access to it.
500 Internal server error — something went wrong on the Toolbelt side.

Example error response

{
  "error": "Service not found or you don't have permission"
}

Rate Limits#

Warning:

The Toolbelt API does not currently enforce per-IP or per-key rate limits at the HTTP layer. However, all API calls are logged and monitored. Abnormal call volumes may result in account review or temporary suspension. Build your integrations to be polite: cache responses where possible and avoid polling loops with intervals shorter than 60 seconds.

As a practical guideline:

  • Read endpoints (GET /services, GET /user/me, GET /user/logs): safe to call on demand; avoid calling more than once per minute in an automated loop.
  • Write endpoints (POST /services/connect, DELETE /services/:serviceId): treat these as low-frequency operations; they broadcast real-time updates to connected clients and trigger cache invalidation.

Common Patterns#

Check which services are connected before running automation#

Before executing a workflow that depends on a specific service (e.g., GitHub), verify it is connected and running:

const res = await fetch("https://toolbelt.apexti.com/api/services", {
  headers: { Authorization: `Bearer ${process.env.TOOLBELT_API_KEY}` },
});
const services = await res.json();

const github = services.find(
  (s) => s.serverId === "github" && s.authorized && s.isRunning
);

if (!github) {
  throw new Error("GitHub service is not connected. Please connect it in Toolbelt.");
}

Connect a service during CI/CD setup#

Automate service connection as part of a CI/CD bootstrap script:

curl -s -X POST https://toolbelt.apexti.com/api/services/connect \
  -H "Authorization: Bearer $TOOLBELT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serviceName": "github",
    "apiKey": "'"$GITHUB_TOKEN"'",
    "organizationId": "'"$TOOLBELT_ORG_ID"'"
  }'

Retrieve logs for audit reporting#

Pull the last 100 logs for a team organization and write them to a file:

const res = await fetch(
  `https://toolbelt.apexti.com/api/user/logs?organizationId=${ORG_ID}`,
  {
    headers: { Authorization: `Bearer ${process.env.TOOLBELT_API_KEY}` },
  }
);
const logs = await res.json();
// logs is an array sorted most-recent-first, up to 100 entries
fs.writeFileSync("toolbelt-audit.json", JSON.stringify(logs, null, 2));

Rotate your API key safely#

// 1. Generate the new key
const res = await fetch("https://toolbelt.apexti.com/api/generate-api-key", {
  method: "POST",
  credentials: "include", // Session-based; use the dashboard or a logged-in browser context
});
const { apiKey } = await res.json();

// 2. Update your secrets manager with the new key
await secretsManager.putSecretValue({ SecretId: "TOOLBELT_API_KEY", SecretString: apiKey });

// 3. The old key is now invalid — update any other consumers before proceeding
Warning:

The POST /api/generate-api-key endpoint requires an active browser session (cookie-based auth), not an API key. Use it from the Toolbelt dashboard, or automate it only from a context where you have a valid session cookie.


Personal vs. Organization Context#

Many endpoints accept an organizationId query parameter or request body field. This controls which resource namespace the operation targets.

Value Meaning
Omitted Defaults to the calling user's personal organization.
personal Explicitly targets personal services and logs. Equivalent to omitting the parameter.
<organization-id> Targets a specific team organization. The calling user must be a member of that organization.

Your personalOrgId is returned as part of the GET /api/user/me response. Store it if you need to explicitly target your personal namespace in multi-organization workflows.