> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reo.dev Write API: Reo Write Add Telemetry Aggregate

> Send a pre-counted product telemetry total for an IP or domain to Reo.dev. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Send a pre-counted product telemetry total for an IP or domain to Reo.dev.

> [!NOTE]
>
> Tool ID: `reo_write_add_telemetry_aggregate`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'reo_write_add_telemetry_aggregate',
  {
    "payload": {
      "mode": "DOMAIN",
      "source": "TELEMETRY",
      "activity_type": "example",
      "count": 123,
      "event_at": 123,
      "product_id": "product_123"
    }
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run reo_write_add_telemetry_aggregate --input '{
  "payload": {
    "mode": "DOMAIN",
    "source": "TELEMETRY",
    "activity_type": "example",
    "count": 123,
    "event_at": 123,
    "product_id": "product_123"
  }
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "response_code": "example",
    "response": "example",
    "status": "example"
  }
}
```

Use `deepline describe reo_write_add_telemetry_aggregate --json` for the latest machine-readable contract.

## Input reference

### Overview Sends a pre-aggregated usage count (e.g. 1,250 events) for one IP or domain. There's no user ID, so Reo maps usage at the domain level and then to the company. Use this for anonymous telemetry where you only have counts. ### Path Parameters None. ### Errors | Code | When it happens | Response body | |---|---|---| | 400 | API key wrong or missing | `&#123;"response_code":400,"response":"Authentication Failure","status":"failure"&#125;` | ### ENUMs | Field | Value | Meaning | |---|---|---| | mode | `DOMAIN` | Count is for a whole IP or domain. Reo maps it to the Account | | source | `TELEMETRY` | Telemetry event data | ### Things to Note - Use Single Events when you send one event at a time. Use this API when you only have pre-counted totals. - Only `DOMAIN` mode is supported for telemetry. `USER` mode is for Add Custom Product Data only. - There are no `user_id` or `user_id_type` See the live schema below for the complete notes.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.payload` | `object` | Yes | — | Wrapper object. Every field sits inside it. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "### Overview Sends a pre-aggregated usage count (e.g. 1,250 events) for one IP or domain. There's no user ID, so Reo maps usage at the domain level and then to the company. Use this for anonymous telemetry where you only have counts. ### Path Parameters None. ### Errors | Code | When it happens | Response body | |---|---|---| | 400 | API key wrong or missing | `{\"response_code\":400,\"response\":\"Authentication Failure\",\"status\":\"failure\"}` | ### ENUMs | Field | Value | Meaning | |---|---|---| | mode | `DOMAIN` | Count is for a whole IP or domain. Reo maps it to the Account | | source | `TELEMETRY` | Telemetry event data | ### Things to Note - Use Single Events when you send one event at a time. Use this API when you only have pre-counted totals. - Only `DOMAIN` mode is supported for telemetry. `USER` mode is for Add Custom Product Data only. - There are no `user_id` or `user_id_type` fields. Send either `ip_addr` or `domain`. - No `user` header is needed. Use your Write API key, not the Read API key. - `activity_type` must match a metric configured in Product Usage Settings, or Reo won't process the data.",
    "properties": {
      "payload": {
        "type": "object",
        "description": "Wrapper object. Every field sits inside it.",
        "properties": {
          "mode": {
            "type": "string",
            "description": "`DOMAIN` (the only mode for telemetry). - `DOMAIN`: Count is for a whole IP or domain. Reo maps it to the Account",
            "enum": [
              "DOMAIN"
            ]
          },
          "source": {
            "type": "string",
            "description": "`TELEMETRY`. - `TELEMETRY`: Telemetry event data",
            "enum": [
              "TELEMETRY"
            ]
          },
          "activity_type": {
            "type": "string",
            "description": "Must be a metric key configured in Product Usage Settings, for example `PAGE_VISIT`."
          },
          "count": {
            "type": "integer",
            "description": "Aggregated count of telemetry events, for example `1250`."
          },
          "ip_addr": {
            "type": "string",
            "description": "IP the telemetry came from. Required if `domain` isn't sent. Required: One of `ip_addr` / `domain`."
          },
          "domain": {
            "type": "string",
            "description": "Domain tied to the telemetry. Required if `ip_addr` isn't sent. Required: One of `ip_addr` / `domain`."
          },
          "event_at": {
            "type": "integer",
            "description": "Time the API call was made, Unix timestamp in seconds."
          },
          "product_id": {
            "type": "string",
            "description": "Unique ID of your product."
          },
          "event_id": {
            "type": "string",
            "description": "Unique ID for the API call."
          },
          "environment": {
            "type": "string",
            "description": "Where the product runs, for example `PRODUCTION`."
          },
          "user_agent": {
            "type": "string",
            "description": "Browser or client string."
          },
          "meta": {
            "type": "object",
            "description": "Any extra key-value data.",
            "additionalProperties": true
          }
        },
        "required": [
          "mode",
          "source",
          "activity_type",
          "count",
          "event_at",
          "product_id"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "payload"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.response_code` | `string` | No | — | Status code, as a string. |
| `result.data.response` | `string` | No | — | Result message. |
| `result.data.status` | `string` | No | — | `success` or `failure`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "response_code": {
            "type": "string",
            "description": "Status code, as a string."
          },
          "response": {
            "type": "string",
            "description": "Result message."
          },
          "status": {
            "type": "string",
            "description": "`success` or `failure`."
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.