Time Entries

Log a time entry

Logs time. Only seconds and date are required: the account comes from the token, and the client is taken from the project, so neither is something you send.

Attach the entry to work with project_id or task_uuid. Sending task_uuid also settles the project — it is taken from the task, and any project_id you send is ignored.

Two fields depend on permissions rather than on what you send. rate and non_billable are only honoured for a token allowed to set billing; for anyone else Bonsai derives them from the project or member rate and the project's billing type. Logging time against someone else's name with owner_member_id needs permission to manage the whole team's time; it defaults to whoever the token belongs to.

post/public-api/v1/time_entries

Request

  • Base URL
    https://app.hellobonsai.com
  • URL
    https://app.hellobonsai.com/public-api/v1/time_entries
  • Auth
    • OAuth 2
      Authorization code: https://app.hellobonsai.com/oauth/authorize
      Token URL: https://app.hellobonsai.com/oauth/token
    • or HTTP bearer

Request body

Example request

{
  "time_entry": {
    "seconds": 3600,
    "date": "2026-06-17",
    "project_id": 51,
    "task_uuid": "ad3fdad8-5072-46df-8800-bb57299179df",
    "notes": "Homepage build",
    "rate": "150.00"
  }
}

Response

The time entry was logged.

Example response

{
  "data": {
    "key": "01JTR8Z9K5QW3M7VX4YB2NC6HD",
    "seconds": 3600,
    "date": "2026-06-17",
    "notes": "Homepage build",
    "rate": "150.0",
    "billable_amount": "150.0",
    "status": "unbilled",
    "project_id": 51,
    "owner_member_id": 314,
    "created_at": "2026-04-14T09:12:04.000Z",
    "billing_status": "unbilled",
    "currency": "USD",
    "formatted_time": "01:00:00",
    "task_uuid": "ad3fdad8-5072-46df-8800-bb57299179df"
  },
  "meta": {
    "request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.