GET/api/whoami

Identify the organization behind this key

Resolves the credential to exactly one organization; call it first to learn the org_id every org-scoped route needs. An organization API key always resolves; a credential that spans several organizations gets a 409 naming the fix.

Authentication: Bearer API key in the Authorization header

Responses

  • 200

    The organization and identity binding of this credential.

    Response
    • org_idstringrequired

      The organization this credential acts for.

    • org_slugstringrequired
    • org_namestringrequired
    • identity_idstring | nullrequired

      The identity this key is bound to, when it is an identity-scoped key.

    • customer_plan_identity_idstring | nullrequired

      The end-customer plan identity this key is bound to, when it is a customer-plan key.

    • is_provisioningbooleanrequired

      True for a provisioning key, which may manage keys, identities and budgets.

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 409

    The credential acts across several organizations, so there is no single answer.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

Request

curl https://api.experientiallabs.ai/api/whoami \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "org_id": "3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10",
  "org_slug": "acme",
  "org_name": "Acme",
  "identity_id": null,
  "customer_plan_identity_id": null,
  "is_provisioning": false
}

https://api.experientiallabs.ai/api/whoami