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

# Get what changed across several activity items in one call

POST https://api.athenaintel.com/api/v0/assets/{asset_id}/activity/deltas
Content-Type: application/json

Admin only. Batch form of the activity-delta endpoint: diff several clock ranges in one request. Prefer this when walking a whole log — one call computes every range in a single pass over the document instead of one request each (up to 25 per call). Results come back in request order, and a range that could not be read carries its own `error` instead of failing the batch. Same payload and `coverage` semantics as the single-range endpoint.

Reference: https://docs.athenaintel.com/api-reference/assets/get-activity-deltas

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `asset_id` (string, required)

### Body (application/json)

This endpoint expects an AssetActivityDeltaBatchRequestIn.

- `ranges` (list of ActivityClockRangeIn, required) — Activity clock ranges to diff, at most 25 per call. Results are returned in request order.

## Response

### 200

Successful Response

- `asset_id` (string, required)
- `asset_type` (string, required)
- `deltas` (list of ActivityDeltaOut, required)
- `schema_version` (string, required) — Version of the delta payload shape. Detail fields are added additively within a version; a breaking change bumps it.

## Errors

### 400 Bad Request Error

Malformed or unsupported request

- `any`

### 401 Unauthorized Error

Unauthorized

- `message` (string, required)

### 403 Forbidden Error

Caller is not an admin, or cannot access the asset's workspace

- `any`

### 404 Not Found Error

Not Found

- `message` (string, required)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ActivityClockRangeIn

One activity item's clock range, from the activity endpoint.

- `from` (integer, required) — Start clock, from an activity item's from_clock.
- `to` (integer, required) — End clock, from the same activity item's to_clock.

### ActivityDeltaOut

The change one activity item made, or why it is unavailable.

- `from_clock` (integer, required)
- `to_clock` (integer, required)
- `delta` (map from string to any, optional, nullable) — The change itself. Always carries kind, type, summary, totals, and coverage; typed detail (cell_changes, slide_changes, inserted_text, ...) varies by kind. Null when error is set.
- `error` (string, optional, nullable) — Why this range could not be diffed. Null on success.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{
  "ranges": [
    {
      "from": 1752694811020,
      "to": 1752694813551
    },
    {
      "from": 1752691402184,
      "to": 1752691409776
    }
  ]
}
```

**Response**

```json
{
  "asset_id": "asset_17d178ad",
  "asset_type": "spreadsheet",
  "deltas": [
    {
      "from_clock": 1752694811020,
      "to_clock": 1752694813551,
      "delta": {
        "axis_changes": [],
        "cell_changes": [
          {
            "cell_ref": "F14",
            "change_type": "modified",
            "new_value": "1,197,300",
            "old_value": "1,204,500",
            "sheet_id": "1",
            "sheet_name": "Testing"
          }
        ],
        "coverage": {
          "complete": true,
          "dropped": []
        },
        "facet_changes": [],
        "kind": "sheet",
        "range_changes": [],
        "structure_changes": [],
        "summary": "2 cells modified, 1 cell added",
        "totals": {
          "cells_added": 1,
          "cells_deleted": 0,
          "cells_formatted": 0,
          "cells_modified": 2
        },
        "type": "replace"
      }
    }
  ],
  "schema_version": "athena-activity-delta/v1"
}
```

**SDK Code**

```python
import requests

url = "https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas"

payload = { "ranges": [
        {
            "from": 1752694811020,
            "to": 1752694813551
        },
        {
            "from": 1752691402184,
            "to": 1752691409776
        }
    ] }
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"ranges":[{"from":1752694811020,"to":1752694813551},{"from":1752691402184,"to":1752691409776}]}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas"

	payload := strings.NewReader("{\n  \"ranges\": [\n    {\n      \"from\": 1752694811020,\n      \"to\": 1752694813551\n    },\n    {\n      \"from\": 1752691402184,\n      \"to\": 1752691409776\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	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.athenaintel.com/api/v0/assets/asset_id/activity/deltas")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ranges\": [\n    {\n      \"from\": 1752694811020,\n      \"to\": 1752694813551\n    },\n    {\n      \"from\": 1752691402184,\n      \"to\": 1752691409776\n    }\n  ]\n}"

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.post("https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ranges\": [\n    {\n      \"from\": 1752694811020,\n      \"to\": 1752694813551\n    },\n    {\n      \"from\": 1752691402184,\n      \"to\": 1752691409776\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas', [
  'body' => '{
  "ranges": [
    {
      "from": 1752694811020,
      "to": 1752694813551
    },
    {
      "from": 1752691402184,
      "to": 1752691409776
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ranges\": [\n    {\n      \"from\": 1752694811020,\n      \"to\": 1752694813551\n    },\n    {\n      \"from\": 1752691402184,\n      \"to\": 1752691409776\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["ranges": [
    [
      "from": 1752694811020,
      "to": 1752694813551
    ],
    [
      "from": 1752691402184,
      "to": 1752691409776
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/assets/asset_id/activity/deltas")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```