Skip to contentSkip to navigationSkip to topbar
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 (for global users and subusers)

Base url: https://api.eu.sendgrid.com (for EU regional subusers)

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.

Encoding type:application/json
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 profileLink to code sample: Update a user's profile
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const data = {
5
"address": "1451 Larimer Street, 3rd floor",
6
"address2": "",
7
"city": "Denver, CO",
8
"company": "SendGrid",
9
"country": "US",
10
"first_name": "Matthew",
11
"last_name": "Bernier",
12
"phone": "7208788003",
13
"state": "CO",
14
"website": "http://sendgrid.com",
15
"zip": "80202"
16
};
17
18
const request = {
19
url: `/v3/user/profile`,
20
method: 'PATCH',
21
body: data
22
}
23
24
client.request(request)
25
.then(([response, body]) => {
26
console.log(response.statusCode);
27
console.log(response.body);
28
})
29
.catch(error => {
30
console.error(error);
31
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.