Delete a contact
client.contact.delete(stringid, ContactDeleteParams { body } params?, RequestOptionsoptions?): ContactDeleteResponse { id, createdAt, fields, 4 more }
DELETE/v1/contacts/{id}
Moves a contact to the trash. The contact is soft-deleted and may be restored from the Lightfield UI.
Calling delete on an already-trashed contact is a no-op and returns the existing record.
Required scope: contacts:delete
Rate limit category: Write
Delete a contact
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const contactDeleteResponse = await client.contact.delete('id');
console.log(contactDeleteResponse.id);{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}