> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get API Key Context

> Get companies and the authenticated API key's permission summary

Get the current API context. User-scoped keys return the companies you can access and the selected company; company-scoped keys return that single company. The response also reports the authenticated key's non-secret identity, its effective permission preset, its scopes, and a direct API Keys management URL. Personal keys link to Account API Keys, while company keys link to the selected workspace's API Keys settings. Use `activeKey` to confirm which credential the client loaded before editing it in place. Only `scopes: null` is forward-compatible full access; an explicit array containing every current scope remains a fixed custom selection. This is permission metadata only and does not bypass resource scopes.

This endpoint requires `account:read`. If a custom key does not include that scope, open the [Sequenzy dashboard](https://sequenzy.com/dashboard) directly and edit the active key from Account API Keys or the selected workspace's API Keys settings.

## Request

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/account" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "user": {
      "id": "user_abc123"
    },
    "companies": [
      {
        "id": "company_abc123",
        "name": "Acme Inc",
        "role": "owner"
      }
    ],
    "currentCompanyId": "company_abc123",
    "apiKeyPermissions": {
      "activeKey": {
        "id": "key_abc123",
        "name": "Cursor custom access",
        "prefix": "seq_live_A",
        "type": "company"
      },
      "preset": "custom",
      "fullAccess": false,
      "selectedScopeCount": 2,
      "currentScopeCount": 63,
      "description": "2 of 63 current permissions are enabled.",
      "scopes": ["account:read", "subscribers:read"],
      "canDiscoverMarketingWork": false,
      "missingMarketingReadScopes": [
        "campaigns:read",
        "sequences:read",
        "landing_pages:read"
      ],
      "canSendLive": false,
      "liveDeliveryBlockedByRole": false,
      "missingLiveDeliveryScopes": [
        "automations:trigger",
        "campaigns:send",
        "sequences:activate",
        "sequences:enroll",
        "transactional:send",
        "conversations:write",
        "team:manage"
      ],
      "manageUrl": "https://sequenzy.com/dashboard/company/company_abc123/settings?tab=api-keys"
    }
  }
  ```

  `canSendLive` is `false` when the key holds no scope that delivers to a real
  person, and `missingLiveDeliveryScopes` lists the delivery paths it lacks.
  Drafting and delivery are separate permissions: a key can hold
  `transactional:write` to manage transactional templates while lacking
  `transactional:send` to deliver one. Check these fields before composing
  content you intend to send.

  `liveDeliveryBlockedByRole` is `true` when the authenticated user's role in the
  selected workspace blocks sending regardless of key scopes - a personal key held
  by a `viewer` is read-only, so widening the key's permissions will not enable
  delivery.

  Account-scoped keys return `role` for each company. `owner` and `admin` can use
  write permissions granted to the key; `marketer` can use marketing permissions
  but not transactional, settings, integration, webhook, team, or API-key ones
  (the blocked scopes are listed in `apiKeyPermissions.roleRestrictedScopes`);
  `viewer` is always limited to read operations.

  The selected company changes API context, not billing ownership. Companies with
  the same owner share the owner's core email plan and monthly usage pool; a
  company you joined uses its own owner's pool. See
  [Workspaces, Billing, and Shared Limits](/concepts/workspaces-and-billing) for
  the full billing and sender-health scope rules.

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.