Set default-contact and opt-in flags on many contacts

posthttps://api.expiryedge.com/v1/bulkUpdateDefaultContacts
editor or admin60/minJede Methode
Anfrage
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
  }
]'
Antwort
{
  "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.

Body-Parameter

application/json
  • idstringerforderlich
    Contact id in your organization.
  • is_defaultboolean
    Set to true when omitted.
  • email_opt_inboolean
  • sms_opt_inboolean
  • whatsapp_opt_inboolean

Rückgabe

200
Flags updated.
  • messagestringerforderlich
  • updatedintegererforderlich
  • skippedarray of stringerforderlich
    Ids that were not updated (missing, other organization or invalid).

Fehler

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.