Skip to main content
POST
/
api
/
v1
/
time-entries
Create time entry
curl --request POST \
  --url https://api.contracting.kukkingu.software/api/v1/time-entries \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'tenant-id: <tenant-id>' \
  --data '
{
  "projectId": "prj_8f4d4gk1p9h2x0s7v3n5c1a9",
  "date": "2023-10-05",
  "durationSeconds": 3600,
  "billableId": "bil_eym9hcqlh1m7v3d36blf0vfx",
  "description": "Implemented authentication flow.",
  "referenceSource": "JIRA",
  "referenceId": "PROJ-123"
}
'
{
  "data": {
    "id": "tsh_8f4d4gk1p9h2x0s7v3n5c1a9",
    "project": "prj_8f4d4gk1p9h2x0s7v3n5c1a9",
    "billable": "bil_eym9hcqlh1m7v3d36blf0vfx",
    "date": "2023-10-05",
    "durationSeconds": 3600,
    "createdAt": "2023-10-05T14:48:00.000Z",
    "updatedAt": "2023-10-05T14:48:00.000Z",
    "description": "Implemented authentication flow.",
    "referenceSource": "JIRA",
    "referenceId": "PROJ-123"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

tenant-id
string
required

Specifies the tenant context for the request. All endpoints operate within this tenant scope.

Example:

"tnt_pfh0haxfpzowht3oi213cqos"

Body

application/json

Request body used to create a time entry resource.

Request body used to create a time entry resource.

projectId
string
required

Unique identifier of the project.

Example:

"prj_8f4d4gk1p9h2x0s7v3n5c1a9"

date
string<date>
required

Date when the time entry was recorded.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Example:

"2023-10-05"

durationSeconds
integer
required

Duration of the time entry in seconds.

Required range: x <= 9007199254740991
Example:

3600

billableId
string

Unique identifier of the billable.

Example:

"bil_eym9hcqlh1m7v3d36blf0vfx"

description
string

Optional description of the time entry.

Maximum string length: 1024
Example:

"Implemented authentication flow."

referenceSource
string

External source of the time entry reference.

Maximum string length: 255
Example:

"JIRA"

referenceId
string

External reference identifier for the time entry.

Maximum string length: 255
Example:

"PROJ-123"

Response

Default Response

Standard success response payload wrapped in a data property.

data
object
required

Time entry resource returned by the API.