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

# Get caller identity

> Returns `environments` — the caller's deploy/promote authority per environment — which is what actually gates step 3/4 below, independent of `scopes`.

Describe the calling credential (key or token).


## OpenAPI

````yaml agent-platform/api-specs/project-deploy-promote.yaml get /api/cicd/v1/whoami
openapi: 3.1.0
info:
  title: Public Project Deploy & Promote API
  version: 1.0.0
  description: >-
    The public, platform-API-key-usable path to deploy a project's CURRENT
    content to an environment and promote it through higher environments, with
    no Studio/user login and no Git dependency. Canonical source:
    docs/api/artemis-cicd-openapi.yaml (full CI/CD API — git, webhooks, eval
    gates, rollback, audit packs). This file is a focused subset for the "import
    -> release -> deploy -> promote" flow:

      1. Move project content between workspaces with the Public Project
         Import/Export API (docs/specs/public-project-import-export-api.openapi.yaml).
      2. Build an immutable release from the imported project's CURRENT content
         with source.kind="project_snapshot".
      3. Deploy that release to an environment, then promote it to a higher one.

    Auth differs from the Import/Export API: there is no raw `x-api-key``
    header. A platform key (`client_secret``) is exchanged for a short-lived
    Bearer JWT via the OAuth2 client-credentials grant below, and that JWT is
    sent as `Authorization: Bearer <token>` on every other call.
servers:
  - url: /
security: []
paths:
  /api/cicd/v1/whoami:
    get:
      summary: Describe the calling credential (key or token).
      description: >-
        Returns `environments` — the caller's deploy/promote authority per
        environment — which is what actually gates step 3/4 below, independent
        of `scopes`.
      operationId: getCallerIdentity
      responses:
        '200':
          description: Resolved principal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoamiResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  schemas:
    WhoamiResponse:
      type: object
      required:
        - success
        - whoami
      properties:
        success:
          type: boolean
          const: true
        whoami:
          type: object
          required:
            - keyId
            - tenantId
            - projectIds
            - scopes
            - environments
            - clientId
            - via
          properties:
            keyId:
              type: string
            tenantId:
              type: string
            projectIds:
              type: array
              items:
                type: string
            scopes:
              type: array
              items:
                type: string
            environments:
              type: array
              items:
                type: string
                enum:
                  - dev
                  - staging
                  - production
              description: Deploy/promote/rollback authority.
            clientId:
              type: string
            via:
              type: string
              enum:
                - apiKey
                - token
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
      description: Plain error envelope used for 401/500 across this API.
  responses:
    Unauthorized:
      description: Authentication failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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