Skip to main content
POST
Create new facility

Authorizations

Authorization
string
header
required

JWT token authentication

Headers

NexSpace-Version
string

Pin the request to a dated API version (e.g. 2026-05-10). Applied by app-level middleware to every /api route (server/routes/index.ts → apiVersionMiddleware), which echoes the resolved value back in the NexSpace-Version response header. Omit to get the latest version. Discover the catalog at GET /.well-known/api-versions.

Pattern: ^\d{4}-\d{2}-\d{2}$
Idempotency-Key
string

Replay guard for write requests. Applied by app-level middleware to every /api route (server/routes/index.ts → idempotencyMiddleware), which only acts on POST/PUT/PATCH — GET, DELETE and OPTIONS ignore the header. Re-sending the same key with an identical body within 24 hours replays the original response; the same key with a different body returns 409.

Maximum string length: 255

Body

application/json
name
string
required

Facility name

type
string
required

Facility/site type (industry-specific, free-form)

address
string
required
city
string
required
state
string
required
zip
string
required
phone
string
required
email
string<email>
required
website
string | null
licenseNumber
string | null
bedCount
integer | null

Response

Facility created successfully

id
integer

Unique facility identifier

name
string

Facility name

type
string

Facility/site type (industry-specific, free-form — e.g. clinic, branch, warehouse, store)

address
string

Facility address

city
string

City

state
string

State

zip
string

ZIP code

phone
string

Primary phone number

email
string<email>

Primary email address

website
string | null

Facility website URL

licenseNumber
string | null

Facility license number

bedCount
integer | null

Number of beds in the facility

departments
string[]

List of departments in the facility

isActive
boolean

Whether the facility is active

createdAt
string<date-time>

Facility creation timestamp

updatedAt
string<date-time>

Last update timestamp