twprojects-create_allocation
Commit a user's planned time to a project over a date range, setting a fixed daily rate in seconds and optional linked tasks. Creates a scheduler allocation while handling capacity collisions.
Instructions
Commit a user's time to a project over a date range (a scheduler allocation). This is planned time, a separate plane from task estimates and logged time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | The allocation's colour as six hexadecimal digits, with or without a leading '#'. | |
| title | Yes | The name of the allocation, at most 100 characters. | |
| end_date | Yes | The last day of the allocation (format: YYYY-MM-DD). Must not precede start_date. Extending it ADDS committed time rather than spreading the existing total: the per-day rate is what is held constant, so the total is the working days in the range times that rate. | |
| project_id | Yes | The ID of the project to commit the time to. | |
| start_date | Yes | The first day of the allocation (format: YYYY-MM-DD). | |
| description | No | An optional description of the allocation, at most 255 characters. | |
| is_billable | No | Whether the allocated time can be charged to a client. | |
| linked_task_ids | No | The tasks to associate with the allocation. This REPLACES the whole set of linked tasks, so send every task that should stay linked. To add or remove one task without touching the rest, use twprojects-link_task_to_allocation or twprojects-unlink_task_from_allocation instead. | |
| seconds_per_day | Yes | The time committed on each working day of the range, in SECONDS — 4 hours a day is 14400. Must be between 60 (one minute) and 86400 (24 hours). Seconds rather than hours because the hours form is a float and rounds. This rate is what is held constant: the total is the working days in the range times this, so widening the range adds committed time. | |
| assigned_user_id | Yes | The ID of the user whose time is committed. Accepts a real person or a placeholder user — a stand-in used to plan work before the person who will do it is known. Nothing in the response distinguishes the two, so confirm which one an ID refers to before reporting who is booked. | |
| ignore_collisions | No | Skip the capacity check altogether. Prefer inform_of_over_allocation: this one also lets the change through, but suppresses the over-allocation report with it, so nobody is told the person is over-booked. It takes precedence when both are set. | |
| inform_of_over_allocation | No | Accept a change that puts the user over their capacity and report it, rather than rejecting it. Defaults to true, and the result says so when it happens. Turning it off means an over-allocating change is refused outright. |