{"openapi":"3.1.0","info":{"title":"Larkspur Bank sandbox transfers (fictional)","version":"0.1.0","description":"A Personal Agent Protocol 1.0 API. Every request carries Poppy-Session and Poppy-Version headers; requests are signed out (Larkspur has no sign-in in v0) and act on a sandbox account per Personal Agent and User ID. POST /transfers can return approval_required or approval_declined (Operations extension version 3). It does so only for a request that declares Poppy-Extensions: \"operations\";v=\"3\", \"facesign.ai/approval-assurance\";v=\"1\", and adds an approval_assurance member and approval_pending (facesign.ai/approval-assurance version 1, proposal v3)."},"servers":[{"url":"https://pap.facesign.dev/api"}],"paths":{"/payees":{"get":{"operationId":"listPayees","summary":"List saved payees","parameters":[{"$ref":"#/components/parameters/PoppySession"},{"$ref":"#/components/parameters/PoppyVersion"},{"$ref":"#/components/parameters/PoppyExtensions"}],"responses":{"200":{"description":"Payees","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayeeList"}}}},"400":{"description":"invalid_session, session_ended or version_unsupported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/transfers":{"get":{"operationId":"listTransfers","summary":"List transfers and the balance","parameters":[{"$ref":"#/components/parameters/PoppySession"},{"$ref":"#/components/parameters/PoppyVersion"},{"$ref":"#/components/parameters/PoppyExtensions"}],"responses":{"200":{"description":"Transfers"},"400":{"description":"invalid_session, session_ended or version_unsupported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"sendTransfer","summary":"Send a transfer","description":"A transfer to a saved payee for 500.00 USD or less is sent directly. Any other transfer needs the User's approval: the response is 403 approval_required with the operation and an approval_assurance member (acr_values, max_age, delivery, approval_uri). Don't take the User's answer in your own interface: give the User approval_uri, then send the same request again with Poppy-Approval and approver=\"user\". Until Larkspur has accepted evidence of the check, the response is 403 approval_pending with Retry-After; if the User declined or withdrew, or the approval says approver=\"agent\", 403 approval_declined with a reason. With accepted evidence, the transfer is sent at most once. A request that doesn't declare both extensions in Poppy-Extensions gets 403 extension_required.","parameters":[{"$ref":"#/components/parameters/PoppySession"},{"$ref":"#/components/parameters/PoppyVersion"},{"$ref":"#/components/parameters/PoppyExtensions"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}},{"name":"Poppy-Approval","in":"header","required":false,"description":"RFC 9651 Dictionary: operation_id=\"...\", revision=\"...\", approver=\"user\", and optionally approved_at, input_type and reference (Operations 6).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"}}}},"responses":{"201":{"description":"Sent"},"400":{"description":"invalid_session, session_ended, version_unsupported or invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"approval_required, approval_pending, approval_declined, or extension_required (JSON body, with `extension`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"insufficient_funds or idempotency_key_reused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"operation_in_progress; retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"PoppySession":{"name":"Poppy-Session","in":"header","required":true,"description":"Session JWT (spec 5.2).","schema":{"type":"string"}},"PoppyVersion":{"name":"Poppy-Version","in":"header","required":true,"description":"The protocol version the Personal Agent implements, such as 1.0 (spec 3.4).","schema":{"type":"string"}},"PoppyExtensions":{"name":"Poppy-Extensions","in":"header","required":false,"description":"RFC 9651 List of the extensions the Personal Agent uses, each with its version in `v` (spec 3.4).","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"error_description":{"type":"string"},"extension":{"type":"string","description":"With extension_required: the extension the request must declare."},"operation_id":{"type":"string","description":"With approval_pending and approval_declined."},"revision":{"type":"string","description":"With approval_pending and approval_declined."},"reason":{"type":"string","description":"With approval_declined: why, in plain language for the User (Operations 6)."}}},"PayeeList":{"type":"object","properties":{"account":{"type":"object"},"payees":{"type":"array","items":{"type":"object","properties":{"payee_id":{"type":"string"},"name":{"type":"string"},"account_last4":{"type":"string"},"routing_number":{"type":"string"}}}}}},"TransferRequest":{"type":"object","required":["amount","currency"],"properties":{"payee_id":{"type":"string"},"new_payee":{"type":"object","required":["name","account_number","routing_number"],"properties":{"name":{"type":"string"},"account_number":{"type":"string"},"routing_number":{"type":"string"}}},"amount":{"type":"string","pattern":"^\\d{1,7}(\\.\\d{1,2})?$","examples":["120.00"]},"currency":{"const":"USD"},"memo":{"type":"string","maxLength":80}}}}}}