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

# Current user and granted API scopes



## OpenAPI

````yaml /openapi.json get /v1/me
openapi: 3.0.3
info:
  title: COSMIC Public API
  version: 0.1.0
  description: >-
    Telecom safety operations API for organizations, members, certifications,
    job roles, and qualifications.


    **Public preview:** this API layer is in public preview. Endpoint structure
    is expected to be mostly stable, but response fields, edge cases, and
    reliability are still subject to change.


    **Discovery:** use `GET /v1/organizations` and `GET
    /v1/organizations/{organization_id}/organization-members` to list orgs and
    members.


    **List / sync:** use `limit`, `cursor`, and `updated_after` (exclusive:
    records with `updated_at` strictly after the given timestamp). List ordering
    is resource-specific and deterministic.


    **Writes:** create endpoints for sync-oriented resources accept
    `Idempotency-Key` and may use `external_id` / `external_source` on
    certifications (and optionally members).
servers:
  - url: https://api.natecosmic.com
security: []
tags:
  - name: Me
    description: Token identity and granted API scopes
  - name: Certifications
    description: User-scoped certification records (token subject)
  - name: Organizations
    description: Tenants and org-scoped resources
  - name: Definitions
    description: Global read discovery for types, roles, qualifications
paths:
  /v1/me:
    get:
      tags:
        - Me
      summary: Current user and granted API scopes
      responses:
        '200':
          description: User and scopes (integration tokens only)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeResponse'
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: >-
            Forbidden: missing required scope on the token, cannot access the
            resource or organization, or the integration requires re-approval
            after scope changes in the developer portal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    MeResponse:
      type: object
      description: >-
        Current user and, for OAuth integration tokens, COSMIC API scopes on
        this access token
      required:
        - user
        - scopes
      properties:
        user:
          type: object
          properties:
            id:
              type: string
              format: uuid
            email:
              type: string
              nullable: true
            display_name:
              type: string
              nullable: true
        scopes:
          type: array
          items:
            type: string
          description: >-
            Distinct `permissions` from the JWT for OAuth integration tokens;
            empty for first-party user sessions.
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            request_id:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'JWT access token. Send `Authorization: Bearer <token>`.'

````