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

# List active leases for a connection

> Returns leases attached to the connection that are not revoked and have not expired. Lease tokens themselves are never returned in list responses — only the lease metadata (id, capability, scopes, TTL, granted-at, last-used-at).



## OpenAPI

````yaml /openapi.json get /connections/{id}/lease-tokens
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /connections/{id}/lease-tokens:
    get:
      tags:
        - Connection Leased Tokens
      summary: List active leases for a connection
      description: >-
        Returns leases attached to the connection that are not revoked and have
        not expired. Lease tokens themselves are never returned in list
        responses — only the lease metadata (id, capability, scopes, TTL,
        granted-at, last-used-at).
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Active (non-revoked, non-expired) leases
          content:
            application/json:
              schema:
                type: object
                properties:
                  leases:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        connection_id:
                          type: string
                        tenant_id:
                          type: string
                          nullable: true
                        capability_id:
                          type: string
                        scopes:
                          type: array
                          items:
                            type: string
                        expires_at:
                          type: string
                        revoked_at:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                      required:
                        - id
                        - connection_id
                        - tenant_id
                        - capability_id
                        - scopes
                        - expires_at
                        - revoked_at
                        - created_at
                required:
                  - leases
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unauthorized
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '403':
          description: Caller cannot read this connection
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - forbidden
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Connection not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or OAuth Token
      description: Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)

````