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

# Check your API key

> Check your key and see its workspace and environment.



## OpenAPI

````yaml api-reference/openapi.json GET /v1/auth/me
openapi: 3.0.3
info:
  title: Thred API
  version: 1.0.0
  description: >-
    Thred is the data API for the phone. Use Collect when you know who to ask:
    send a phone number and instructions, add context values in input, and
    define the answers you want with a JSON Schema in output. Use the same base
    URL for Development and Production; your API key selects the environment.
servers:
  - url: https://api.thred.dev
    description: Thred API
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Verify the workspace and environment selected by your API key.
  - name: Collect
    description: Collect structured answers from a known phone number.
  - name: Usage
    description: Read daily operational usage.
  - name: Health
    description: Check public API availability.
paths:
  /v1/auth/me:
    get:
      tags:
        - Authentication
      summary: Check your API key
      description: Check your key and see its workspace and environment.
      operationId: getIdentity
      responses:
        '200':
          description: Authenticated key identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    Identity:
      type: object
      properties:
        workspace_id:
          type: string
          description: Workspace associated with the API key.
        environment:
          $ref: '#/components/schemas/Environment'
        key_id:
          type: string
          description: Identifier of the authenticated key; never the key secret.
      required:
        - workspace_id
        - environment
        - key_id
    Environment:
      type: string
      enum:
        - development
        - production
      description: >-
        The API key selects the workspace environment. Development and
        Production are isolated, but either can place real calls when enabled.
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error explanation.
      required:
        - code
        - message
  responses:
    Unauthorized:
      description: >-
        Missing, malformed, invalid, revoked, or environment-mismatched bearer
        API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: >-
        Calling or the backend is unavailable. Codes include
        calling_unavailable, environment_unavailable, not_configured, and
        backend_unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Thred API key
      description: >-
        Send Authorization: Bearer <THRED_API_KEY>. Development keys begin
        thr_dev_; Production keys begin thr_prod_. Each key is scoped to a
        workspace and environment. Keep secrets on your server.

````

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