# Create location in a project (admin)

Canonical page: https://docs.ovok.com/api/slim/location/create-location-in-a-project-admin

`POST /v1/slim/location/admin`

Creates a location in a given project. The admin dashboard uses it during device assignment, when the right room does not exist yet.

**Auth:** Bearer token. The caller must be a Medplum project admin. Super admins without the admin role, practitioners and System Owner callers are refused. The access-policy check (`Location:create`) is skipped only for an admin who holds no access policy.
**Scope:** The project named by `projectId` in the body. The location is created with Ovok's admin client and stamped with that project.

## Behaviour

- `floor`, `room` and `bed` are stored as type codes. `organizationId` sets the zone (`managingOrganization`).
- The location is created with `status: active`.
- Unlike `POST /v1/slim/location`, this route does not check for a duplicate name or a duplicate floor, room and bed, and adds no change-history entry.
- The response is `{ id, name, projectId }` of the created location.

## Example

```bash
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/location/admin' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d '{
    "projectId": "c3499c27-2973-0a7f-807e-fb8676a92dcb",
    "name": "Room 18",
    "floor": "2",
    "room": "18",
    "organizationId": "87ea5dfc-8b8e-384d-8489-79496e706390"
  }'
```
