Mail an Bewerbende senden
Queues a rejection or invitation and records a `mail_sent` event; `set_stage` moves a rejection to `rejected` in the same request. Answers 202 with the event and the updated application. 409 `application_purged`, 422 `application_without_email` or field errors
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Ort: header
Pfadparameter
Request-Body
application/json
TypeScript-Definitionen
TypeScript-Typ für request body.
Sending a recruiting mail (OpenSpec add-recruiting, task 9.1): like the preview, plus set_stage,
which moves the application to rejected together with a rejection (only allowed there).
Response-Body
application/json
application/json
application/json
curl -X POST "https://example.com/recruiting/applications/string/mails" \ -H "Content-Type: application/json" \ -d '{ "template": "rejection" }'{ "data": { "event": { "id": "string", "type": "stage_changed", "from_stage": "new", "to_stage": "new", "body": "string", "mail_template": "rejection", "mail_subject": "string", "user_id": "string", "user_name": "string", "created_at": "string" }, "application": { "id": "string", "job_posting_id": "string", "posting": { "id": "string", "title": "string", "status": "draft" }, "first_name": "string", "last_name": "string", "full_name": "string", "email": "string", "phone": "string", "profile_url": "string", "cover_letter": "string", "stage": "new", "source": "career_page", "locale": "string", "privacy_acknowledged_at": "string", "privacy_notice_version": 0, "submitted_at": "string", "rejected_at": "string", "hired_at": "string", "employee_id": "string", "is_purged": true, "purged_at": "string", "possible_duplicate": true, "duplicate_count": 0, "duplicate_on_posting_count": 0, "retention_due_at": "string", "retention_hint": true, "mail_templates": [ "rejection" ], "can_convert": true, "can_create_questionnaire": true, "documents": [ { "id": "string", "kind": "cv", "original_filename": "string", "mime_type": "string", "size_bytes": 0, "quarantined": true, "check_result": "string", "check_state": "pending", "checked_at": "string", "downloadable": true, "created_at": "string" } ], "events": [ { "id": "string", "type": "stage_changed", "from_stage": "new", "to_stage": "new", "body": "string", "mail_template": "rejection", "mail_subject": "string", "user_id": "string", "user_name": "string", "created_at": "string" } ] } }}Mail an Bewerbende vorschauen POST
Rendered subject and body of a template (or of the text HR edited) for this application. Writes nothing. 409 `application_purged` for purged applications, 422 for unknown placeholders
Bewerbende als Mitarbeitende übernehmen POST
Creates the employee from the application (module `employees` and `employees:manage` required, 403 `conversion_not_allowed` otherwise), sets stage `hired` and copies the released files into the personnel file shortly after. 409 `application_already_converted` or `application_purged`, 422 for a taken personnel number