# Create project time entry

Creates a new time entry for a project. The assignable_id in the request body is the project ID from the URL, and it must match.

>Note: When creating time entries, a valid user_id, assignable_id, date and hours must be supplied. Assignable ID can be assignable_id, project_id or leave_type_id.

You can optionally specify values for task and notes, which must be fewer than 256 characters in length. If you know a valid bill_rate_id matching the user and project of the time entry, you can specify that at the time of creating a time entry as well.

Endpoint: POST /projects/{project_id}/time_entries
Version: v1
Security: AuthToken

## Path parameters:

  - `project_id` (integer, required)
    The ID of the project.

## Request fields (application/json):

  - `user_id` (integer, required)
    User ID (licensed user only).
    Example: 123

  - `assignable_id` (integer, required)
    Project, Phase or Leave type ID.
    Example: 1001

  - `date` (string, required)
    The date.
    Example: "2012-01-21"

  - `hours` (number, required)
    Number of hours confirmed.
    Example: 0.5

  - `task` (string,null)
    A task category.
    Example: "Travel"

  - `notes` (string,null)
    A note.
    Example: "Drive to Seattle, WA"

  - `bill_rate_id` (integer,null)
    The rate ID reference.

## Response 200 fields (application/json):

  - `id` (integer)
    Unique identifier for the time entry.
    Example: 100000

  - `user_id` (integer, required)
    The ID of the user (licensed user only) associated with the time entry.
    Example: 123

  - `assignable_id` (integer, required)
    The ID of the assigned Project, Phase, or Leave Type.
    Example: 1001

  - `assignable_type` (string)
    The type of the assignable resource.
    Enum: "Project", "LeaveType"

  - `date` (string, required)
    The date of the time entry.
    Example: "2024-09-12"

  - `hours` (number, required)
    The number of hours confirmed. Can be null.

  - `is_suggestion` (boolean)
    Indicates if the time entry is a suggestion.
    Example: true

  - `scheduled_hours` (number,null)
    The number of scheduled hours for the time entry.
    Example: 8

  - `task` (string,null)
    The task category. Can be null.

  - `notes` (string,null)
    Additional notes for the time entry. Can be null.

  - `bill_rate` (number,null)
    The hourly rate for the time entered.
    Example: 150

  - `bill_rate_id` (integer,null)
    The ID of the billing rate.
    Example: 4

  - `created_at` (string)
    Timestamp when the time entry was created.
    Example: "2024-09-12T04:32:28Z"

  - `updated_at` (string)
    Timestamp when the time entry was last updated.
    Example: "2024-09-18T04:32:28Z"

## Response 404 fields (application/json):

  - `message` (string)
    Example: "not found"


