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

# Selbst abrufen

## Berechtigungen

Es ist keine Berechtigung erforderlich. Mit jeder gültigen v3-Anmeldeinformation kann dieser Endpunkt aufgerufen werden, um die eigene Identität zu ermitteln – egal ob Service-Benutzer, Nutzer mit persönlichem Zugriffstoken (PAT), Devin-Sitzung oder Windsurf-Sitzung. Die Struktur der Antwort hängt vom `principal_type` des Aufrufers ab (`service_user`, `pat_user`, `devin_brain` oder `windsurf_session`).


## OpenAPI

````yaml de/v3-openapi.yaml GET /v3/self
openapi: 3.1.0
info:
  description: Devin v3 API mit Service-User-Authentifizierung und RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/self:
    get:
      tags:
        - self
      summary: Selbst abrufen
      operationId: handle_get_self_v3_self_get
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ServiceUserSelf'
                  - $ref: '#/components/schemas/PatUserSelf'
                  - $ref: '#/components/schemas/DevinBrainUserSelf'
                  - $ref: '#/components/schemas/WindsurfSessionUserSelf'
                title: Response Handle Get Self V3 Self Get
          description: Erfolgreiche Antwort
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Nicht autorisiert
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Zugriff verweigert
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Nicht gefunden
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Konflikt
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Inhalt kann nicht verarbeitet werden
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Zu viele Anfragen
components:
  schemas:
    ServiceUserSelf:
      description: Identitätsinformationen für einen authentifizierten Service-Benutzer.
      properties:
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        principal_type:
          const: service_user
          title: Principal Type
          type: string
        service_user_id:
          title: Service User Id
          type: string
        service_user_name:
          title: Service User Name
          type: string
      required:
        - principal_type
        - service_user_id
        - service_user_name
      title: ServiceUserSelf
      type: object
    PatUserSelf:
      description: Identitätsinformationen für einen authentifizierten PAT-Nutzer.
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        api_key_name:
          title: Api Key Name
          type: string
        devin_sessions_org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Organisation, in der die Devin-Cloud-Sitzungen des Aufrufers
            ausgeführt werden: die mit x-cog-org-id angegebene Organisation
            oder, ohne diese Angabe, die erste für den Nutzer sichtbare
            Organisation. In beiden Fällen kommt nur eine Organisation infrage,
            in der der Nutzer Devin-Sitzungen verwenden darf, niemals jedoch die
            primäre Organisation eines Unternehmens. Null, wenn keine solche
            Organisation vorhanden ist.
          title: Devin Sessions Org Id
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        primary_billing_org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Organisation, über die die CLI- und Desktop-Nutzung des Nutzers
            abgerechnet wird: die Organisation des Kontos oder, innerhalb eines
            Enterprise, die primäre Abrechnungsorganisation des Nutzers. Null,
            wenn keine vorhanden ist oder der Nutzer darin keine Devin-Sitzungen
            verwenden darf.
          title: Primary Billing Org Id
        principal_type:
          const: pat_user
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
        user_name:
          title: User Name
          type: string
      required:
        - principal_type
        - user_id
        - user_name
        - api_key_id
        - api_key_name
      title: PatUserSelf
      type: object
    DevinBrainUserSelf:
      description: Identitätsinformationen für eine authentifizierte Devin Brain-Sitzung.
      properties:
        creator_service_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Creator Service User Id
        devin_id:
          title: Devin Id
          type: string
        org_id:
          title: Org Id
          type: string
        principal_type:
          const: devin_brain
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
      required:
        - principal_type
        - devin_id
        - org_id
        - user_id
      title: DevinBrainUserSelf
      type: object
    WindsurfSessionUserSelf:
      description: >-
        Identitätsinformationen für einen authentifizierten Nutzer in einer
        Windsurf-Sitzung.
      properties:
        devin_sessions_org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Organisation, in der die Devin Cloud-Sitzungen des Aufrufers
            ausgeführt werden: die mit x-cog-org-id angegebene Organisation
            oder, ohne diese Angabe, die erste für den Nutzer sichtbare
            Organisation. In beiden Fällen muss es eine Organisation sein, in
            der der Nutzer Devin-Sitzungen verwenden darf; die primäre
            Organisation eines Enterprise-Kontos ist stets ausgeschlossen. Null,
            wenn keine solche Organisation vorhanden ist.
          title: Devin Sessions Org Id
        org_id:
          title: Org Id
          type: string
        primary_billing_org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Organisation, über die die CLI- und Desktop-Nutzung des Nutzers
            abgerechnet wird: die Organisation des Kontos oder bei einem
            Enterprise die primäre Abrechnungsorganisation des Nutzers. Null,
            wenn keine vorhanden ist oder der Nutzer darin keine Devin-Sitzungen
            verwenden darf.
          title: Primary Billing Org Id
        principal_type:
          const: windsurf_session
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
        user_name:
          anyOf:
            - type: string
            - type: 'null'
          title: User Name
      required:
        - principal_type
        - user_id
        - org_id
      title: WindsurfSessionUserSelf
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json-Fehlertext für die v3-API.


        detail wird aus dem Legacy-Body {"detail": ...} aus Gründen der
        Abwärtskompatibilität beibehalten; die

        anderen Member sind additiv. errors enthält Validierungsfehler auf
        Feldebene

        (nur 422).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: Eine menschenlesbare Erklärung, die speziell für diesen Fall gilt.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Maschinenlesbarer Code für die Ablehnung blockierter Aktionen (z. B.
            "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Validierungsfehler auf Feldebene (nur bei 422-Antworten).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: Eine URI-Referenz (der Anfragepfad) für diesen Fall.
          title: Instance
        status:
          description: Der HTTP-Statuscode.
          title: Status
          type: integer
        title:
          description: Eine kurze, menschenlesbare Zusammenfassung des Problemtyps.
          title: Title
          type: string
        type:
          default: about:blank
          description: Eine URI-Referenz, die den Problemtyp identifiziert.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Servicebenutzer-Anmeldedaten (Präfix: cog_)'
      scheme: bearer
      type: http

````

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