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

# Get info about current API key

> Only available when authenticating with an organization API key. Returns the current role and organization ID that you're authenticated with.



## OpenAPI

````yaml /.assets/openapi.yaml get /api/organizations/{organizationId}/api-key-info
openapi: 3.0.0
info:
  title: Edge Impulse API
  version: 1.0.0
servers:
  - url: https://studio.edgeimpulse.com/v1
security:
  - ApiKeyAuthentication: []
  - JWTAuthentication: []
  - JWTHttpHeaderAuthentication: []
  - OAuth2: []
paths:
  /api/organizations/{organizationId}/api-key-info:
    get:
      tags:
        - Organizations
      summary: Get info about current API key
      description: >-
        Only available when authenticating with an organization API key. Returns
        the current role and organization ID that you're authenticated with.
      operationId: getCurrentOrganizationApiKeyInfo
      parameters:
        - $ref: '#/components/parameters/OrganizationIdParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCurrentOrganizationApiKeyInfoResponse'
components:
  parameters:
    OrganizationIdParameter:
      name: organizationId
      in: path
      required: true
      description: Organization ID
      schema:
        type: integer
  schemas:
    GetCurrentOrganizationApiKeyInfoResponse:
      allOf:
        - $ref: '#/components/schemas/GenericApiResponse'
        - type: object
          required:
            - apiKeyId
            - organizationId
            - role
          properties:
            apiKeyId:
              type: integer
            organizationId:
              type: integer
            role:
              type: string
              enum:
                - admin
                - member
            expires:
              type: string
              format: date-time
              description: >-
                The expiration date of the API key. Only present when the key
                has a TTL set.
            anonymousUserId:
              type: string
              description: >-
                Only present when the API key was created for an organization
                extension. An anonymized, but stable ID for the user that
                granted the extension access. The ID is unique per extension,
                and does not reveal any information about the user. Extensions
                can use this to keep sessions or per-user state. This matches
                the `anonymousUserId` query parameter that is passed to the
                extension.
    GenericApiResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the operation succeeded
        error:
          type: string
          description: Optional error description (set if 'success' was false)
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: x-api-key
    JWTAuthentication:
      type: apiKey
      in: cookie
      name: jwt
    JWTHttpHeaderAuthentication:
      type: apiKey
      in: header
      name: x-jwt-token
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /v1/oauth/authorize
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        implicit:
          authorizationUrl: /v1/oauth/authorize
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        password:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information
        clientCredentials:
          tokenUrl: /v1/oauth/token
          scopes:
            openid: Access to basic profile information
            email: Access to email address
            profile: Access to full profile information

````