Start free
Docs · Identity

API reference

Identity

Read as Markdown

Base URL https://api.beplan.io/v1. Authentication, envelopes, pagination, idempotency and rate limits: conventions. OpenAPI document: openapi.json.

All 1 Identity operations

Get the token's user, scopes and organizations

GET /me
Beta Reads only identity.get
Scope
profile:read
Role permission
Any member who can see it
Effect
Changes nothing.
Stability
Beta. May still change before it is marked stable. Since 2026-11-19.

Returns who the token acts for (the user's id and name), the connection behind it (its kind, the app or token name, the scopes it may use and when it expires), and every organization it was given, each with its state: active, pending (an admin of the organization must approve it first) or blocked (with the reason), and the workspaces it can reach there. Call it first: every other operation needs an organization id from this list.

Responses

200 OK

object · PublicIdentityResponse

  • dataobject · PublicIdentityrequired
    3fields
    • userobjectrequired
      2fields
      • idstringrequired
      • namestringrequired
    • connectionobjectrequired
      6fields
      • idstringrequired
      • kindstring · PublicConnectionKindrequired
        One of: personal_token, app, mcp
      • namestringrequired
      • clientIdstringrequirednullable
      • scopesarray of stringrequired
        One of: profile:read, organization:read, organization:write, members:read, members:write, roles:write, workspaces:write, workspaces:manage, accounts:read, accounts:write, posts:read, posts:write, posts:publish, posts:review, comments:write, media:read, media:write, media:review, papers:read, papers:write, insights:read, links:write, inbox:read, inbox:manage, inbox:reply, creator_page:read, creator_page:write, creator_page:publish, creator_page:audience, clips:read, clips:write, go_live:read, go_live:write, deals:read, deals:write, deals:finances, deals:send, billing:read, all
      • expiresAtstring (date-time)requirednullable
    • organizationsarray of objectrequired
      6fields in each item
      • idstringrequired
      • namestringrequired
      • statestring · PublicOrganizationStaterequired
        One of: active, pending, blocked
      • reasonstringrequirednullable
      • allWorkspacesbooleanrequired
      • workspacesarray of objectrequired
        3fields in each item
        • idstringrequired
        • namestringrequired
        • timezonestringrequirednullable

Errors answer { error: { code, message, details, requestId } } with status 401, 403, 429, 500.

Error codes

7 more that every operation can answer (tokens, scopes, limits)
401 APP_SUSPENDED This app has been suspended by Beplan and can't access your account.
401 TOKEN_EXPIRED This token has expired. Create a new one or sign in again.
401 TOKEN_REVOKED This token was revoked. Connect again to get a new one.
401 UNAUTHENTICATED Your session has expired. Please sign in again.
403 INSUFFICIENT_SCOPE This token doesn't have the access this needs. Connect again and allow it.
429 RATE_LIMITED Too many requests. Wait a moment and try again.
500 INTERNAL_ERROR Something went wrong on our side. Please try again.

Example

A personal token given one organization

curl
curl -X GET "https://api.beplan.io/v1/me" \
  -H "Authorization: Bearer beplan_pat_…"
TypeScript
const response = await fetch("https://api.beplan.io/v1/me", {
  method: "GET",
  headers: {
    Authorization: "Bearer beplan_pat_…",
  },
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json();
Python
import requests

response = requests.get(
    "https://api.beplan.io/v1/me",
    headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"]
Response 200
{
  "data": {
    "user": {
      "id": "user_2x8Kq",
      "name": "Alex Martin"
    },
    "connection": {
      "id": "3c9d1e2f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "kind": "personal_token",
      "name": "n8n weekly report",
      "clientId": null,
      "scopes": [
        "profile:read",
        "posts:read",
        "media:read"
      ],
      "expiresAt": "2027-02-17T10:00:00.000Z"
    },
    "organizations": [
      {
        "id": "org_8Hq2LmN4",
        "name": "Studio Halden",
        "state": "active",
        "reason": null,
        "allWorkspaces": true,
        "workspaces": [
          {
            "id": "5d2e8f14-3a6b-4c7d-9e0f-1a2b3c4d5e60",
            "name": "Studio Halden",
            "timezone": "Europe/Paris"
          }
        ]
      }
    ]
  }
}