Skip to contentSkip to navigationSkip to topbar
On this page

Delete a Contact Identifier



Operation overview

operation-overview page anchor

DELETE/v3/marketing/contacts/{contact_id}/identifiers

Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)

This endpoint can be used to delete one identifier from a contact.

Deletion jobs are processed asynchronously.

Note this is different from deleting a contact. If the contact has only one identifier, the asynchronous request will fail. All contacts are required to have at least one identifier.

The request body field identifier_type must have a valid value of "EMAIL", "PHONENUMBERID", "EXTERNALID", or "ANONYMOUSID".


Authentication

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

Must be set to the contact_id of the contact you want to remove the identifier from.

Encoding type:application/json
SchemaExample
Property nameTypeRequiredDescriptionChild properties
identifier_typeenum<string>required

The type of identifier you are removing from the contact.

Possible values:
EMAILPHONENUMBERIDEXTERNALIDANONYMOUSID

identifier_valuestringrequired

The value of the identifier you want to remove from the contact.

202400401403404500

Indicates that the deletion is queued for processing. Check the job status with the Import Contacts Status endpoint.

Schema
Property nameTypeRequiredDescriptionChild properties
job_idobject

The deletion job ID.

Delete a Contact IdentifierLink to code sample: Delete a Contact Identifier
1
const client = require('@sendgrid/client');
2
client.setApiKey(process.env.SENDGRID_API_KEY);
3
4
const contact_id = "ZGkrHSypTsudrGkmdpJJ";
5
const data = {
6
"identifier_type": "PHONENUMBERID",
7
"identifier_value": "15555555555"
8
};
9
10
const request = {
11
url: `/v3/marketing/contacts/${contact_id}/identifiers`,
12
method: 'DELETE',
13
body: data
14
}
15
16
client.request(request)
17
.then(([response, body]) => {
18
console.log(response.statusCode);
19
console.log(response.body);
20
})
21
.catch(error => {
22
console.error(error);
23
});