Update your own profile

Overview

Change the name, phone, title, email or password of the user you're logged in as.

Every call overwrites first_name, last_name, phone_number and email, so send the current values for the fields you aren't changing. title is only changed when you send one.

Use this for a settings screen.

You'll need the user's own token.

The profile is updated.

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/users/profile/update

Authentication

Partner or Account token

  • Acts on the user the token belongs to. There is no id to pass.
  • email must not be used by another user.
  • Setting password signs the user out everywhere: all of their tokens are revoked, including the one used for this call (the API key from the dashboard's API Keys page is kept). Sign in again afterwards.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredNotes
first_namestringYes2 to 100 characters. Can't contain < or >.
last_namestringYesUp to 100 characters. Can't contain < or >.
phone_numberstringYes9 to 15 characters. Can't contain < or >.
titlestringNoJob title. Up to 100 characters. Can't contain < or >. Left out or null, the current title is kept.
emailstringYesA valid email address, not used by another user.
passwordstringNoA new password: 8 to 100 characters, with upper- and lower-case letters, a number and a symbol. No quotes, backslashes or spaces. Leave it out, empty or null to keep the current password.

Request payload

{
  "first_name": "Jane",
  "last_name": "Doe",
  "phone_number": "+15555550100",
  "title": "Owner",
  "email": "[email protected]",
  "password": null
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
responsestringSaved Successfully

Response payload

{
  "data": {
    "status": "success",
    "response": "Saved Successfully"
  }
}

Examples

Success payload

See Response payload.

Error payload

422 Required fields missing

{
  "message": "The first name field is required. (and 3 more errors)",
  "errors": {
    "first_name": [
      "The first name field is required."
    ],
    "phone_number": [
      "The phone number field is required."
    ],
    "last_name": [
      "The last name field is required."
    ],
    "email": [
      "The email field is required."
    ]
  }
}

422 Values too short, weak password

{
  "message": "The first name field must be at least 2 characters. (and 5 more errors)",
  "errors": {
    "first_name": [
      "The first name field must be at least 2 characters."
    ],
    "phone_number": [
      "The phone number field must be at least 9 characters."
    ],
    "password": [
      "The password field must be at least 8 characters.",
      "The password field format is invalid.",
      "The password field must contain at least one uppercase and one lowercase letter.",
      "The password field must contain at least one number."
    ]
  }
}
StatusMeaning
200The profile was saved.
401The token is missing, expired or invalid.
422A field is missing or invalid, or the email is used by another user.
500Unexpected server error. Nothing was saved.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/users/profile/update" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"first_name": "Jane", "last_name": "Doe", "phone_number": "+15555550100", "title": "Owner", "email": "[email protected]", "password": null}'

Did this page help you?