Time Entries

Browse the API reference and sample payloads for Time Magic integrations.

Time Entries

Time entries track time spent on activities or tasks.

List time entries

Subscription required

Endpoint: /api/time_entries

Returns time entries for the authenticated user.

Response body

{
  "time_entries": [
    {
      "id": "<time_entry_uuid>",
      "resource_type": "activity",
      "resource_id": "<activity_uuid>",
      "started_at": "2025-05-21T09:00:00Z",
      "ended_at": "2025-05-21T10:30:00Z"
    }
  ]
}

Get time entry

Subscription required

Endpoint: /api/time_entries/:id

Returns a time entry by UUID.

Response body

{
  "time_entry": {
    "id": "<time_entry_uuid>",
    "resource_type": "activity",
    "resource_id": "<activity_uuid>",
    "started_at": "2025-05-21T09:00:00Z",
    "ended_at": "2025-05-21T10:30:00Z"
  }
}

Create time entry

Endpoint: /api/time_entries

Create a time entry. Optionally attach it to a resource. resource_type can be activity or task.

Request body

{
  "time_entry": {
    "resource_type": "activity",
    "resource_id": "<activity_uuid>",
    "started_at": "2025-05-21T09:00:00Z",
    "ended_at": "2025-05-21T10:30:00Z"
  }
}

Response body

{
  "time_entry": {
    "id": "<time_entry_uuid>",
    "resource_type": "activity",
    "resource_id": "<activity_uuid>",
    "started_at": "2025-05-21T09:00:00Z",
    "ended_at": "2025-05-21T10:30:00Z"
  }
}

Update time entry

Endpoint: /api/time_entries/:id

Update a time entry.

Request body

{
  "time_entry": {
    "resource_type": "task",
    "resource_id": "<task_uuid>",
    "started_at": "2025-05-21T09:15:00Z",
    "ended_at": "2025-05-21T10:45:00Z"
  }
}

Response body

{
  "time_entry": {
    "id": "<time_entry_uuid>",
    "resource_type": "task",
    "resource_id": "<task_uuid>",
    "started_at": "2025-05-21T09:15:00Z",
    "ended_at": "2025-05-21T10:45:00Z"
  }
}

Delete time entry

Endpoint: /api/time_entries/:id

Delete a time entry.

Response body

{
  "status": "deleted"
}