> ## 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.

# Issue a runtime credential

> Mints a short-lived API key scoped to a single connection. The runtime-control plane calls this to provision the credential a per-integration Worker presents when invoking Marfa on the connection's behalf. The `api_key` field is returned **once**; subsequent reads omit it.



## OpenAPI

````yaml /openapi.json post /system/runtime-credentials
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /system/runtime-credentials:
    post:
      tags:
        - System
      summary: Issue a runtime credential
      description: >-
        Mints a short-lived API key scoped to a single connection. The
        runtime-control plane calls this to provision the credential a
        per-integration Worker presents when invoking Marfa on the connection's
        behalf. The `api_key` field is returned **once**; subsequent reads omit
        it.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                connection_id:
                  type: string
                  minLength: 1
                label:
                  type: string
                  minLength: 1
                  maxLength: 200
                source:
                  type: string
                  minLength: 1
                  maxLength: 200
                type_permissions:
                  type: object
                  additionalProperties:
                    type: string
                    enum:
                      - read
                      - write
                      - none
                extension_permissions:
                  type: object
                  additionalProperties:
                    type: string
                    enum:
                      - read
                      - write
                edge_permissions:
                  type: object
                  additionalProperties:
                    type: string
                    enum:
                      - read
                      - write
                ttl_seconds:
                  type: integer
                  minimum: 60
                  maximum: 3600
              required:
                - connection_id
                - label
                - source
      responses:
        '201':
          description: >-
            Runtime credential minted. The api_key is returned ONCE and never
            again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  api_key:
                    type: string
                  connection_id:
                    type: string
                  label:
                    type: string
                  source:
                    type: string
                  expires_at:
                    type: string
                  created_at:
                    type: string
                required:
                  - id
                  - api_key
                  - connection_id
                  - label
                  - source
                  - expires_at
                  - created_at
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - validation_error
                          - missing_required_field
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '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 lacks is_platform: true'
          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
        '409':
          description: source collision for tenant
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - conflict
                      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_...)

````