# Time\_entries API endpoint returning 400 despite following docs

**URL:** <https://community.toggl.com/t/time-entries-api-endpoint-returning-400-despite-following-docs/2095>\
**Category:** Ask the Community\
**Tags:** api\
**Created:** [May 17, 2025, 2:22pm UTC](https://community.toggl.com/t/time-entries-api-endpoint-returning-400-despite-following-docs/2095 "2025-05-17T14:22:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeanKilleen](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/seankilleen/32/1337_2.png) [@SeanKilleen](https://community.toggl.com/u/SeanKilleen)\
**Post date:** [May 17, 2025, 2:22pm UTC](https://community.toggl.com/t/time-entries-api-endpoint-returning-400-despite-following-docs/2095/1 "2025-05-17T14:22:30Z")

</div>

Hi all! I’m attempting to get my time entries via the Toggl API so I can do some reporting that Toggl currently doesn’t support (specifically, grouping my time entries by Day → Project → Task → time total and notes).

I’ve never used the Toggl API but am pretty familiar with APIs in general.

Reproduction Steps:

- Generated API token
- Imported the Swagger file into Postman
- Set up basic auth with the API token
- Made a request to the “me” endpoint to validate that auth is working correctly ✅

Then, I figured I’d make a request to `me/time_entries`.

- I inherit auth in Postman so that I’m using the same successful auth from earlier, and I see that reflected to me in the Postman UI.
- The documentation provides two options: since/before, which seem to use unix epochs, and start\_date/end\_date, which use RFC3339.
- I try the request two ways:
  - with a `since` of `1746835200000` and a `before` of `1747439999000`
  - with a `start_date` of `2025-05-10T00:00:00-04:00` and an `end_date` of `2025-05-17T00:00:00-04:00`

Expected behavior: See a list of time entries

Actual behavior: In these situations, I receive back a 400 response with an HTML page that has a heading that says “Error: Bad Request” and text that says “Your client has issued a malformed or illegal request”.

Postman console log below (sensitive parts redacted) – can someone see what I’m missing?

Log for request using start\_date / end\_date:

```auto
Request Headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Basic [REDACTED]
User-Agent: PostmanRuntime/7.43.4
Postman-Token: [REDACTED]
Host: api.track.toggl.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 83

Request Body
start_date: "2025-05-10T00:00:00-04:00"
end_date: "2025-05-17T00:00:00-04:00"

```

And with since/before:

```auto
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: Basic [REDACTED]
User-Agent: PostmanRuntime/7.43.4
Postman-Token: [REDACTED]
Host: api.track.toggl.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 40
Request Body
since: "1746835200000"
before: "1747439999000"

```

---

<div class="post-metadata">

**Author:** ![SeanKilleen](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/seankilleen/32/1337_2.png) [@SeanKilleen](https://community.toggl.com/u/SeanKilleen)\
**Post date:** [May 18, 2025, 2:47pm UTC](https://community.toggl.com/t/time-entries-api-endpoint-returning-400-despite-following-docs/2095/2 "2025-05-18T14:47:20Z")

</div>

Still not resolved, but wanted to add additional information:

I noticed that the Postman examples use form-urlencoded format, while the [Time entry docs](https://engineering.toggl.com/docs/api/time_entry/index.html) seem to require `application/json`. So, I attempted a JSON-based request to the endpoint using:

- `start_date` / `end_date` with RFC3339-compliant date stamps (both with and without time)
- `since` / `before` using unix epochs (both with and without milliseconds) – both as strings and as integers.

Now I feel like I’ve truly exhausted all the options and am confused as to why the illegal request error is returned.

---

<div class="post-metadata">

**Author:** ![SeanKilleen](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/seankilleen/32/1337_2.png) [@SeanKilleen](https://community.toggl.com/u/SeanKilleen)\
**Post date:** [May 18, 2025, 2:59pm UTC](https://community.toggl.com/t/time-entries-api-endpoint-returning-400-despite-following-docs/2095/3 "2025-05-18T14:59:40Z")

</div>

Amazingly enough, the Chronos AI agent actually resolved my issue, showing that both the API docs and the Postman collection appear to be incorrect.

The solution is to do a GET request, with _no_ body, and to add `start_date` and `end_date` as querystrings rather than JSON or form items.

For example, `{{baseUrl}}/me/time_entries?start_date=2025-05-10&end_date=2025-05-17` returns the expected result.
