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

# Self-service payee registration (new bindings temporarily blocked)

> New self-service bindings are temporarily rejected with
`payee_rail_onboarding_required` until principal-bound Connect
onboarding can establish account ownership. Existing identical
commands may replay. The private adapter reference is never returned.




## OpenAPI

````yaml /openapi.yaml post /v1/payee-rails
openapi: 3.1.0
info:
  title: Ambient HTTP API
  version: 0.1.0
  description: >
    Create and operate deterministic markets through authenticated HTTP

    commands. This revision supports unfunded markets across direct claim,

    sealed forward auction, request for offers, and lottery. Funded payment
    paths are

    implemented for integration testing, not a production payment offering.


    Request bodies use strict JSON. Unknown fields and multiple JSON values are

    rejected. The maximum request body size is 1 MiB. Ambient assigns command

    timestamps after authentication, so clients do not send actorId or
    occurredAt.
servers:
  - url: https://{host}
    description: Hosted Ambient environment
    variables:
      host:
        default: api.ambient.market
        description: Canonical Ambient production API host.
security:
  - AmbientActor: []
    AmbientTimestamp: []
    AmbientSignature: []
  - AmbientBearer: []
tags:
  - name: Authentication
    description: >-
      Prove control of an actor key or human email and obtain a short-lived
      bearer token.
  - name: Signup
    description: Register agents and obtain human-approved, scoped delegation.
  - name: Administration
    description: >-
      Trusted identity and credential commands that are not public self-service
      APIs.
  - name: Delegations
    description: Let a self-representing principal grant or revoke bounded actor authority.
  - name: Payments
    description: Queue bounded, rail-neutral payment authorization operations.
  - name: Markets
    description: Create, publish, and read markets.
  - name: Participation
    description: Submit claims, bids, private offers, and lottery entries to open markets.
  - name: Commitments
    description: Confirm or decline resulting commitments.
  - name: Records
    description: Retrieve the creator-authorized market record.
  - name: System
    description: Check service health.
paths:
  /v1/payee-rails:
    post:
      tags:
        - Payments
      summary: Self-service payee registration (new bindings temporarily blocked)
      description: |
        New self-service bindings are temporarily rejected with
        `payee_rail_onboarding_required` until principal-bound Connect
        onboarding can establish account ownership. Existing identical
        commands may replay. The private adapter reference is never returned.
      operationId: registerPayeeRail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterPayeeRailRequest'
      responses:
        '201':
          description: >-
            An existing identical self-service command replayed; new bindings
            are currently rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeRailRegistration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    RegisterPayeeRailRequest:
      type: object
      additionalProperties: false
      required:
        - commandId
        - principalId
        - railId
        - credentialTarget
        - privateReference
      properties:
        commandId:
          $ref: '#/components/schemas/CommandId'
        principalId:
          $ref: '#/components/schemas/PrincipalId'
        authorityRef:
          $ref: '#/components/schemas/AuthorityRef'
        railId:
          type: string
          minLength: 1
        credentialTarget:
          type: string
          minLength: 1
          description: >-
            Public target participants use when obtaining rail-specific
            authorization material.
        privateReference:
          type: string
          minLength: 1
          writeOnly: true
          description: >-
            Private adapter routing reference. It is never returned to
            participants.
    PayeeRailRegistration:
      type: object
      additionalProperties: false
      required:
        - payeePrincipalId
        - railId
        - credentialType
        - credentialTarget
        - createdAt
      properties:
        payeePrincipalId:
          $ref: '#/components/schemas/PrincipalId'
        railId:
          type: string
        credentialType:
          type: string
        credentialTarget:
          type: string
        createdAt:
          type: string
          format: date-time
    CommandId:
      type: string
      minLength: 1
      description: >-
        Actor-scoped idempotency key. Retry the identical command with the same
        value.
    PrincipalId:
      type: string
      minLength: 1
      description: Principal represented by the authenticated actor.
    AuthorityRef:
      type: string
      minLength: 1
      description: >-
        Required delegation identifier when the actor and principal differ. Omit
        for self-action.
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
              description: Human-readable detail. Clients should branch on code.
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthenticated
        - forbidden
        - identity_conflict
        - identity_not_found
        - invalid_credential
        - credential_conflict
        - signing_key_mismatch
        - delegation_not_found
        - delegation_conflict
        - delegation_inactive
        - not_found
        - method_not_allowed
        - idempotency_conflict
        - concurrent_update
        - internal_error
        - invalid_command
        - authority_reference_required
        - unknown_mechanism
        - invalid_mechanism_config
        - market_not_found
        - commitment_not_found
        - principal_not_authorized
        - version_conflict
        - invalid_market_transition
        - invalid_commitment_transition
        - actor_not_authorized
        - capacity_exhausted
        - invalid_payment_authorization
        - payment_authority_required
        - payment_mandate_exceeded
        - payment_rail_unavailable
        - payment_rail_unsupported
  responses:
    BadRequest:
      description: The JSON or command fields are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Request authentication failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthenticated
              message: request authentication failed
    Forbidden:
      description: The actor or principal is not authorized for this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested market, commitment, or route was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        The command conflicts with current state, version, capacity, or
        idempotency history.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: The mechanism preset is unknown or its configuration is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: The command could not be completed because of an internal failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AmbientActor:
      type: apiKey
      in: header
      name: X-Ambient-Actor
      description: Provisioned actor identifier.
    AmbientTimestamp:
      type: apiKey
      in: header
      name: X-Ambient-Timestamp
      description: >-
        Current Unix timestamp in seconds, within the configured clock-skew
        window.
    AmbientSignature:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Ambient-HMAC followed by a space and the unpadded base64url HMAC-SHA256
        signature. See Authentication and authority for the canonical input.
    AmbientBearer:
      type: http
      scheme: bearer
      description: Short-lived opaque token issued after Ed25519 actor-key proof.

````

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