Skip to navigation

Delete an email draft to a candidate

Beta

Deletes an unsent email draft of the authenticated user, such as one staged for confirmation that the user then declined. Sent emails cannot be deleted. This action is irreversible.

Token scopes: ats:write, worker:write

Beta: this version requires the X-Beta: true request header and its contract may change before it is promoted to stable. It is scheduled to become stable on 2027-01-29.

Authentication

AuthorizationBearer

Authentication

The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail.

curl -X GET 'https://api.deel.training/rest/v2/contracts' \
  -H 'Authorization: Bearer YOUR-TOKEN-HERE'

Learn more about authentication

OR
AuthorizationBearer

Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

Path parameters

candidate_idstringRequiredformat: "uuid"
ID of the candidate the draft is addressed to
email_draft_idstringRequiredformat: "uuid"
ID of the caller's own email draft to delete

Headers

X-BetaenumRequiredDefaults to true

Opts in to the beta version of this endpoint. Must be true.

Allowed values:

Query parameters

expected_updated_atstringOptionalformat: "date-time"

Optional precondition: the draft’s updated_at as last read. If the draft changed since, nothing is deleted and a 409 precondition_failed is returned.

Response

The draft was deleted

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error