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

# Retrieve the authenticated user



## OpenAPI

````yaml get /user
openapi: 3.0.0
info:
  title: Identity
  description: ''
  version: 0.0.1
  contact:
    name: Delay Support
    url: https://d3lay.com/support
    email: dev@d3lay.com
servers:
  - url: http://localhost:{port}
    description: Local development server
    variables:
      port:
        enum:
          - '80'
          - '8080'
        default: '8080'
  - url: https://hive.test.delay.dev
    description: Integration testing server
security: []
tags:
  - name: User
  - name: Workspace
paths:
  /user:
    get:
      tags:
        - User
      summary: Retrieve the authenticated user
      parameters:
        - $ref: '#/components/parameters/APIVersionHeader'
        - $ref: '#/components/parameters/ContentTypeHeader'
      responses:
        '200':
          description: Success
          headers:
            X-Message:
              $ref: '#/components/headers/X-Message'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                success:
                  summary: User retrieved
                  value:
                    id: d4add56e-c345-4ac9-b392-7a890a60559a
                    identifier: ben
                    name: Benjamin Zhang
                    email: z@benwk.com
                    user_type: saas_admin
                    status: active
                    created_at: '2023-05-06T00:00:00Z'
                    updated_at: '2023-05-06T00:00:00Z'
                    created_by: 98d91cd7-860d-4869-937a-5af32eff2f4a
                    updated_by: 98d91cd7-860d-4869-937a-5af32eff2f4a
          links: {}
        '400':
          links: {}
          description: Bad Request
          headers:
            X-Message:
              description: Message for the API request
              schema:
                type: string
              example: >
                Data retrieved successfully Data not found Data created
                successfully Data updated successfully Data deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Detailed error message.
                    example: Bad Request.
                required:
                  - error
              examples:
                badRequest:
                  summary: Bad Request
                  value:
                    error: Bad Request.
        '401':
          links: {}
          description: Access token is missing or invalid
          headers:
            X-Message:
              description: Message for the API request
              schema:
                type: string
              example: >
                Data retrieved successfully Data not found Data created
                successfully Data updated successfully Data deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Detailed error message.
                    example: Unauthorized.
                required:
                  - error
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    error: Access token is missing or invalid.
        '403':
          links: {}
          description: Access Forbidden
          headers:
            X-Message:
              description: Message for the API request
              schema:
                type: string
              example: >
                Data retrieved successfully Data not found Data created
                successfully Data updated successfully Data deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Detailed error message.
                    example: Access forbidden.
                required:
                  - error
              examples:
                forbidden:
                  summary: Forbidden
                  value:
                    error: Access forbidden.
        '404':
          links: {}
          description: Not found
          headers:
            X-Message:
              description: Message for the API request
              schema:
                type: string
              example: >
                Data retrieved successfully Data not found Data created
                successfully Data updated successfully Data deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Detailed error message.
                    example: Not Found.
                required:
                  - error
              examples:
                notFound:
                  summary: Not found
                  value:
                    error: Data not found.
        '429':
          links: {}
          description: Too Many Requests
          headers:
            X-Rate-Limit-Limit:
              description: >-
                The maximum number of requests that the client can make in a
                given time frame.
              schema:
                type: integer
              example: 1000
            X-Rate-Limit-Duration:
              description: The duration (in seconds) for which the rate limit applies.
              schema:
                type: integer
              example: 3600
            X-Rate-Limit-Request-Forwarded-For:
              description: The originating IP address of the client making the request.
              schema:
                type: string
              example: 192.0.2.1
            X-Rate-Limit-Request-Remote-Addr:
              description: The IP address of the client making the request to the server.
              schema:
                type: string
              example: '[::1]:57500'
          content:
            text/plain:
              schema:
                type: string
                example: You have reached maximum request limit.
              examples:
                tooManyRequests:
                  summary: Too Many Requests
                  value: You have reached maximum request limit.
        '500':
          $ref: f3448cdd-8abe-41a4-91cb-986f10eefabc
          links: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  parameters:
    APIVersionHeader:
      name: X-API-Version
      in: header
      description: Your API version
      schema:
        type: string
        enum:
          - v1
        default: v1
    ContentTypeHeader:
      name: Content-Type
      in: header
      description: ''
      required: false
      example: application/json
      schema:
        type: string
        enum:
          - application/json
          - application/xml
          - application/x-www-form-urlencoded
          - application/octet-stream
          - application/pdf
          - text/plain
          - text/html
          - multipart/form-data
  headers:
    X-Message:
      description: Message for the API request
      schema:
        type: string
      example: >
        Data retrieved successfully Data not found Data created successfully
        Data updated successfully Data deleted successfully
  schemas:
    UserResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
        identifier:
          type: string
          example: ben
        name:
          type: string
          example: Benjamin Zhang
        email:
          type: string
          format: email
          example: z@benwk.com
        user_type:
          type: string
          enum:
            - saas_admin
            - saas_user
            - saas_user_client
          example: saas_user
        status:
          type: string
          enum:
            - active
            - onboarding
            - inactive
            - suspended
            - risky
          example: active
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
          description: REQUIRE metadata permissions
        updated_by:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
          description: REQUIRE metadata permissions
      required:
        - id
        - identifier
        - name
        - email
        - user_type
        - status
        - created_at
        - updated_at
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````