> This page is for version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://docs.paid.ai/v-2/llms.txt

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

# Look up signals by ID

POST https://api.agentpaid.io/api/v2/signals/lookup
Content-Type: application/json

Fetch up to 500 ingested signals (usage events) by ID in one request, each with the data payload submitted at ingest. Use it to resolve the `signalId` values on a page of credit transactions, or the signals behind one run or ticket, instead of calling `GET /api/v2/signals/{id}` once per signal. Signals are returned in request order; IDs that match nothing in your organization are listed under `notFound` rather than failing the request. This is a read-only operation: it requires the `read:usage` scope and is not available to customer API keys.

Reference: https://docs.paid.ai/api-reference/api-reference/signals/get-signals-by-ids

## Authentication

- `Authorization` header (bearer token, required) — API Key authentication using Bearer token

## Request

### Query parameters

- `includeVoided` (boolean, optional) — Include voided signals in the response. Defaults to false, and an absent value and false behave the same: a voided signal is one you withdrew, so the read leaves it out (a list leaves it out of its rows and of `pagination.total`; the read by ID answers a voided signal as not found; the bulk lookup reports it under `notFound`) and no signal carries a `voided` field. With true, voided signals are included and every signal returned carries `voided`, true or false. For an organization without signal voiding the option is ignored and no signal carries `voided`.

### Body (application/json)

This endpoint expects a SignalLookupRequest.

- `ids` (list of string, required) — Signal IDs to fetch, up to 500 per request. Duplicates are collapsed. For example the `signalId` values from a page of `GET /api/v2/credits/transactions`.

## Response

### 200

200

- `data` (list of SignalListItem, required) — The signals found, in the order their IDs were requested. Each item has the same shape as `GET /api/v2/signals/{id}`, including the data payload.
- `notFound` (list of string, required) — Requested IDs that match no signal in your organization, in request order. Malformed IDs are reported here rather than rejected. A voided signal is reported here too unless the request passes `includeVoided=true`.

## Errors

### 400 Bad Request Error

400

- `error` (string, required)
- `code` (string, optional)
- `details` (string, optional)

### 403 Forbidden Error

403

- `error` (string, required)
- `code` (string, optional)
- `details` (string, optional)

### 429 Too Many Requests Error

429

- `error` (string, required)
- `code` (string, optional)
- `details` (string, optional)

### 500 Internal Server Error

500

- `error` (string, required)
- `code` (string, optional)
- `details` (string, optional)

## Types

### SignalListItem

- `id` (string, required) — Unique signal identifier.
- `name` (string, required) — Signal event name as submitted at ingest.
- `customerId` (string, required, nullable) — Paid customer ID the signal is attributed to, or null if unattributed.
- `externalCustomerId` (string, required, nullable) — The external customer ID recorded at ingest, including unresolved IDs, or null if not set.
- `productId` (string, required, nullable) — Paid product ID the signal is attributed to, or null if unattributed.
- `externalProductId` (string, required, nullable) — The external product ID recorded at ingest, including unresolved IDs, or null if not set.
- `traceId` (string, required, nullable) — Distributed trace ID, or null if none was recorded.
- `data` (map from string to any, required, nullable) — The data payload submitted with the signal. A signal whose active customer unit was not billable in effect when it arrived (`effectiveBillable: false` on the unit) also carries `_billing`: `{ "excluded": true, "externalCustomerUnitId": "<the unit's key>" }`, unless it was sent with a customer API key. A meter's derived signal (one carrying `_derived`) follows the source event it takes its unit from (the window's closing event, else its opening event): it carries `_billing` when that event did and it still resolves to that same active unit. Billing records that usage without billing it. A price whose usage comes from a meter (read from your events when the invoice closes) leaves those signals out as well; a correlation-window meter leaves out a whole window when the event it takes its unit from (the closing event, else the opening one) carries `_billing`.
- `createdAt` (datetime, required) — When the signal was ingested (ISO 8601, UTC).
- `voided` (boolean, optional) — True when the signal was voided. A voided signal no longer counts as usage; it is kept. Present on every signal only when the read passes `includeVoided=true`, and only for an organization with signal voiding.

## Examples

**Request**

```json
{
  "ids": [
    "6890b0e2a6f2c30012f0a1b3",
    "6890b0e2a6f2c30012f0a1b4"
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "id": "6890b0e2a6f2c30012f0a1b3",
      "name": "email_sent",
      "customerId": "string",
      "externalCustomerId": "string",
      "productId": "string",
      "externalProductId": "string",
      "traceId": "string",
      "data": {},
      "createdAt": "2024-01-15T09:30:00Z",
      "voided": true
    }
  ],
  "notFound": []
}
```

**SDK Code**

```python
import requests

url = "https://api.agentpaid.io/api/v2/signals/lookup"

payload = { "ids": ["6890b0e2a6f2c30012f0a1b3", "6890b0e2a6f2c30012f0a1b4"] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.agentpaid.io/api/v2/signals/lookup';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"ids":["6890b0e2a6f2c30012f0a1b3","6890b0e2a6f2c30012f0a1b4"]}'
};

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.agentpaid.io/api/v2/signals/lookup"

	payload := strings.NewReader("{\n  \"ids\": [\n    \"6890b0e2a6f2c30012f0a1b3\",\n    \"6890b0e2a6f2c30012f0a1b4\"\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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.agentpaid.io/api/v2/signals/lookup")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ids\": [\n    \"6890b0e2a6f2c30012f0a1b3\",\n    \"6890b0e2a6f2c30012f0a1b4\"\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.agentpaid.io/api/v2/signals/lookup")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ids\": [\n    \"6890b0e2a6f2c30012f0a1b3\",\n    \"6890b0e2a6f2c30012f0a1b4\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.agentpaid.io/api/v2/signals/lookup', [
  'body' => '{
  "ids": [
    "6890b0e2a6f2c30012f0a1b3",
    "6890b0e2a6f2c30012f0a1b4"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.agentpaid.io/api/v2/signals/lookup");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [\n    \"6890b0e2a6f2c30012f0a1b3\",\n    \"6890b0e2a6f2c30012f0a1b4\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["ids": ["6890b0e2a6f2c30012f0a1b3", "6890b0e2a6f2c30012f0a1b4"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentpaid.io/api/v2/signals/lookup")! 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()
```