Expensicat
API Reference

Time Entries

GET
/v1/time-entries

List time entries with filtering and pagination

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Query Parameters

cursor?string

Pagination cursor

limit?integer

Number of items per page (1-100)

start_date?string

Start date (YYYY-MM-DD)

end_date?string

End date (YYYY-MM-DD)

q?string

Search by description

project_id?string

Filter by project ID

user_id?string

Filter by user ID. Pass "me" to scope to the authenticated user, a UUID to filter to a specific user, or omit for org-wide results.

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/time-entries"
{
  "data": [
    {
      "id": "string",
      "organization_id": "string",
      "user_id": "string",
      "project_id": "string",
      "start_time": "string",
      "end_time": "string",
      "duration": 0,
      "description": "string",
      "billable": true,
      "invoice_id": "string",
      "created_at": "string",
      "updated_at": "string",
      "user": {
        "id": "string",
        "full_name": "string",
        "email": "string",
        "avatar_url": "string"
      },
      "project": {
        "id": "string",
        "name": "string",
        "customer_id": "string",
        "hourly_rate": 0,
        "currency": "string",
        "customer": {
          "id": "string",
          "name": "string"
        }
      },
      "invoice": {
        "id": "string",
        "number": "string",
        "status": "string",
        "date": "string",
        "due_date": "string"
      }
    }
  ],
  "meta": {
    "count": 0,
    "next_cursor": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
POST
/v1/time-entries

Create a new time entry

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/time-entries" \  -H "Content-Type: application/json" \  -d '{    "start_time": "string",    "description": "string"  }'
{
  "data": {
    "id": "string",
    "organization_id": "string",
    "user_id": "string",
    "project_id": "string",
    "start_time": "string",
    "end_time": "string",
    "duration": 0,
    "description": "string",
    "billable": true,
    "invoice_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "user": {
      "id": "string",
      "full_name": "string",
      "email": "string",
      "avatar_url": "string"
    },
    "project": {
      "id": "string",
      "name": "string",
      "customer_id": "string",
      "hourly_rate": 0,
      "currency": "string",
      "customer": {
        "id": "string",
        "name": "string"
      }
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
GET
/v1/time-entries/{id}

Get a single time entry by ID

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/time-entries/string"
{
  "data": {
    "id": "string",
    "organization_id": "string",
    "user_id": "string",
    "project_id": "string",
    "start_time": "string",
    "end_time": "string",
    "duration": 0,
    "description": "string",
    "billable": true,
    "invoice_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "user": {
      "id": "string",
      "full_name": "string",
      "email": "string",
      "avatar_url": "string"
    },
    "project": {
      "id": "string",
      "name": "string",
      "customer_id": "string",
      "hourly_rate": 0,
      "currency": "string",
      "customer": {
        "id": "string",
        "name": "string"
      }
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
PATCH
/v1/time-entries/{id}

Update time entry fields

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/time-entries/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "string",
    "organization_id": "string",
    "user_id": "string",
    "project_id": "string",
    "start_time": "string",
    "end_time": "string",
    "duration": 0,
    "description": "string",
    "billable": true,
    "invoice_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "user": {
      "id": "string",
      "full_name": "string",
      "email": "string",
      "avatar_url": "string"
    },
    "project": {
      "id": "string",
      "name": "string",
      "customer_id": "string",
      "hourly_rate": 0,
      "currency": "string",
      "customer": {
        "id": "string",
        "name": "string"
      }
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
DELETE
/v1/time-entries/{id}

Delete a time entry by ID

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/v1/time-entries/string"
Empty
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}