Edit Profile API

Allow authenticated users to update their own profile information

User

Edit Profile API

Update your personal profile information. Modify contact details, address, and other profile fields for your own account.

Self-Service

Users update own profile.

Personal Info

Name, contact, address.

Secure

Authenticated access only.


Endpoint Overview

MUTATION/graphql

Update the authenticated user's profile information including name, contact details, address, and date of birth.

Authentication:Bearer Token
Required scopes:user

Request Parameters

userProfile.firstNameString

User's first name.

userProfile.lastNameString

User's last name.

userProfile.phoneString

Contact phone number.

userProfile.addressString

Street address.

userProfile.cityString

City name.

userProfile.countryString

Country code or name.

userProfile.postalCodeString

Postal/ZIP code.

userProfile.birthDateString

Date of birth (YYYY-MM-DD format).


GraphQL Mutation

mutation editProfile($userProfile: UserProfileEdit!) {
  editProfile(userProfile: $userProfile) {
    firstName
    lastName
    phone
    address
    city
    country
    postalCode
    birthDate
  }
}

Variables:

{
  "userProfile": {
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+1234567890",
    "address": "456 Oak Avenue",
    "city": "Los Angeles",
    "country": "US",
    "postalCode": "90001",
    "birthDate": "1990-05-15"
  }
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_USER_TOKEN" \
  -d '{
    "query": "mutation editProfile($userProfile: UserProfileEdit!) { editProfile(userProfile: $userProfile) { firstName lastName phone city country } }",
    "variables": {
      "userProfile": {
        "firstName": "John",
        "lastName": "Doe",
        "phone": "+1234567890",
        "city": "Los Angeles"
      }
    }
  }'

Response

200Profile Updated Successfully
{
  "data": {
    "editProfile": {
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+1234567890",
      "address": "456 Oak Avenue",
      "city": "Los Angeles",
      "country": "US",
      "postalCode": "90001",
      "birthDate": "1990-05-15"
    }
  }
}
400Invalid Data
{
  "errors": [
    {
      "message": "Invalid phone number format",
      "path": ["editProfile"],
      "extensions": {
        "code": "INVALID_INPUT"
      }
    }
  ],
  "data": null
}

Editable Fields

Name

First and last name updates.

Contact

Phone number changes.

Address

Full address information.

Birth Date

Date of birth for records.


Best Practices

Partial Updates

Only include fields you want to change.

Validate Format

Ensure phone and date formats are correct.

Country Codes

Use standard ISO country codes.

Keep Updated

Accurate info helps with support.



Own Profile Only

This endpoint only allows users to edit their own profile. Admins should use Edit Profile by Admin to modify other users.

Need to Change Password?

Use the Change Password endpoint to update your account password.

Change Password