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

# Get an approval

> Fetch a single approval this app submitted, including its resolution once the owner decides. Requires the `approvals:read` scope.



## OpenAPI

````yaml /api-reference/openapi.json get /api/approvals/{id}
openapi: 3.1.0
info:
  title: ego API
  version: 0.0.0
  description: >-
    Preview specification for the ego API. ego sits between your data and the
    agents that read it, granting access one scope at a time. Each endpoint
    requires the native scope named in its description, granted on the consent
    screen and carried on the bearer token.
servers:
  - url: https://api.myego.dev
    description: Preview — not yet live
security:
  - bearerAuth: []
paths:
  /api/approvals/{id}:
    get:
      tags:
        - Approvals
      summary: Get an approval
      description: >-
        Fetch a single approval this app submitted, including its resolution
        once the owner decides. Requires the `approvals:read` scope.
      operationId: getApproval
      parameters:
        - name: id
          in: path
          required: true
          description: Identifier of the approval.
          schema:
            type: string
      responses:
        '200':
          description: The approval.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Approval'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Approval:
      type: object
      required:
        - _id
        - _creationTime
        - clientId
        - question
        - options
        - status
      properties:
        _id:
          type: string
          description: Identifier of the approval.
          examples:
            - k1722abcd
        _creationTime:
          type: number
          description: Creation timestamp, in epoch milliseconds.
        clientId:
          type: string
          description: The app that submitted the approval.
        question:
          type: string
          examples:
            - Ship the 2.0 release?
        options:
          type: array
          items:
            $ref: '#/components/schemas/ApprovalOption'
        backgroundContext:
          type: string
        recommendation:
          type: string
        status:
          type: string
          enum:
            - pending
            - resolved
        resolution:
          $ref: '#/components/schemas/ResolvedResolution'
    ApprovalOption:
      type: object
      required:
        - id
        - label
      properties:
        id:
          type: string
          description: Stable identifier for the option, returned in the resolution.
          examples:
            - ship
        label:
          type: string
          description: Human-readable label shown to the owner.
          examples:
            - Ship it
        note:
          type: string
          description: Optional detail shown beneath the label.
    ResolvedResolution:
      type: object
      required:
        - kind
        - resolvedBy
        - resolvedAt
      description: >-
        The resolution recorded on a resolved approval. `resolvedBy` is the role
        that resolved it, never an identity.
      properties:
        kind:
          type: string
          enum:
            - option
            - other
        optionId:
          type: string
          description: The chosen option's `id`, present when `kind` is `option`.
        otherText:
          type: string
          description: Free-text answer, present when `kind` is `other`.
        note:
          type: string
        resolvedBy:
          type: string
          description: The role that resolved the approval.
          enum:
            - owner
            - api
        resolvedAt:
          type: integer
          description: Resolution timestamp, in epoch milliseconds.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A human-readable error message.
          examples:
            - Unauthorized
  responses:
    Unauthorized:
      description: The token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The token lacks the scope this endpoint requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
    NotFound:
      description: No such resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your ego access token as a bearer token: `Authorization: Bearer
        <token>`. The token carries the scopes granted on the consent screen.

````