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
- The user's own bearer token. See Authentication.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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.
emailmust not be used by another user.- Setting
passwordsigns 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
| Field | Type | Required | Notes |
|---|---|---|---|
first_name | string | Yes | 2 to 100 characters. Can't contain < or >. |
last_name | string | Yes | Up to 100 characters. Can't contain < or >. |
phone_number | string | Yes | 9 to 15 characters. Can't contain < or >. |
title | string | No | Job title. Up to 100 characters. Can't contain < or >. Left out or null, the current title is kept. |
email | string | Yes | A valid email address, not used by another user. |
password | string | No | A 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.
| Field | Type | Description |
|---|---|---|
status | string | success. |
response | string | Saved 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."
]
}
}| Status | Meaning |
|---|---|
200 | The profile was saved. |
401 | The token is missing, expired or invalid. |
422 | A field is missing or invalid, or the email is used by another user. |
500 | Unexpected 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}'Updated 17 days ago
Did this page help you?
