Skip to content

Managing Contacts

Contacts let you store recipient details so you don’t have to pass phone numbers manually every time you send.

Terminal window
curl https://send.virgincareer.lk/api/v1/contacts \
-H "Authorization: Bearer sk_your_key"
Terminal window
curl https://send.virgincareer.lk/api/v1/contacts \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"phone": "+94771234567",
"firstName": "Kasun",
"lastName": "Perera",
"email": "kasun@example.com"
}'
Terminal window
curl -X PATCH \
https://send.virgincareer.lk/api/v1/contacts/contact-id \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{"firstName": "Kasun", "isOptedOut": false}'
Terminal window
curl -X DELETE \
https://send.virgincareer.lk/api/v1/contacts/contact-id \
-H "Authorization: Bearer sk_your_key"
FieldTypeDescription
phonestringE.164 phone number — required, unique per account
firstNamestringFirst name
lastNamestringLast name
emailstringEmail address
groupIdstringAssign to a contact group
isOptedOutbooleanIf true, this contact won’t receive messages
variablesobjectCustom key-value pairs for message personalisation