---
title: Send AI tool user activity
description: Send daily AI coding tool activity for one or more users.
breadcrumbs: Documentación > API > Send AI tool user activity
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/llms.txt).

# Send AI tool user activity

## v2 (latest)

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/ai_impact/user_activity     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/ai_impact/user_activity |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/ai_impact/user_activity |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/ai_impact/user_activity      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/ai_impact/user_activity |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/ai_impact/user_activity |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/ai_impact/user_activity |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/ai_impact/user_activity      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/ai_impact/user_activity  |

### Overview

Send daily AI coding tool activity for one or more users. Each entry records whether a
user was active on a given day, along with the AI tools and models they used. An entry
is stored once per tool, and sending the same user, day, and tool again overwrites the
previous value.

### Request

#### Body Data (required)

{% tabs %}
{% tab label="Model" %}
| Parent field | Field                   | Type     | Description                                                                                                                                                                                                                                                            |
| ------------ | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | [object] | A batch of daily AI tool activity entries. A batch must contain between 1 and 1,000 entries.                                                                                                                                                                           |
| data         | attributes [*required*] | object   | Daily AI coding tool activity for a single user. Each entry reports whether the user was active on a given day and which AI tools and models they used.                                                                                                                |
| attributes   | day [*required*]        | string   | The day the activity refers to, in `YYYY-MM-DD` format.                                                                                                                                                                                                                |
| attributes   | is_active [*required*]  | boolean  | Whether the user actively used the listed AI tools on that day.                                                                                                                                                                                                        |
| attributes   | models                  | [string] | The AI models the user used on that day, for example `claude-sonnet-4.5` or `gpt-5`. Values are lowercased and duplicates are removed.                                                                                                                                 |
| attributes   | tools [*required*]      | [string] | The AI coding tools the user used on that day, for example `Claude Code`, `Cursor`, or `GitHub Copilot`. Known tools are normalized to a canonical name (`claude_code`, `cursor`, `copilot`), and other values are converted to snake case. Entries must not be empty. |
| attributes   | user_email [*required*] | string   | The email address of the user. It is case-insensitive and is matched against the email addresses of commit authors.                                                                                                                                                    |
| data         | type [*required*]       | enum     | JSON:API type for AI Impact user activity entries. Allowed enum values: `ai_impact_user_activity`. Default: `ai_impact_user_activity`.                                                                                                                                 |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "day": "2026-05-26",
        "is_active": true,
        "models": [
          "claude-sonnet-4.5",
          "gpt-5"
        ],
        "tools": [
          "Claude Code",
          "Cursor"
        ],
        "user_email": "user@example.com"
      },
      "type": "ai_impact_user_activity"
    }
  ]
}
```
{% /tab %}
{% /tabs %}

### Response

{% tabs %}
{% tab label="200" %}
OK
{% /tab %}

{% tab label="400" %}
Bad Request: the batch is empty, has more than 1,000 entries, or contains an invalid entry.
An entry is invalid when `user_email`, `is_active`, or `day` is missing, `tools` is missing
or an empty array, `user_email` is not a valid email address, `day` is not in `YYYY-MM-DD`
format, or a tool name is empty. The error message identifies the index of the first invalid
entry. Fix the payload and send the request again.

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Not Authorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
export DD_API_KEY="<DD_API_KEY>"

curl -X POST "https://api.${DD_SITE}/api/v2/ai_impact/user_activity" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "day": "2026-05-26",
        "is_active": true,
        "models": [
          "claude-sonnet-4.5",
          "gpt-5"
        ],
        "tools": [
          "Claude Code",
          "Cursor"
        ],
        "user_email": "user@example.com"
      },
      "type": "ai_impact_user_activity"
    }
  ]
}
EOF
```
{% /tab %}
{% /tabs %}
