Link Search Menu Expand Document

Profile

A profile represents a Centrapay user’s attributes.

Contents

Models

Profile

Mandatory Fields

Field Type Description
userId String The Centrapay user id.

Optional Fields

Field Type Description
givenName String First name.
familyName String Last name.
featureUpdates Boolean Whether a user would like to receive emails for feature updates.
marketingUpdates Boolean Whether a user would like to receive emails for marketing updates.
email String Email address.
emailVerified Boolean Flag indicating the verification status of the email address.
phoneNumber String The user’s phone number.
phoneVerified Boolean Flag indicating the verification status of the phone number.

Operations

Update a Profile EXPERIMENTAL

Update a user’s mutable attributes. At least one field must be provided in the request.

POST /api/me/profile/update

curl -X POST https://service.centrapay.com/api/me/profile/update \
  -H "Authorization: $jwt" \
  -H "Content-Type: application/json" \
  -d '{
    "givenName": "John",
    "familyName": "Doe",
    "featureUpdates": false,
    "marketingUpdates": true,
    "email": "john.doe@centrapay.com"
  }'

Example response payload

{
  "givenName": "John",
  "familyName": "Doe",
  "featureUpdates": false,
  "marketingUpdates": true,
  "email": "john.doe@centrapay.com"
}

Get Profile EXPERIMENTAL

GET /api/users/{userId}/profile

curl https://service.centrapay.com/api/users/da75ad90-9a5b-4df0-8374-f48b3a8fbfcc/profile \
  -H "X-Api-Key: $api_key"

Example response payload

{
  "userId": "9f4b3bae-dc30-11ea-ab70-2743d9be3dd5",
  "givenName": "John",
  "familyName": "Doe",
  "featureUpdates": true,
  "marketingUpdates": true,
  "email": "john.doe@centrapay.com",
  "emailVerified": true,
  "phoneNumber": "+64271112222",
  "phoneVerified": true
}