Skip to main content
Use these two endpoints to read and update the authenticated user’s account profile. The GET endpoint returns a focused set of fields suited to account dashboards. The PATCH endpoint accepts any combination of the writable fields — only fields you include are updated.

GET /v1/accounts/me

Fetch the current account profile. GET /v1/accounts/me Requires a Bearer token in the Authorization header.

Example

curl --request GET \
  --url "https://api.nyotaimara.com/v1/accounts/me" \
  --header "Authorization: Bearer <token>"

Response

success
boolean
required
true when the request succeeded.
data
object
required
The account profile.
{
  "success": true,
  "data": {
    "name": "Jane Doe",
    "email": "jane@example.com",
    "avatarUrl": "https://cdn.nyotaimara.com/avatars/user-1714000000000-abc123.jpg",
    "phone": "+254700000000",
    "dob": "1990-05-14",
    "kycStatus": "verified"
  }
}

PATCH /v1/accounts/me

Update one or more profile fields. PATCH /v1/accounts/me Requires a Bearer token in the Authorization header.

Request

All fields are optional. At least one field must be provided.
firstName
string
Updated given name.
lastName
string
Updated family name.
phone
string
Updated phone number.
dob
string
Updated date of birth. Accepts any value parseable by new Date(), e.g. "1990-05-14".
avatarUrl
string
Public CDN URL of a newly uploaded avatar. Obtain this URL from POST /v1/auth/avatar first.

Example

curl --request PATCH \
  --url "https://api.nyotaimara.com/v1/accounts/me" \
  --header "Authorization: Bearer <token>" \
  --header "Content-Type: application/json" \
  --data '{"firstName": "Jane", "phone": "+254711111111"}'

Response

success
boolean
required
true when the update was applied.
message
string
required
Human-readable confirmation message.
{
  "success": true,
  "message": "Profile updated successfully"
}
Error cases
StatusErrorDescription
400No valid fields provided for updateThe request body contained no recognised fields.
401Missing or invalid Bearer token.
404Profile not foundNo user record exists for the authenticated user (GET only).
500Failed to fetch/update profileAn unexpected server-side error occurred.