---
updatedAt: 2026-04-27T23:21:35.000Z
agentTools:
  projectIndex: https://developer.runn.io/llms.txt
---

# Create an assignment

Creates a new assignment covering every working day between `startDate` and `endDate`, and returns it in an array. The same `minutesPerDay` applies to each of those days, and is never derived from the person's contract. For people, `minutesPerDay` must be between 0 and 1440; placeholders can go up to 99999999. [Learn more](https://developer.runn.io/docs/assignments).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Runn API",
    "version": "1.0.0",
    "description": "<p>See <a target=\"_blank\" href=\"https://help.runn.io/en/articles/8579592-api-v1-beta\" title=\"Runn API full documentation\">the full documentation and guide</a> to using the Runn API.</p><p>The domain for your API endpoint can be found in <strong>Accounts > Settings > API</strong> in your Runn application</p>"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Assignment": {
        "type": "object",
        "required": [
          "id",
          "personId",
          "startDate",
          "endDate",
          "projectId",
          "minutesPerDay",
          "roleId",
          "isActive",
          "note",
          "isBillable",
          "phaseId",
          "isNonWorkingDay",
          "isTemplate",
          "isPlaceholder",
          "workstreamId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier for the assignment.",
            "type": "integer"
          },
          "personId": {
            "description": "id referencing the person associated with the assignment.",
            "type": "integer"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "The start date of the assignment. Format: YYYY-MM-DD"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "The end date of the assignment. Format: YYYY-MM-DD"
          },
          "projectId": {
            "description": "The ID referencing the project to which the assignment belongs.",
            "type": "integer"
          },
          "minutesPerDay": {
            "description": "The number of minutes allocated to the assignment per day.",
            "type": "integer"
          },
          "roleId": {
            "description": "The ID referencing the role associated with the assignment.",
            "type": "integer"
          },
          "isActive": {
            "description": "A flag indicating whether the assignment is currently active. (Deprecated. Assignments are always hard delete so are now always active).",
            "deprecated": true,
            "type": "boolean"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "isBillable": {
            "description": "A flag indicating whether the assignment is billable.",
            "type": "boolean"
          },
          "phaseId": {
            "type": "integer",
            "nullable": true
          },
          "isNonWorkingDay": {
            "description": "A flag indicating if the assignment falls on a non-working day.",
            "type": "boolean"
          },
          "isTemplate": {
            "description": "A flag indicating if the assignment is a template.",
            "type": "boolean"
          },
          "isPlaceholder": {
            "description": "A flag indicating if the assignment's person is a placeholder.",
            "type": "boolean"
          },
          "workstreamId": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the object was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of when the object was last updated."
          }
        }
      },
      "BadRequest": {
        "type": "object",
        "required": [
          "error",
          "message",
          "statusCode"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "Bad Request"
            ]
          },
          "message": {
            "type": "string"
          },
          "statusCode": {
            "type": "number",
            "enum": [
              400
            ]
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "required": [
          "error",
          "message",
          "statusCode"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          },
          "message": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ]
          },
          "statusCode": {
            "type": "number",
            "enum": [
              401
            ]
          }
        }
      }
    }
  },
  "paths": {
    "/assignments/": {
      "post": {
        "operationId": "createAssignment",
        "summary": "Create an assignment",
        "description": "Creates a new assignment covering every working day between `startDate` and `endDate`, and returns it in an array. The same `minutesPerDay` applies to each of those days, and is never derived from the person's contract. For people, `minutesPerDay` must be between 0 and 1440; placeholders can go up to 99999999. [Learn more](https://developer.runn.io/docs/assignments).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "personId",
                  "projectId",
                  "roleId",
                  "startDate",
                  "endDate",
                  "minutesPerDay"
                ],
                "properties": {
                  "phaseId": {
                    "description": "The phase this assignment is for, if any",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "personId": {
                    "description": "The person this assignment is for",
                    "type": "number"
                  },
                  "projectId": {
                    "description": "The project this assignment is for",
                    "type": "number"
                  },
                  "roleId": {
                    "description": "The role the person will be in for this assignment",
                    "type": "number"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date",
                    "description": "The date this assignment starts. Format: YYYY-MM-DD"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date",
                    "description": "The date this assignment ends. When using isNonWorkingDay=true, this needs to be the same as the startDate. Format: YYYY-MM-DD"
                  },
                  "minutesPerDay": {
                    "description": "How many minutes per day are assigned. Must be at most 1440 (24 hours) for people and at most 99999999 for placeholders.",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 99999999,
                    "type": "number"
                  },
                  "note": {
                    "description": "A note about this assignment",
                    "type": "string"
                  },
                  "isBillable": {
                    "description": "Whether this assignment is billable. Must be false if the project is non-billable.",
                    "default": true,
                    "type": "boolean"
                  },
                  "isNonWorkingDay": {
                    "description": "Determine whether this assignment is for a single weekend day or a single holiday. If left blank it will be set automatically",
                    "type": "boolean"
                  },
                  "workstreamId": {
                    "description": "The workstream this assignment is for, if any",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "default": "1.0.0",
              "enum": [
                "1.0.0"
              ]
            },
            "in": "header",
            "name": "accept-version",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Assignment created successfully. Returns an array containing the created assignment.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Assignment created successfully. Returns an array containing the created assignment.",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Assignment"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.runn.io",
      "description": "EU Server"
    },
    {
      "url": "https://api.us.runn.io",
      "description": "US Server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  }
}
```