Skip to main content
PUT
Update a space assignment
Send startDate, endDate, and description every time. A field you leave out is cleared. An empty description removes the description.
You cannot change the tenant or the spaces of an assignment. KODE ignores them if you send them. To change them, delete the assignment and create a new one. isActive is worked out again after each update.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Path Parameters

assignmentId
string
required

Identifier of the assignment to update.

buildingId
string
required

Building identifier from List buildings.

Body

application/json
startDate
string<date>

First day of the assignment (YYYY-MM-DD).

Example:

"2022-03-10T00:00:00.000Z"

endDate
string<date>

Last day of the assignment (YYYY-MM-DD).

Example:

"2022-03-10T00:00:00.000Z"

description
string

Free text about the assignment.

Response

The updated assignment.

_id
string

Assignment identifier.

organizationId
string
createdAt
string
read-only

Date and time in UTC, with a numeric offset and no colon, for example 2026-10-28T13:51:31+0000.

Example:

"2026-10-28T13:51:31+0000"

updatedAt
string
read-only

Date and time in UTC, with a numeric offset and no colon, for example 2026-10-28T13:51:31+0000.

Example:

"2026-10-28T13:51:31+0000"

tenant
object

The tenant of the assignment.

spaces
object[]

The spaces of the assignment.

startDate
string<date>

First day of the assignment.

Example:

"2022-03-10T00:00:00.000Z"

endDate
string<date>

Last day of the assignment.

Example:

"2022-03-10T00:00:00.000Z"

type
string

Always lease.

description
string

Free text about the assignment.

isActive
boolean

true when the assignment has started and has not ended. An assignment with no start date is not active.