How to delete your Contacts on SCG using the contact resource API

One of the key features on the SCG platform is the Contact resource. This resource allows you to upload/import and store recipient addresses like mobile numbers, device token, email addresses, names, and other address types that can be used for user engagement use cases.

You can Delete individual contacts using their unique IDs or delete a contact group using a group ID. You can also delete your entire list of contacts using our Contacts Delete Job resource API.

Delete a Contact (Using a Contact ID)

  • Make sure you have the contact ID of the contact you wish to delete.  You can obtain the Contact ID of a contact by running a query:   
curl -L -X GET 'https://api.syniverse.com/scg-external-api/api/v1/contacts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN'
  • To complete the delete with the contact ID, make a DELETE call using the resource below:
curl -L -X DELETE 'https://api.syniverse.com/scg-external-api/api/v1/contacts/FXD0B0IHYQR3Ia8VIFEsi2' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json'

 

Delete a Contact Group (Using Contact Group ID)

  • Retrieve the Contact Group ID for the Contact group you are looking to delete. This applies to both Static and Dynamic contact groups.
  • Once you have the correct Contract group ID, make a DELETE call using the format below:
curl -L -X DELETE 'https://api.syniverse.com/scg-external-api/api/v1/contact_groups/YU8t0B0IHYQR3Ia8VIFEsX2' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json'

 

Delete an entire Contact Address book

To delete your entire list of contacts, you need to run a delete Job as outlined in our API reference doc. Be sure you want to do this before invoking the delete job API as this cannot be reversed.

The Delete Job API contains the {delete_resource} attribute in the Request body schema which supports a value called  CONTACTS. Using this attribute and value, you can delete your entire list of contacts:

curl -L -X POST 'https://api.syniverse.com/scg-external-api/api/v1/delete_job' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TOKEN' \
 '{"delete_resource": "CONTACTS"}'

 

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Article is closed for comments.