Skip to main content

Update a user profile

PATCH /v2/users/profile

Updates the first name, last name, or phone number of the existing user identified by the bearer token. This endpoint does not create a user or accept a user ID in the path or request body.

Security​

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

This endpoint requires a user access token with the connect:users:update_profile scope. A client_credentials token and the broader connect:users scope alone are not sufficient.

To get a user access token, your OAuth application must be configured for the external_user_assertion grant and the connect:users:update_profile scope. Send a request to POST /v2/oauth/token with these form parameters:

  • grant_type: external_user_assertion
  • client_id and client_secret: your application credentials. Keep the client secret on your server.
  • assertion: Base64-encoded JSON containing {"external_user_id":"<provider_uid>"}, where provider_uid identifies an existing user in your integration. The assertion is not a JSON Web Token (JWT).
  • scope: connect:users:update_profile

The grant does not create users.

Parameters​

None.

Request​

Omitted, empty-string, and null fields preserve the existing values. You can't clear a field with this endpoint. Send a JSON object. An empty object ({}) returns the current profile without changing it, but an empty HTTP request body is invalid.

FieldTypeRequiredDescription
first_namestringOptional

New first name. Omitted, empty, or null values preserve the existing value.

last_namestringOptional

New last name. Omitted, empty, or null values preserve the existing value.

phone_numberstringOptional

New phone number. Use E.164 format, such as +14155550123. Spaces and dashes are removed. Omitted, empty, or null values preserve the existing value.

Request examples​

curl --request PATCH \
--url https://connect.instacart.com/v2/users/profile \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+1 415-555-0123"
}'

Response​

A successful request returns the first_name, last_name, and phone_number fields directly, without a data wrapper.

FieldTypeRequiredDescription
first_namestringRequired

The user's first name after the update.

last_namestringRequired

The user's last name after the update.

phone_numberstringRequired

The user's phone number after the update.

Response examples​

The default rate limit is 50 requests per 10 seconds per user for this endpoint. Your integration's settings can differ. A rate-limited request returns HTTP 429 with the plain-text body Too many requests, please try again later. instead of a Connect JSON error.

200 Success

{
"first_name": "Jane",
"last_name": "Doe",
"phone_number": "+14155550123"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400invalidRequestBody"invalid request body"1001Not applicable
400invalidFirstName"First name is invalid"1001{"key":"first_name"}
400invalidPhone"Phone is invalid"1001{"key":"phone"}
401unauthorized"Unauthorized"nullNot applicable
403forbidden"Forbidden"nullNot applicable
403userNotActive"User Not Active"nullNot applicable
404userNotFound"User not found"4000Not applicable

Server errors​

HTTP 500: Internal server error​

An internal server error returns error code 5000. The response omits the top-level meta field.

{
"error": {
"message": "Sorry, an unexpected error has occurred. Our team has been notified. Please try again later.",
"code": 5000
}
}

HTTP 503: Service unavailable​

When a downstream service times out or is unavailable, the response returns error code 5003 and includes an empty top-level meta object.

{
"error": {
"message": "Sorry, an unexpected error has occurred. Our team has been notified. Please try again later.",
"code": 5003
},
"meta": {}
}