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.
404The API user is not in the Admin group. The body is empty.
405The method is not POST. The body is empty.
