# Create user assignment

Creates a user assignment.

Typical parameters:

- assignable_id
- starts_at
- ends_at
- allocation_mode (percent, hours_per_day, fixed) and a value for the respective mode-named property (that is, a property named percent, hours_per_day, or fixed_hours)

Endpoint: POST /users/{user_id}/assignments
Version: v1
Security: AuthToken

## Header parameters:

  - `Content-Type` (string, required)
    Enum: "application/json"

## Path parameters:

  - `user_id` (integer, required)
    Unique identifier for the resource instance.
    Example: 1234567

## Request fields (application/json):

  - `assignable_id` (integer, required)
    The ID of the project, phase, or leave type to which the the assignment applies.
    Example: 1234

  - `body` (Assignment - percent-based allocation (object) or Assignment - fixed-hours-based allocation (object) or Assignment - hours-per-day-based allocation (object)) — one of:
    - Assignment - percent-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a percentage of the resource's time is allocated to the corresponding assignment.
        Enum: "percent"
      - `percent` (number, required)
        The percentage of time the resource is allocated to the corresponding assignment. 

Note: This property is only present when allocation_mode is "percent".
        Example: 0.2
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `resource_request_id` (integer,null)
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.
    - Assignment - fixed-hours-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a fixed number of the resource's hours is allocated to the corresponding assignment.
        Enum: "fixed_hours"
      - `fixed_hours` (number, required)
        The number of hours the resource is allocated to a corresponding assignment. 

Note: This property is only present when allocation_mode is "fixed_hours".
        Example: 20
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `resource_request_id` (integer,null)
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.
    - Assignment - hours-per-day-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a number of the resource's daily hours is allocated to the corresponding assignment.
        Enum: "hours_per_day"
      - `hours_per_day` (number, required)
        The number of hours per day that the resource is allocated to a corresponding assignment. 

Note: This property is only present when allocation_mode is "hours_per_day".
        Example: 6
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `resource_request_id` (integer,null)
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.

## Response 200 fields (application/json):

  - `body` (Assignment - percent-based allocation (object) or Assignment - fixed-hours-based allocation (object) or Assignment - hours-per-day-based allocation (object)) — one of:
    - Assignment - percent-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a percentage of the resource's time is allocated to the corresponding assignment.
        Enum: same as `allocation_mode` in "Assignment - percent-based allocation" (1 values)
      - `percent` (number, required)
        The percentage of time the resource is allocated to the corresponding assignment. 

Note: This property is only present when allocation_mode is "percent".
        Example: 0.2
      - `id` (integer)
        The unique identifier for the assignment.
        Example: 889
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `assignable_id` (integer)
        The ID of the project, phase, or leave type to which the the assignment applies.
        Example: 1234
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `created_at` (string)
        The time of creation.
        Example: "2025-08-27T12:00:00Z"
      - `updated_at` (string)
        The time of the last update.
        Example: "2025-08-27T12:00:00Z"
      - `all_day_assignment` (boolean)
        Example: true
      - `resource_request_id` (integer,null)
      - `bill_rate` (number,null)
        The cost value.
        Example: 100
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.
    - Assignment - fixed-hours-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a fixed number of the resource's hours is allocated to the corresponding assignment.
        Enum: same as `allocation_mode` in "Assignment - fixed-hours-based allocation" (1 values)
      - `fixed_hours` (number, required)
        The number of hours the resource is allocated to a corresponding assignment. 

Note: This property is only present when allocation_mode is "fixed_hours".
        Example: 20
      - `id` (integer)
        The unique identifier for the assignment.
        Example: 889
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `assignable_id` (integer)
        The ID of the project, phase, or leave type to which the the assignment applies.
        Example: 1234
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `created_at` (string)
        The time of creation.
        Example: "2025-08-27T12:00:00Z"
      - `updated_at` (string)
        The time of the last update.
        Example: "2025-08-27T12:00:00Z"
      - `all_day_assignment` (boolean)
        Example: true
      - `resource_request_id` (integer,null)
      - `bill_rate` (number,null)
        The cost value.
        Example: 100
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.
    - Assignment - hours-per-day-based allocation:
      - `allocation_mode` (string, required)
        This indicates that a number of the resource's daily hours is allocated to the corresponding assignment.
        Enum: same as `allocation_mode` in "Assignment - hours-per-day-based allocation" (1 values)
      - `hours_per_day` (number, required)
        The number of hours per day that the resource is allocated to a corresponding assignment. 

Note: This property is only present when allocation_mode is "hours_per_day".
        Example: 6
      - `id` (integer)
        The unique identifier for the assignment.
        Example: 889
      - `user_id` (integer)
        The ID of the user this assignment belongs to.
        Example: 5612
      - `assignable_id` (integer)
        The ID of the project, phase, or leave type to which the the assignment applies.
        Example: 1234
      - `starts_at` (string, required)
        The assignment's effective start date.
        Example: "2025-09-17"
      - `ends_at` (string, required)
        The assignment's effective end date.
        Example: "2025-12-17"
      - `repetition_id` (integer,null)
        A unique identifier for a series of repeating assignments. If the assignment is part of a repeating series, this is the parent assignment's unique ID. Otherwise, it's null.

Note: This ID is the same for all assignments within the same repeating series.
        Example: 886
      - `created_at` (string)
        The time of creation.
        Example: "2025-08-27T12:00:00Z"
      - `updated_at` (string)
        The time of the last update.
        Example: "2025-08-27T12:00:00Z"
      - `all_day_assignment` (boolean)
        Example: true
      - `resource_request_id` (integer,null)
      - `bill_rate` (number,null)
        The cost value.
        Example: 100
      - `bill_rate_id` (integer,null)
        Example: 58776516
      - `status` (any,null)
      - `status_option_id` (integer,null)
        The ID of the status option associated with the assignment.
        Example: 1234567890
      - `description` (string)
        Describes the assignment.
      - `note` (boolean,null)
        Calls out ancillary information about the assignment.


