Profiles

A profile represents a Centrapay user’s attributes.

Attributes

  • userId

    string

    The Centrapay user id.

  • 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.


POST /api/me/profile/update

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

Attributes

  • 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.

Request
curl -X POST \
https://service.centrapay.com/api/me/profile/update \
-H 'authorization: <TOKEN>' \
-H 'content-type: application/json' \
-d '
{
"givenName": "John",
"familyName": "Doe",
"featureUpdates": false,
"marketingUpdates": true,
"email": "john.doe@centrapay.com"
}
'
Response
{
"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
}

GET /api/users/{userId}/profile

This endpoint allows you to retrieve a user’s Profile.

Request
curl -X GET \
https://service.centrapay.com/api/users/da75ad90-9a5b-4df0-8374-f48b3a8fbfcc/profile \
-H 'x-api-key: <TOKEN>'
Response
{
"givenName": "John",
"familyName": "Doe",
"featureUpdates": false,
"marketingUpdates": true,
"email": "john.doe@centrapay.com"
}