Create a child project
| Method | Path |
|---|---|
POST | /v1/slim/project/child |
Authentication · Access policies
Creates a child project under your current project and makes you its admin. Use it to set up a new customer or site below your organisation.
Auth: Bearer token for a project admin. No other role passes. Scope: The new project becomes a direct child of the caller's project (from the token). A project that is itself a child may create children of its own.
Behaviour
- Your project must already hold at least one access policy: the child gets a copy of every access policy of your project. Without one the request is refused with 424 and nothing is created.
- A second child with exactly the same
nameunder the same parent is refused with 422. - The whole create is all or nothing. A failure undoes what was written and answers the failure.
- On success Ovok:
- creates the project with practitioner invitations and practitioner login enabled, and practitioner registration plus all patient registration, invitation and login disabled;
- gives it its own Signals tenant and its own tenant code;
- links it to your project;
- copies your practitioner profile into it and adds you as an admin member;
- seeds its thresholds from the global defaults.
- The organization stored inside the project is built from
name,address,contactandsettings.settings.timeZonedefaults toEurope/Berlin.idandextensionin the body are ignored. - When the platform has it enabled, an Ovok support account is also added as a non-admin member holding the child's System Owner access policy. It is skipped when the child has no single policy of that name. This step never fails the create.
- Child project lists are refreshed right away.
- Returns
{ "projectId": "<new project id>", "success": true }.
Example
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/project/child' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example project",
"contact": [{ "telecom": [{ "system": "email", "use": "work", "value": "team@example.com" }] }],
"settings": { "timeZone": "Europe/Berlin" }
}'
| Field | Type | Meaning |
|---|---|---|
projectId | string | Id of the new child project. |
success | boolean | true after the child project setup is complete. |
Successful response
201 — The child project was created successfully.
Errors
| Status | Meaning |
|---|---|
400 | The project or its Signals tenant could not be created. |
401 | The bearer token is missing or invalid, or the session carries no project, user or profile. |
403 | The caller is not a project admin. |
409 | Another create of the same name under the same parent is in progress. |
422 | The body fails validation, or your project already has a child project with this name. |
424 | Your project has no access policy to copy into the child. Nothing was created; retry once it has one. |