Skip to content

Save Personal Profile

Create or update a user's personal profile information.

This endpoint creates or updates the personal profile information for a specific user. It allows setting sensitive personal data, contact details, and occupation information.

Please note that all properties are replaced with the values from the request payload. If a property is not specified, it will be replaced with an empty value.

Any change results in a new version.

Endpoint

MethodUrl
PUT/v1.0/users/:user_id/personal-profile

Path Parameters

user_id
string
required

The unique identifier of the user whose profile is being saved.

Request Body

Warning

Given this is a PUT, when a property is omitted, it will be defaulted to null. This applies to nested objects as well. For example, if the existing profile has a personal_info.middle_initial defined, if omitted from the next save request, the property will be set to null.

personal_info
object
required

Object containing the individual's personal information. See the personal info object.

occupation
string

The individual's occupation.

contact_info
object

Object containing the user's contact details. See the contact info object.

Sample Request

Copied
1curl -X PUT 'https://api.worklayer.com/v1.0/users/3b31f309-93ad-463a-ad1d-c39cac1c0a3d/personal-profile' \
2-H 'Authorization: Bearer {token}' \
3-H 'Content-Type: application/json' \
4-d '{
5 "personal_info": {
6 "first_name": "John",
7 "last_name": "Doe",
8 "date_of_birth": "01/01/1990"
9 },
10 "occupation": "Software Developer",
11 "contact_info": {
12 "email": "john.doe@example.com",
13 "phone_number": "+1-555-555-5555"
14 }
15}'

Response

id
string

Unique identifier of the saved profile.

version
integer

Version number of the saved profile.

Sample Response

Copied
1{
2 "id": "550e8400-e29b-41d4-a716-446655440000",
3 "version": 1
4}

Errors

  • 400: invalid request body
  • 403: you're not allowed to save the profile
Last updated on November 1, 2024