Idempotency

Safe retries with externalId, and re-inviting a candidate.

Always send externalId (your candidate or application ID) when you create an invite. It's unique per position.

  • Sending the same externalId for the same position again returns the same interview with 200, whatever its status (including expired and completed). No new invite is created and no second email is sent. The rest of the request body isn't compared.
  • So if a request times out or you're not sure it succeeded, just send it again.
  • A new invite returns 201; a replay returns 200. Both have the same body shape.

To re-invite after an invite expired (or to replace an invite with no answers yet):

# 1. Cancel the old interview. This frees its externalId.
curl -X DELETE "$BASE/interviews/$INTERVIEW_ID" -H "Authorization: Bearer $VIDECOOT_API_KEY"
# -> 200 { "data": { "id": "66f4b7d9a1c2e3f4a5b6c701", "cancelled": true }, ... }

# 2. POST the invite again with the same externalId. You get a new interview (201) with a new inviteUrl.

Only interviews with no recorded answers (created, including expired invites) can be cancelled. Once the candidate has recorded an answer (in_progress or later), DELETE returns 409. A cancelled interview no longer appears in the API.