Creates a time entry.

POSThttps://api.awork.com/api/v1/timeentries
POST https://api.awork.com/api/v1/timeentries

Creates a time entry. The entry records the submitted project, task, user, and duration.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Request body Required

The time entry data.

application/json

isBillablebooleanOptional

Whether the time tracking is billable or not.

isBilledbooleanOptional

Whether the time tracking is billed or not.

taskIdstring or nullOptional
format: uuid

The id of the task.

projectIdstring or nullOptional
format: uuid

The id of the project.

notestring or nullOptional

The note of the time tracking.

startDateUtcstring or nullOptional
format: date-time

The date (in UTC) when the time tracking was started.

startTimeUtcstring or nullOptional

The time (in UTC) when the time tracking was started.

endDateUtcstring or nullOptional
format: date-time

The date (in UTC) when the time tracking was stopped.

endTimeUtcstring or nullOptional

The time (in UTC) when the time tracking was stopped. Required when the time tracking has already been completed and Duration has not been set.

startDateLocalstring or nullOptional
format: date-time

The date (in Local) when the time tracking was started.

startTimeLocalstring or nullOptional

The time (in Local) when the time tracking was started.

endDateLocalstring or nullOptional
format: date-time

The date (in Local) when the time tracking was stopped.

endTimeLocalstring or nullOptional

The time (in Local) when the time tracking was stopped. Required when the time tracking has already been completed and Duration has not been set.

timezonestringRequired
minLength: 1

The original timezone of the time tracking. The format of the timezone is the IANA standard.

durationinteger or nullOptional
format: int32

The duration of the time tracking in seconds. Required when the time tracking has already been completed and EndTime has not been set.

breakDurationinteger or nullOptional
format: int32

The duration of the break in seconds. Cannot be set via API.

typeOfWorkIdstringRequired
format: uuid

The id of the type of work.

userIdstringRequired
format: uuid

The id of the user.

Responses

200 OK

application/json

isBillablebooleanOptional

Whether the time tracking is billable or not.

isBilledbooleanOptional

Whether the time tracking is billed or not.

taskIdstring or nullOptional
format: uuid

The id of the task.

projectIdstring or nullOptional
format: uuid

The id of the project.

notestring or nullOptional

The note of the time tracking.

startDateUtcstring or nullOptional
format: date-time

The date (in UTC) when the time tracking was started.

startTimeUtcstring or nullOptional

The time (in UTC) when the time tracking was started.

endDateUtcstring or nullOptional
format: date-time

The date (in UTC) when the time tracking was stopped.

endTimeUtcstring or nullOptional

The time (in UTC) when the time tracking was stopped. Required when the time tracking has already been completed and Duration has not been set.

startDateLocalstring or nullOptional
format: date-time

The date (in Local) when the time tracking was started.

startTimeLocalstring or nullOptional

The time (in Local) when the time tracking was started.

endDateLocalstring or nullOptional
format: date-time

The date (in Local) when the time tracking was stopped.

endTimeLocalstring or nullOptional

The time (in Local) when the time tracking was stopped. Required when the time tracking has already been completed and Duration has not been set.

timezonestringRequired
minLength: 1

The original timezone of the time tracking. The format of the timezone is the IANA standard.

durationinteger or nullOptional
format: int32

The duration of the time tracking in seconds. Required when the time tracking has already been completed and EndTime has not been set.

breakDurationinteger or nullOptional
format: int32

The duration of the break in seconds. Cannot be set via API.

typeOfWorkIdstringRequired
format: uuid

The id of the type of work.

userIdstring or nullOptional
format: uuid

The id of the user. Can be null if the user was deleted.

idstringOptional
format: uuid

The id of the time tracking.

createdBystringOptional
format: uuid

The id of the user who created this time tracking.

createdOnstringOptional
format: date-time

The date this time tracking was created.

updatedBystringOptional
format: uuid

The id of the user who last updated this time tracking.

updatedOnstringOptional
format: date-time

The date this time tracking was last modified.

typeOfWorkobjectOptional
Show 4 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

iconstring or nullOptional

The icon of the type.

isArchivedbooleanOptional

Whether the type is archived.

userobjectOptional
Show 5 properties
idstringOptional
format: uuid

The identifier of the nested model.

firstNamestring or nullOptional

The first name of the user.

lastNamestring or nullOptional

The last name of the user.

