# Move hours from one user to another on the same project

Source: https://www.supervisible.com/developers/assignments/post-assignments-id-move

POST /assignments/{assignment_id}/move



## POST /assignments/{assignment_id}/move

Atomic server-side move in a single transaction. Hours are whole weekly totals; the resulting target total cannot exceed 168. Source must exist and belong to the caller's org. Target gets a new planned week, or sums into an existing same-date week for the same target user and capability state. Omit or null `capabilityId` to move into the target user's uncategorized assignment row. Source is deleted if all hours move, otherwise decremented. If the source user has no planned rows left on the project, their project-team membership can be removed; logged actual-hour history stays with the original person. No TOCTOU window.

Base URL: https://app.supervisible.com/api/v1

Required scope: write:assignments

## Operation contract

The definition below includes parameters, request bodies, response schemas, examples and authentication requirements.

```json
{
  "summary": "Move hours from one user to another on the same project",
  "description": "Atomic server-side move in a single transaction. Hours are whole weekly totals; the resulting target total cannot exceed 168. Source must exist and belong to the caller's org. Target gets a new planned week, or sums into an existing same-date week for the same target user and capability state. Omit or null `capabilityId` to move into the target user's uncategorized assignment row. Source is deleted if all hours move, otherwise decremented. If the source user has no planned rows left on the project, their project-team membership can be removed; logged actual-hour history stays with the original person. No TOCTOU window.",
  "tags": [
    "assignments"
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-required-scope": "write:assignments",
  "parameters": [
    {
      "in": "path",
      "name": "assignment_id",
      "required": true,
      "description": "Source assignment ID.",
      "schema": {
        "type": "string",
        "description": "UUID"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "toUserId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "capabilityId": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "hours": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 168
            }
          },
          "required": [
            "toUserId"
          ],
          "additionalProperties": false,
          "example": {
            "toUserId": "019cb675-c4df-7f8b-8a83-5f28581f5e7e",
            "capabilityId": null,
            "hours": 4
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "example": {
            "data": {
              "toUserId": "019cb675-c4df-7f8b-8a83-5f28581f5e7e",
              "capabilityId": null,
              "hours": 4
            }
          }
        }
      }
    },
    "400": {
      "description": "Invalid request"
    },
    "401": {
      "description": "Unauthorized"
    },
    "403": {
      "description": "Missing required scope or current member permission"
    },
    "404": {
      "description": "Not found"
    },
    "409": {
      "description": "Conflict; refresh current state and preview again"
    },
    "429": {
      "description": "Rate limited; honor Retry-After"
    }
  }
}
```

## Referenced definitions

```json
{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key"
      }
    }
  }
}
```

[Complete OpenAPI specification](https://www.supervisible.com/openapi/public-api-v1.json)
