> This page is for API, version 2026-01-01 (Stable) (default).
> For other versions, use one of these documentation indexes:
> - 2026-01-01 (Stable) (default): https://docs.deel.wtf/api/stable/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.deel.wtf/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.deel.wtf/_mcp/server.

# List token activity

GET https://api.letsdeel.com/rest/logs/tokens

Returns, per token of the organization seen in the window, the number of calls and errors, the last use and IP, and a per-day series. Use it to find unused or noisy tokens. Window of at most 15 days (default: the last 24 hours); search matches the token label or id.

 **Token scopes**: `api-logs:read`

 **Beta**: this version requires the `X-Beta: true` request header and its contract may change before it is promoted to stable. It is scheduled to become stable on 2027-01-13.

Reference: https://docs.deel.wtf/api/reference/endpoints/logs/list-token-activity-v-2026-10-13

## Authentication

- `Authorization` header (bearer token, required) — ## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.deel.training/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
- `Authorization` header (bearer token, required) — Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

## Servers

- `https://api.letsdeel.com/rest` (Production, default)
- `https://api-staging.letsdeel.com/rest` (Demo)

## Request

### Query parameters

- `from` (string, optional) — Start of the window (ISO-8601). Defaults to 24 hours before `to`; a window wider than 15 days is clamped
- `to` (string, optional) — End of the window (ISO-8601). Defaults to now
- `search` (string, optional) — Only tokens whose label or id contains this text (case-insensitive)
- `cursor` (string, optional) — Cursor for keyset pagination, taken from a previous response `page.cursor`
- `limit` (integer, optional, default: 50) — Page size

### Headers

- `X-Beta` (enum, required, default: true) — Opts in to the beta version of this endpoint. Must be `true`.
  - Allowed values: `true`

## Response

### 200

A page of token activity, most recently used first

- `data` (list of LogsTokensGetResponsesContentApplicationJsonSchemaDataItems, required) — The page of results, newest first
- `page` (LogsTokensGetResponsesContentApplicationJsonSchemaPage, required) — Keyset pagination envelope for the page just returned

## Errors

### 400 Bad Request Error

Invalid query parameter, cursor or time window

- `errors` (list of LogsTokensGetResponsesContentApplicationJsonSchemaErrorsItems, required) — The errors, at least one
- `request` (LogsTokensGetResponsesContentApplicationJsonSchemaRequest, required) — The request the error belongs to

### 401 Unauthorized Error

Missing or invalid access token

- `errors` (list of LogsTokensGetResponsesContentApplicationJsonSchemaErrorsItems, required) — The errors, at least one
- `request` (LogsTokensGetResponsesContentApplicationJsonSchemaRequest, required) — The request the error belongs to

### 403 Forbidden Error

The token lacks the api-logs:read scope or the user lacks the developer_center.manage permission

- `errors` (list of LogsTokensGetResponsesContentApplicationJsonSchemaErrorsItems, required) — The errors, at least one
- `request` (LogsTokensGetResponsesContentApplicationJsonSchemaRequest, required) — The request the error belongs to

### 404 Not Found Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

### 429 Too Many Requests Error

Rate limit of 60 requests per minute per organization exceeded

- `errors` (list of LogsTokensGetResponsesContentApplicationJsonSchemaErrorsItems, required) — The errors, at least one
- `request` (LogsTokensGetResponsesContentApplicationJsonSchemaRequest, required) — The request the error belongs to

### 500 Internal Server Error

Operation failed.

- `request` (ApiErrorRequest, optional)
- `errors` (list of ApiError, optional)

## Types

### LogsTokensGetResponsesContentApplicationJsonSchemaDataItems

One token's activity over the window

