Current user

Make updates to the user to which the login token was issued.

Get profile

Retrieve the profile of the currently logged in user.

GET/me
Authorization
Response

OK

Body
id*string (uuid)

ID of the user

status*enum

The status of the user

pendingactivedeletedinvitedbanned
name*string

The display name for the user

biostring

The user's description

activeSessions*integer

The number of logged in session for the user.

createdAt*string (date-time)

When the user was created.

updatedAt*string (date-time)

When the user was last updated.

emails*array of UserEmail

Email addresses associated with user.

defaultEmailstring

The default email of the user in the list of emails.

identitiesarray of UserIdentity

Third-party identities associated with user.

avatarUrlstring

URL to the user's profile picture.

phoneNumberone of
phoneNumbers*array of UserPhoneNumber

The phone numbers associated with the user.

localelocale (string (locale-bcp47))
timezonestring (timezone)

The default timezone for the user.

badgesarray of enum
Request
const response = await fetch('/me', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "name": "text",
  "bio": "text",
  "createdAt": "2024-04-29T10:10:37.101Z",
  "updatedAt": "2024-04-29T10:10:37.101Z",
  "emails": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "email": "name@gmail.com",
      "verified": false,
      "passwordSet": false,
      "tokenSet": false,
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "defaultEmail": "text",
  "identities": [
    {
      "id": "text",
      "name": "text",
      "email": "text",
      "avatarUrl": "text",
      "provider": "text",
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "avatarUrl": "text",
  "phoneNumber": "text",
  "phoneNumbers": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "phoneNumber": "text",
      "verified": false,
      "primary": false,
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "locale": "text",
  "timezone": "text",
  "badges": [
    "messagebird:cx"
  ]
}

Update profile

Update the profile of the currently logged in user.

PATCH/me
Authorization
Body
nameproperties-name (string)

The display name for the user

biobio (string)

The user's description

avatarUrlavatarUrl (string)

URL to the user's profile picture.

localelocale (string (locale-bcp47))
timezonetimezone (string (timezone))

The default timezone for the user.

Response

OK

Body
id*string (uuid)

ID of the user

status*enum

The status of the user

pendingactivedeletedinvitedbanned
name*string

The display name for the user

biostring

The user's description

activeSessions*integer

The number of logged in session for the user.

createdAt*string (date-time)

When the user was created.

updatedAt*string (date-time)

When the user was last updated.

emails*array of UserEmail

Email addresses associated with user.

defaultEmailstring

The default email of the user in the list of emails.

identitiesarray of UserIdentity

Third-party identities associated with user.

avatarUrlstring

URL to the user's profile picture.

phoneNumberone of
phoneNumbers*array of UserPhoneNumber

The phone numbers associated with the user.

localelocale (string (locale-bcp47))
timezonestring (timezone)

The default timezone for the user.

badgesarray of enum
Request
const response = await fetch('/me', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "name": "text",
  "bio": "text",
  "createdAt": "2024-04-29T10:10:37.101Z",
  "updatedAt": "2024-04-29T10:10:37.101Z",
  "emails": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "email": "name@gmail.com",
      "verified": false,
      "passwordSet": false,
      "tokenSet": false,
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "defaultEmail": "text",
  "identities": [
    {
      "id": "text",
      "name": "text",
      "email": "text",
      "avatarUrl": "text",
      "provider": "text",
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "avatarUrl": "text",
  "phoneNumber": "text",
  "phoneNumbers": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "userId": "123e4567-e89b-12d3-a456-426614174000",
      "phoneNumber": "text",
      "verified": false,
      "primary": false,
      "createdAt": "2024-04-29T10:10:37.101Z",
      "updatedAt": "2024-04-29T10:10:37.101Z"
    }
  ],
  "locale": "text",
  "timezone": "text",
  "badges": [
    "messagebird:cx"
  ]
}

Delete profile

Delete the profile of the currently logged in user. Essentially deleting your account with the platform.

DELETE/me
Authorization
Response

OK

Request
const response = await fetch('/me', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();

Last updated