Skip to main content
PATCH
/
profile-update
Update profile
curl --request PATCH \
  --url https://aarwcjjzhlmkgdwrisyt.supabase.co/functions/v1/profile-update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "Ade",
  "username": "adejohnson",
  "bio": "Escrow enthusiast",
  "avatar_url": "https://cdn.example.com/avatars/ade.jpg",
  "storage_path": "avatars/a1b2c3d4/profile.jpg"
}
'
{
  "success": true,
  "status": 200,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "first_name": "<string>",
    "last_name": "<string>",
    "username": "<string>",
    "phone_number": "<string>",
    "address": "<string>",
    "marital_status": "<string>",
    "bio": "<string>",
    "avatar": {
      "avatar_url": "<string>",
      "storage_path": "<string>",
      "status": "active"
    },
    "next_of_kin": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "first_name": "<string>",
      "last_name": "<string>",
      "phone": "<string>",
      "address": "<string>",
      "relationship": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_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

All fields optional. Send only what needs to change. Phone number cannot be updated via API.

first_name
string
Required string length: 1 - 100
last_name
string
Required string length: 1 - 100
username
string

Letters, numbers, and underscores only

Required string length: 3 - 30
Pattern: ^[a-zA-Z0-9_]+$
address
string
Maximum string length: 500
marital_status
enum<string>
Available options:
single,
married,
divorced,
widowed
bio
string
Maximum string length: 300
avatar_url
string<uri>
storage_path
string

Supabase Storage path for the avatar file

Response

Profile updated — full profile returned

success
boolean
Example:

true

status
integer
Example:

200

data
object