hasImageboolean or nullOptional

Whether this user has a profile image.

isExternalbooleanOptional

Whether the user is external.

taskobjectOptional
Show 15 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

baseTypestring or nullOptional

The base type of the task. Can be 'private' for a private task or 'projecttask' for a project task.

taskIdentifierstring or nullOptional

The full task identifier combining project key and task number (e.g., "NIKE-42"). Maintained by the service layer, updated when project key changes.

taskStatusIdstringOptional
format: uuid

The id of the status for this task.

typeOfWorkIdstringOptional
format: uuid

The id of the type of work of this task.

projectobjectOptional
Show 11 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

projectStatusobjectOptional
Show 5 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

descriptionstring or nullOptional

The description of the type.

typestring or nullOptional

The type of the status.

isArchivedbooleanOptional

Whether the type is archived.

companyobjectOptional
Show 4 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

hasImagebooleanOptional

Whether the company has a profile image.

descriptionstring or nullOptional

The description of the company.

projectTypeobjectOptional
Show 4 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

iconstring or nullOptional

The icon of the type.

isArchivedbooleanOptional

Whether the type is archived.

projectKeystring or nullOptional

The unique project key within the workspace (e.g., "NIKE"). Maximum 32 characters, uppercase letters, numbers, and dashes only.

isPrivatebooleanOptional

Whether the project is private.

hasImagebooleanOptional

Whether the project has an image.

isExternalbooleanOptional

Whether the project is external.

isBillableByDefaultboolean or nullOptional

Whether project times should be billable by default.

createdBystringOptional
format: uuid

The id of the user who created the project.

projectIdstring or nullOptional
format: uuid

The id of the project this task is assigned to. Only set if this is a project task. In this case, it is equal to the EntityId.

plannedDurationinteger or nullOptional
format: int32

The expected planned workload of the task, in seconds.

closedOnstring or nullOptional
format: date-time

The date the task was set to closed.

taskStatusobjectOptional
Show 6 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

descriptionstring or nullOptional

The description of the type.

typestring or nullOptional

The type of the status.

ordernumber or nullOptional
format: double

The order of the task status in a task.

iconstring or nullOptional

The icon of the task status in a task.

createdBystringOptional
format: uuid

The id of the user who created this task.

correlationIdstringOptional
format: uuid

The correlation id between parent and subtasks, meaning it's either the ParentId or its own Id.

parentIdstring or nullOptional
format: uuid

The id of the parent task this of this subtask. Only set if this is a subtask.

parentTaskobjectOptional
Show 2 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

projectobjectOptional
Show 11 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

projectStatusobjectOptional
Show 5 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

descriptionstring or nullOptional

The description of the type.

typestring or nullOptional

The type of the status.

isArchivedbooleanOptional

Whether the type is archived.

companyobjectOptional
Show 4 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

hasImagebooleanOptional

Whether the company has a profile image.

descriptionstring or nullOptional

The description of the company.

projectTypeobjectOptional
Show 4 properties
idstringOptional
format: uuid

The identifier of the nested model.

namestring or nullOptional

The name of the entity.

iconstring or nullOptional

The icon of the type.

isArchivedbooleanOptional

Whether the type is archived.

projectKeystring or nullOptional

The unique project key within the workspace (e.g., "NIKE"). Maximum 32 characters, uppercase letters, numbers, and dashes only.

isPrivatebooleanOptional

Whether the project is private.

hasImagebooleanOptional

Whether the project has an image.

isExternalbooleanOptional

Whether the project is external.

isBillableByDefaultboolean or nullOptional

Whether project times should be billable by default.

createdBystringOptional
format: uuid

The id of the user who created the project.

breaksarray of object or nullOptional

The breaks of the time tracking.

Show 3 properties
startDatestringOptional
format: date-time

The start date and time of the break in UTC. Required.

durationinteger or nullOptional
format: int32

The duration of the break in seconds. Required when the end date is set. When a time tracking is paused, it has at least one break with a start date and no duration or end date.

endDatestring or nullOptional
format: date-time

The end date and time of the break in UTC. Required when the duration is set and the break is finished.

resourceVersionintegerOptional
format: int64

The version of the entity, updated on every modification, to the ticks in UTC. Not identical to UpdatedOn.

isExternalbooleanOptional

True if this entity is coming from an external workspace (awork Connect).

400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

401 Unauthorized

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation