GET /v1/me

Who am I

cost 0 RU

Return identity info for the authenticated principal. Always user_id, auth_type, plan, account_id, account_role and account_plan: a key acts in the account that was active when it was created, with its creator's role there. plan is the creator's own plan; account_plan is that account's.

Sensitive metadata fields (key_prefix, scopes, allowed_brand_id) are only included when the key carries the read:meta scope. persona says who the account works for, as the app reads it, and persona_answered whether its owner said so; ask_persona is true when the app asks this caller on its Home (app_url). brands_owned counts the account's brands as its plan's cap does, and help_url is its help center. A field the account read could not fill is left out; the identity fields always answer.

include=next_step adds next_step and next_step_brand_id when the caller works on one brand (a key restricted to it, or an account that owns one); a key needs read:brands for it.

Query parameters

  • include string optional

    next_step adds the next step of the one brand the caller works on.

  • dry_run boolean optional

    Preview the call without executing it. Runs auth, scope, eligibility and body validation, then returns 200 with a dry_run object reporting the request-unit and credit cost plus a non-consuming quota snapshot. Nothing is debited, reserved, dispatched or mutated. An invalid body still returns 422.

    default: false

Responses

Who am I application/json
Type: MeResponse
  • account_id string required

    The account this key acts in: its creator's own (equal to user_id), or the team account that was active when the key was created. The key stops working if its creator leaves that account.

  • account_plan string required

    Plan of the account this key acts in: equal to plan in the creator's own account, the owner's plan in a team account. It sizes the monthly request pool every key in that account draws on, and plan-gated account features follow it.

  • account_role enum required

    The creator's role in that account: owner in their own, editor or viewer in a team account.

  • auth_type enum required

    Credential type used on this request: api_key (server-to-server) or jwt (a signed-in session).

  • plan string required

    The plan tier of the key creator's own subscription (free, pro, …). The monthly request pool and plan-gated account features follow account_plan, the plan of the account the key acts in.

  • user_id string required

    Stable identifier for the authenticated principal (UUID).

  • allowed_brand_id string (nullable) nullable

    If set, the key is restricted to this brand (UUID). Only present when the key has the read:meta scope; null for unrestricted keys.

  • app_url string (nullable) nullable

    The account's Home in the app: an absolute URL on the account's app host (its white-label domain when it has one live; for an agency's client, the agency's). Absent for an agency's client whose agency has no live domain.

  • ask_persona boolean (nullable) nullable

    Whether the app is asking this caller who the account works for, on its Home (app_url): true only for the account's own owner, with a key not restricted to a brand, while persona_answered is false and the account has no white-label app; never for an agency's client. Absent when it could not be read.

  • brands_owned integer (nullable) nullable

    The brands the account owns, as its plan's brand cap counts them: paused ones included, ones being deleted left out. Absent when it could not be read.

  • help_url string (nullable) nullable

    Where the account's help center lives, for how-to questions about the app: the platform's, or on a white-label account or for an agency's client the agency's own. Absent when that agency set none.

  • key_prefix string (nullable) nullable

    First 12 chars of the API key (e.g. rp_live_abcd). Only present when the key has the read:meta scope; null for JWT auth.

  • next_step BrandNextStep (nullable) nullable

    With include=next_step, when the caller works on one brand (the account owns one, or the key is restricted to one): the step that brand owner's Home in the app shows first, as next_step of GET /v1/brands/{brand_id}. Absent with more brands or none, for a key without read:brands, and wherever that brand read has none.

  • next_step_brand_id string (nullable) nullable

    The brand next_step belongs to. Absent with next_step.

  • persona enum (nullable) nullable

    Who the account works for, as the app reads it: brand (its own brand), local (a local business), agency or freelancer (client brands). From the account owner's answer; without one, read from the account's first brand (local when it is a local business, else brand). Null when it could not be read.

  • persona_answered boolean (nullable) nullable

    Whether the account owner said who the account works for. While false, persona is read from the account's first brand. Absent when it could not be read.

  • scopes array of enum (nullable) nullable

    Scopes granted to this key. Only present when the key has the read:meta scope.

Example response
{
  "account_id": "3f9c7e8a-1b6a-4d8e-92cf-7d9c8b1e2a04",
  "account_plan": "pro",
  "account_role": "owner",
  "app_url": "https://app.rankprompt.com/home",
  "ask_persona": true,
  "auth_type": "api_key",
  "brands_owned": 1,
  "help_url": "https://help.rankprompt.com",
  "key_prefix": "rp_live_abcd",
  "persona": "brand",
  "persona_answered": false,
  "plan": "pro",
  "scopes": [
    "read:brands",
    "write:brands"
  ],
  "user_id": "3f9c7e8a-1b6a-4d8e-92cf-7d9c8b1e2a04"
}
Request validation failed application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "validation_error",
    "message": "Request validation failed"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
Missing or invalid credentials application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid credentials"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
You do not have permission to access this resource application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "forbidden",
    "message": "You do not have permission to access this resource"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
Resource conflict application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "conflict",
    "message": "Resource conflict"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
Per-minute rate limit exceeded application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Per-minute rate limit exceeded"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
An unexpected error occurred application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "internal_error",
    "message": "An unexpected error occurred"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}
Service temporarily unavailable, please retry application/json
Type: ApiError
  • error object required
    Show fields
    • code string required

      Stable machine-readable error code from the catalog.

    • message string required

      Human-readable description suitable for logging.

    • details object

      Optional, code-specific context (e.g. errors array for validation_error, retry_after for service_unavailable). Shape depends on error.code; treat as opaque otherwise.

      Show fields

      Empty object (no properties).

  • Server-generated correlation id for the request. Mirrors the X-Correlation-ID response header. Include this when contacting support.

    format: `uuid`

Example response
{
  "error": {
    "code": "service_unavailable",
    "message": "Service temporarily unavailable, please retry"
  },
  "request_id": "9f6c4e8a-1d3b-4c8b-9f1e-7a3b1c2d3e4f"
}