Pay Endpoint
POST
/api/v1/envelopes/{envelope_id}/pay
const url = 'https://example.com/api/v1/envelopes/1/pay';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"amount":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/envelopes/1/pay \ --header 'Content-Type: application/json' \ --data '{ "amount": 1 }'Pay the envelope. An optional Idempotency-Key header makes a repeated call with the
same key (double click, retry after a lost response) a no-op that returns the envelope.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”envelope_id
required
Envelope Id
integer
Header Parameters
Section titled “Header Parameters”Request Body
Section titled “Request Body”Media typeapplication/json
Any of:
null
Example generated
{ "amount": 1}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
EnvelopeOut
object
id
required
Id
integer
user_id
required
User Id
integer
name
required
Name
string
target_amount
required
Target Amount
string
due_date
required
Due Date
string format: date
archived
required
Archived
boolean
effective_schedule
Any of:
EffectiveScheduleOut
The pay schedule an envelope or goal actually uses: its pick, else the user’s default.
object
id
required
Id
integer
name
required
Name
string
is_default
required
Is Default
boolean
null
funded_amount
Funded Amount
string
remaining_amount
Remaining Amount
string
suggested_monthly
Suggested Monthly
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Example
{ "funded_amount": "0", "remaining_amount": "0", "suggested_monthly": "0"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}