Skip to main content
POST
/
milestone-create
Propose a milestone
curl --request POST \
  --url https://aarwcjjzhlmkgdwrisyt.supabase.co/functions/v1/milestone-create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "escrow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Design mockups",
  "description": "Deliver Figma screens for all main flows",
  "amount": 150000,
  "due_date": "2026-05-01"
}
'
{
  "success": true,
  "status": 201,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "escrow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "milestone_index": 1,
    "title": "Design mockups",
    "description": "Deliver Figma screens for all main flows",
    "amount": 150000,
    "due_date": "2026-05-01",
    "status": "proposed",
    "initiator_approved": true,
    "counterparty_approved": true,
    "changes_note": "Please split into two separate milestones",
    "release_tx_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "accepted_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "released_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

JWT access token obtained from /auth-verify (login context) or /auth-signup. Set the bearer_token environment variable in your API client to apply it globally.

Body

application/json
escrow_id
string<uuid>
required
title
string
required
Required string length: 1 - 200
Example:

"Design mockups"

amount
number
required
Required range: x > 0
Example:

150000

description
string
Maximum string length: 2000
Example:

"Deliver Figma screens for all main flows"

due_date
string<date>
Example:

"2026-05-01"

Response

Milestone proposed

success
boolean
Example:

true

status
integer
Example:

201

data
object