safe_mind_create_survey
Create a survey draft for a psychological risk assessment, returning its ID, status, dates, and participation and edit links. Departments and locations are reused or created automatically.
Instructions
Create a survey draft for the psychological risk assessment and return its id, status "draft", dates, participation link and an edit link. Departments and locations are passed by name; missing ones are created, existing ones reused. The draft is not visible to employees yet: the account owner reviews it and starts it in the Safe Mind app via the edit link (payment happens there). Drafts cannot be edited or deleted through the API, so confirm the inputs with the user first. Requires an API key: set SAFE_MIND_API_KEY or call safe_mind_get_api_key first. Acts on the company of the account behind the key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Survey title shown to employees. Default: "<company> - Psychische Gefährdungsbeurteilung <year>". | |
| locations | No | Optional location names for multi-site companies, e.g. ["Hamburg", "Bielefeld"]. | |
| startDate | Yes | First day of the survey as YYYY-MM-DD, e.g. "2026-11-02". | |
| departments | Yes | Names of the departments/areas employees choose from, e.g. ["Produktion", "Verwaltung"]. At least one. Use the exact names from safe_mind_list_departments to reuse existing areas. | |
| durationWeeks | Yes | Runtime in weeks. Allowed: 2 weeks up to the template maximum (currently 6). The template recommends at least 4 weeks; 2-3 weeks are accepted but not recommended (lower response rate, more groups below the anonymity threshold). | |
| employeeCount | Yes | Number of employees invited to take part; also the participant limit of the survey. | |
| analyticsMinThreshold | No | Anonymity threshold: smallest group whose results are shown in segmented analytics. Minimum 5, default 7. Higher protects small teams better. |