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 = {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};1819const request = {20url: `/v3/verified_senders/${id}`,21method: 'PATCH',22body: data23}2425client.request(request)26.then(([response, body]) => {27console.log(response.statusCode);28console.log(response.body);29})30.catch(error => {31console.error(error);32});