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 = {6"identifier_type": "PHONENUMBERID",7"identifier_value": "15555555555"8};910const request = {11url: `/v3/marketing/contacts/${contact_id}/identifiers`,12method: 'DELETE',13body: data14}1516client.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch(error => {22console.error(error);23});