Set default-contact and opt-in flags on many contacts
post
https://api.expiryedge.com/v1/bulkUpdateDefaultContactseditor or admin60/minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/bulkUpdateDefaultContacts' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"id": "c_8Hk2pQ",
"is_default": true
},
{
"id": "c_3Rm7vN",
"is_default": false,
"sms_opt_in": false
}
]'Response
{
"message": "2 contacts updated successfully",
"updated": 2,
"skipped": []
}Body is a JSON array (max 1000 items) of {id, is_default?, email_opt_in?, sms_opt_in?, whatsapp_opt_in?}.
Only these boolean flags are written; when is_default is omitted it is set to true. Items without an id,
or whose contact is missing or in another organization, are returned in skipped.
idstringrequiredContact id in your organization.is_defaultbooleanSet to true when omitted.email_opt_inbooleansms_opt_inbooleanwhatsapp_opt_inboolean
200
Flags updated.
messagestringrequiredupdatedintegerrequiredskippedarray of stringrequiredIds that were not updated (missing, other organization or invalid).
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
