---
title: "Create an assignment"
method: POST
path: "/api/v2/organizations/{orgSlug}/assignments"
tags: ["Assignments"]
---

# Create an assignment

`POST /api/v2/organizations/{orgSlug}/assignments`

Assign a resource to a membership for a given period. Validations (resource availability, no overlapping assignments) are enforced by the backend. 

 Required scopes: `flex.space.assignments.create`

## Path parameters

- `orgSlug` string, required

## Request body

- CreateAssignmentDto
  - `resource` string, required — The _id of the resource to assign.
  - `membership` string, required — The _id of the membership to assign the resource to.
  - `startDate` string, required — The start date of the assignment (ISO 8601).
  - `endDate` string — The end date of the assignment (ISO 8601). Optional for open-ended assignments.

## Response `201`

- AssignmentResultDto
  - `_id` string — The _id of the assignment.
  - `resource` string — The _id of the resource with which the assignment is associated.
  - `membership` string — The _id of the membership with which the assignment is associated.
  - `startDate` string, date-time — The start date of the assignment.
  - `endDate` string, date-time — The end date of the assignment.

---

[API](https://skmtc.dev/officernd/apis/authentication-api.md) · [All operations](https://skmtc.dev/officernd/apis/authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/officernd/authentication-api/revisions/6bcd33dc648e/schema)
