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

# Describe the current credential

> Check who is calling: your organisation, credential kind, scopes and whether you can write. Call it when a write returns 403.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/whoami
openapi: 3.0.0
info:
  title: Flowella REST API
  version: 2.1.0
  description: >-
    Public v1 HTTP API for Flowella. Authenticate with `Authorization: Bearer
    <api_key>` (`flo_` prefix) or an OAuth access token (`fla_` prefix).
    Canonical base: `https://api.flowella.io/v1`. Legacy
    `https://app.flowella.io/api/v1/...` requests are permanently redirected
    (308) to the canonical host, preserving method and body.
servers:
  - url: https://api.flowella.io
    description: Canonical API host
  - url: https://app.flowella.io
    description: Legacy app host — /api/v1 permanently redirects (308) to the API host /v1
security: []
tags:
  - name: System
    description: Health and auth checks
  - name: Account
    description: Credential and organisation details
  - name: Messages
    description: Send WhatsApp messages
  - name: Conversations
    description: Inbox conversations
  - name: Contacts
    description: CRM contacts
  - name: Templates
    description: WhatsApp templates and bulk send
  - name: Analytics
    description: Usage and delivery metrics
paths:
  /v1/whoami:
    get:
      tags:
        - Account
      summary: Describe the current credential
      description: >-
        Returns who is calling: organization, credential kind (API key or
        OAuth), granted scopes, whether any write scope is granted, OAuth app
        name, and the role of the member who approved the connection. Call this
        first when a write fails with 403 or to check what you are allowed to
        do.
      operationId: v1Whoami
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization:
                    type: object
                    nullable: true
                    properties:
                      organizationId:
                        type: string
                      publicOrgId:
                        type: integer
                      name:
                        type: string
                    required:
                      - organizationId
                      - publicOrgId
                      - name
                  authKind:
                    type: string
                    enum:
                      - api_key
                      - oauth
                  scopes:
                    anyOf:
                      - type: array
                        items:
                          type: string
                      - type: string
                        enum:
                          - all
                  canWrite:
                    type: boolean
                    description: True when at least one write or manage scope is granted.
                  clientId:
                    type: string
                    nullable: true
                  appName:
                    type: string
                    nullable: true
                  consentedByRole:
                    type: string
                    nullable: true
                    enum:
                      - OWNER
                      - ADMIN
                      - MEMBER
                      - BILLING
                    description: >-
                      Role of the member who approved this OAuth connection.
                      Members can only grant read scopes. Null for API keys.
                  sandbox:
                    type: boolean
                required:
                  - organization
                  - authKind
                  - scopes
                  - canWrite
                  - clientId
                  - appName
                  - consentedByRole
                  - sandbox
                example:
                  organization:
                    organizationId: '85'
                    publicOrgId: 684335
                    name: Flowella
                  authKind: oauth
                  scopes:
                    - templates:read
                    - templates:write
                  canWrite: true
                  clientId: floa_xxxxxxxx
                  appName: Cursor
                  consentedByRole: OWNER
                  sandbox: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Organization API key (`flo_…`) or OAuth access token (`fla_…`). Paste
        the full token; Scalar sends `Authorization: Bearer <token>`.

````

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