Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Update a user's profile



API Overview

api-overview page anchor

Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you.

You can learn more in the SendGrid Account Details documentation.


PATCH/v3/user/profile

Base url: https://api.sendgrid.com

This endpoint allows you to update your current profile details.

Any one or more of the parameters can be updated via the PATCH /user/profile endpoint. You must include at least one when you PATCH.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>

on-behalf-ofstringOptional

The on-behalf-of header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be "account-id" followed by the customer account's ID (e.g., on-behalf-of: account-id <account-id>). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., on-behalf-of: <subuser-username>). See On Behalf Of for more information.

SchemaExample
Property nameTypeRequiredDescriptionChild properties
addressstringOptional

The street address for this user profile.


address2stringOptional

An optional second line for the street address of this user profile.


citystringOptional

The city for the user profile.


companystringOptional

That company that this user profile is associated with.


countrystringOptional

Th country of this user profile.


first_namestringOptional

The first name of the user.


last_namestringOptional

The last name of the user.


phonestringOptional

The phone number for the user.


statestringOptional

The state for this user.


websitestringOptional

The website associated with this user.


zipstringOptional

The zip code for this user.

200401
SchemaExample
Property nameTypeRequiredDescriptionChild properties
addressstring

The street address for this user profile.


address2string

An optional second line for the street address of this user profile.


citystring

The city for the user profile.


companystring

That company that this user profile is associated with.


countrystring

Th country of this user profile.


first_namestring

The first name of the user.


last_namestring

The last name of the user.


phonestring

The phone number for the user.


statestring

The state for this user.


websitestring

The website associated with this user.


zipstring

The zip code for this user.

Update a user's profile

update-a-users-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_31
const client = require('@sendgrid/client');
_31
client.setApiKey(process.env.SENDGRID_API_KEY);
_31
_31
const data = {
_31
"address": "1451 Larimer Street, 3rd floor",
_31
"address2": "",
_31
"city": "Denver, CO",
_31
"company": "SendGrid",
_31
"country": "US",
_31
"first_name": "Matthew",
_31
"last_name": "Bernier",
_31
"phone": "7208788003",
_31
"state": "CO",
_31
"website": "http://sendgrid.com",
_31
"zip": "80202"
_31
};
_31
_31
const request = {
_31
url: `/v3/user/profile`,
_31
method: 'PATCH',
_31
body: data
_31
}
_31
_31
client.request(request)
_31
.then(([response, body]) => {
_31
console.log(response.statusCode);
_31
console.log(response.body);
_31
})
_31
.catch(error => {
_31
console.error(error);
_31
});


Rate this page: