Skip to contentSkip to navigationSkip to topbar
On this page

Edit Verified Sender



API Overview

api-overview page anchor

The Sender Verification API exposes multiple endpoints that allow you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the SendGrid app by selecting Sender Authentication under Settings in the navigation bar(link takes you to an external page). For full app instructions, see Sender Verification.

The Sender Verification API provides a RESTful interface for creating new Sender Identities, retrieving a list of existing Sender Identities, checking the status of a Sender Identity, updating a Sender Identity, and deleting a Sender Identity.

This API offers additional endpoints to check for domains known to implement DMARC, and resend verification emails to Sender Identities that have yet to complete the verification process.


PATCH/v3/verified_senders/{id}

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 an existing Sender Identity.

Pass the id assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format.

You can retrieve the IDs associated with Sender Identities by passing a GET request to the Get All Verified Senders endpoint, /verified_senders.

Note: Unlike a PUT request, PATCH allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
Property nameTypeRequiredDescription
idstringrequired
Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
nicknamestringrequired
Max length: 100

from_emailstring<email>required
Max length: 256

from_namestringOptional
Max length: 256

reply_tostring<email>required
Max length: 256

reply_to_namestringOptional
Max length: 256

addressstringOptional
Max length: 100

address2stringOptional
Max length: 100

statestringOptional
Max length: 2

citystringOptional
Max length: 150

zipstringOptional
Max length: 10

countrystringOptional
Max length: 100
200400401403404500
SchemaExample
Property nameTypeRequiredDescriptionChild properties
idinteger

nicknamestring

from_emailstring

from_namestring

reply_tostring

reply_to_namestring

addressstring

address2string

statestring

citystring

zipstring

countrystring

verifiedboolean

lockedboolean
Edit Verified SenderLink to code sample: Edit Verified Sender
1
const client = require("@sendgrid/client");
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const id = "ZGkrHSypTsudrGkmdpJJ";
5
const data = {
6
nickname: "Orders",
7
from_email: "orders@example.com",
8
from_name: "Example Orders",
9
reply_to: "orders@example.com",
10
reply_to_name: "Example Orders",
11
address: "1234 Fake St",
12
address2: "PO Box 1234",
13
state: "CA",
14
city: "San Francisco",
15
country: "USA",
16
zip: "94105",
17
};
18
19
const request = {
20
url: `/v3/verified_senders/${id}`,
21
method: "PATCH",
22
body: data,
23
};
24
25
client
26
.request(request)
27
.then(([response, body]) => {
28
console.log(response.statusCode);
29
console.log(response.body);
30
})
31
.catch((error) => {
32
console.error(error);
33
});

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.