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".
Bearer <<YOUR_API_KEY_HERE>>
Must be set to the contact_id
of the contact you want to remove the identifier from.
application/json
The type of identifier you are removing from the contact.
EMAIL
PHONENUMBERID
EXTERNALID
ANONYMOUSID
The value of the identifier you want to remove from the contact.
Indicates that the deletion is queued for processing. Check the job status with the Import Contacts Status endpoint.
The deletion job ID.
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const contact_id = "ZGkrHSypTsudrGkmdpJJ";5const data = {6identifier_type: "PHONENUMBERID",7identifier_value: "15555555555",8};910const request = {11url: `/v3/marketing/contacts/${contact_id}/identifiers`,12method: "DELETE",13body: data,14};1516client17.request(request)18.then(([response, body]) => {19console.log(response.statusCode);20console.log(response.body);21})22.catch((error) => {23console.error(error);24});