- `calls` (integer, required) — Requests made with the token in the window
- `daily` (list of LogsTokensGetResponsesContentApplicationJsonSchemaDataItemsDailyItems, required) — Per-day series over the window, oldest first
- `token` (LogsTokensGetResponsesContentApplicationJsonSchemaDataItemsToken, required) — The token
- `errors` (integer, required) — Requests that ended in a 4xx or 5xx status
- `last_ip` (string, required, nullable) — Client IP of that latest request
- `last_used_at` (string, required) — Latest request made with the token (UTC)

### LogsTokensGetResponsesContentApplicationJsonSchemaPage

Keyset pagination envelope for the page just returned

- `cursor` (string, required, nullable) — Cursor for the next page, or null on the last page
- `has_next_page` (boolean, required) — Whether a further page is available

### LogsTokensGetResponsesContentApplicationJsonSchemaErrorsItems

One error

- `code` (string, required) — Machine-readable error code
- `message` (string, required) — Human-readable description

### LogsTokensGetResponsesContentApplicationJsonSchemaRequest

The request the error belongs to

- `url` (string, required) — URL of the request
- `method` (string, required) — HTTP method of the request
- `status` (integer, required) — HTTP status returned
- `api_req_id` (string, required) — Request id to quote when contacting support
- `docs` (string, optional) — Link to the documentation
- `source` (string, optional) — API surface that produced the error

### ApiErrorRequest

- `method` (string, optional) — The HTTP method of the failed request
- `url` (string, optional) — The relative URL of the failed request
- `status` (double, optional) — The status code of the response
- `api_req_id` (string, optional) — The request ID of the failed request
- `docs` (string, optional) — A link to the official documentation for the requested endpoint resource
- `source` (string, optional) — The source handler which produced the returned error
- `code` (double, optional) — The code of the source handler which produced the returned error

### ApiError

- `message` (string, optional) — A description of the returned error
- `path` (string, optional) — The JSON path where input validation failed

### LogsTokensGetResponsesContentApplicationJsonSchemaDataItemsDailyItems

One day of the token's activity

- `day` (string, required) — UTC day
- `calls` (integer, required) — Requests that day
- `errors` (integer, required) — Requests that day ending in a 4xx or 5xx status

### LogsTokensGetResponsesContentApplicationJsonSchemaDataItemsToken

The token

- `id` (string, required) — Token id shown in the Developer Center
- `type` (enum, required) — Personal access token or OAuth2 access token
  - Allowed values: `pat`, `oauth2`
- `label` (string, required, nullable) — Token label or OAuth2 client name at its latest use

## Examples

**Response**

```json
{
  "data": [
    {
      "calls": 4310,
      "daily": [
        {
          "day": "2026-09-21",
          "calls": 1240,
          "errors": 3
        }
      ],
      "token": {
        "id": "2f4d6c8a-1b3e-4f5a-9c7d-8e6f0a1b2c3d",
        "type": "pat",
        "label": "HRIS sync"
      },
      "errors": 12,
      "last_ip": "203.0.113.42",
      "last_used_at": "2026-09-21T16:04:39.001Z"
    }
  ],
  "page": {
    "cursor": "eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0",
    "has_next_page": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.letsdeel.com/rest/logs/tokens"

querystring = {"cursor":"eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0","from":"2026-09-20T16:00:00.000Z","limit":"50","search":"HRIS","to":"2026-09-21T16:00:00.000Z"}

headers = {
    "X-Beta": "true",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z';
const options = {method: 'GET', headers: {'X-Beta': 'true', Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Beta", "true")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Beta"] = 'true'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z")
  .header("X-Beta", "true")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Beta' => 'true',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Beta", "true");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Beta": "true",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/logs/tokens?cursor=eyJ0cyI6IjIwMjYtMDktMjFUMTY6MDQ6MzkuMDAxWiIsImlkIjoiNWYxYzJhOGU5YjNkNGM3YTFlMmYzYTRiIn0&from=2026-09-20T16%3A00%3A00.000Z&limit=50&search=HRIS&to=2026-09-21T16%3A00%3A00.000Z")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```