Restore all matching archived contacts

Queues a restore of every archived contact that matches the body, the same selection the app's Archived contacts view makes with "Restore all". Only API users in the Admin group may call this; any other user gets 404. The body is required: send {} to restore every archived contact inside the restore window; an empty body is refused with 400. start and end narrow the archive date; the restore rounds them out to whole days in UTC. search narrows the selection by email, name or phone. Known defect: when search has several words, start and end limit only the contacts it matches by phone, not the ones it matches by name; the 360-day limit still applies to both. Contacts archived more than 360 days ago are never restored. The contacts come back in the background, so the response only confirms the request; follow it with GET /contactArchives/restoreRequest/{id}. When several matching archived contacts have the same email address, only the one with the highest id (normally the most recently archived) is restored. Before queueing, the request is refused with 400 if a contact in the date range was archived too recently to restore. With search, only contacts whose email contains the search text are checked; contacts that match search only by name or phone are not checked, so they are restored even if they were archived too recently. Only one restore runs at a time: while one is running this returns 409. Only POST is accepted; any other method returns 405.

Body Params
int64

Only contacts archived on or after the start of this day (UTC), given as a Unix timestamp in milliseconds. The too-recent check runs from the exact moment instead. A value earlier than 360 days ago is raised to 360 days ago. Ignored when not a number.

int64

Only contacts archived on or before the end of this day (UTC), given as a Unix timestamp in milliseconds. The too-recent check runs up to the exact moment instead. Defaults to now. Ignored when not a number.

Text to search for. A full email address matches exactly; any other single word is matched anywhere in email, first name, last name or phone; several words are matched together against the full name, or as a whole against the phone. The too-recent check described above uses only the email part of this match. With several words, start and end do not limit name matches (known defect).

Responses

404

The API user is not in the Admin group. The body is empty.

405

The method is not POST. The body is empty.

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json