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. 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.
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.
Bearer <<YOUR_API_KEY_HERE>>
application/json
100
256
256
256
256
100
100
2
150
10
100
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const id = "ZGkrHSypTsudrGkmdpJJ";5const data = {6nickname: "Orders",7from_email: "orders@example.com",8from_name: "Example Orders",9reply_to: "orders@example.com",10reply_to_name: "Example Orders",11address: "1234 Fake St",12address2: "PO Box 1234",13state: "CA",14city: "San Francisco",15country: "USA",16zip: "94105",17};1819const request = {20url: `/v3/verified_senders/${id}`,21method: "PATCH",22body: data,23};2425client26.request(request)27.then(([response, body]) => {28console.log(response.statusCode);29console.log(response.body);30})31.catch((error) => {32console.error(error);33});