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

# Get the API key this request was made with

> Any API key can call this, whatever its scopes. Use it to find the key's environment ID.



## OpenAPI

````yaml /openapi.json get /keys/me
openapi: 3.1.0
info:
  title: subscriber.dev API
  description: >-
    Trigger workflows, manage subscribers and send broadcasts. Authenticate with
    an API key in the X-API-Key header: the key decides the environment. Docs:
    https://docs.subscriber.dev
  version: '1.0'
  contact: {}
servers:
  - url: https://api.subscriber.dev
    description: Cloud
security: []
tags: []
paths:
  /keys/me:
    get:
      tags:
        - API keys
      summary: Get the API key this request was made with
      description: >-
        Any API key can call this, whatever its scopes. Use it to find the key's
        environment ID.
      operationId: getCurrentEnvironmentKey
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentEnvironmentKey'
        '400':
          description: Not called with an API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited. Wait a second and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api-key: []
components:
  schemas:
    CurrentEnvironmentKey:
      type: object
      properties:
        publicId:
          type: string
        name:
          type: string
        start:
          type: string
        scopes:
          type: array
          items:
            type: string
            enum:
              - workflows:trigger
              - workflows:read
              - workflows:write
              - broadcasts:read
              - broadcasts:write
              - subscribers:read
              - subscribers:write
              - emails:test
              - integrations:read
              - integrations:write
              - uploads:write
              - events:read
              - analytics:read
              - billing:read
        workspaceId:
          type: string
        environment:
          type: object
          properties:
            publicId:
              type: string
            name:
              type: string
            slug:
              type: string
          required:
            - publicId
            - name
            - slug
      required:
        - publicId
        - name
        - start
        - scopes
        - workspaceId
        - environment
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        message:
          type: string
          example: Workflow not found
        error:
          type: string
          example: Not Found
        errors:
          description: Which fields failed validation, on a 400.
          type: array
          items:
            type: object
            properties:
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
      required:
        - statusCode
        - message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: An environment API key. Keep it on your server.

````

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