# Twilio Message Failure Cohort Audit (`natstandridge/twilio-message-failure-cohort-audit`) Actor

Batch Twilio Message records into service-day failure cohorts. Returns messagingServiceSid, creationDayUtc, failedCount, undeliveredCount, totalOutboundObserved, observedFailureSharePct, and errorCodeCounts. $0.05 per delivered cohort with at least one outbound failure.

- **URL**: https://apify.com/natstandridge/twilio-message-failure-cohort-audit.md
- **Developed by:** [Nathaniel Standridge](https://apify.com/natstandridge) (community)
- **Categories:** Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 delivered twilio failure cohorts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twilio Message Failure Cohort Audit

Batch reduced Twilio Message records to get `messagingServiceSid`, `creationDayUtc`, `failedCount`, `undeliveredCount`, `totalOutboundObserved`, `observedFailureSharePct`, and `errorCodeCounts`. Each service-day with a supplied outbound failure costs **$0.05** when delivered. Use these rows to assign incidents and track recurring failure cohorts.

[Twilio Messaging Insights](https://www.twilio.com/docs/messaging/features/messaging-insights) already offers dashboards, delivery/error filtering, and alerts. Use it when the native view meets your needs. This Actor's narrow benefit is a consistent cross-service dataset row for each affected day that can be imported into a spreadsheet or incident workflow without putting a Twilio token into the Actor.

### Prepare the input

Get authorized pages of the [Twilio Message list API](https://www.twilio.com/docs/messaging/api/message-resource), following `next_page_uri` when needed. Before pasting, project each Message to only `sid`, `messaging_service_sid`, `direction`, `date_created`, `status`, and optional `error_code` (integer or null). The exact API JSON names are snake_case. Pass reduced rows directly in the `messages` array. Existing workflows can still send serialized JSON in `messagesJson`. Use one input mode per run. Remove phone numbers, body text, sender/recipient, account SID, token, names, and other fields before pasting. The Actor accepts at most 2,000 rows and 512,000 UTF-8 bytes. Example:

```json
[
  {
    "sid": "SM00000000000000000000000000000001",
    "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "direction": "outbound-api",
    "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
    "status": "failed",
    "error_code": 30007
  }
]
```

Set `periodStart` and `periodEnd` to UTC midnights for a half-open creation window of at most 31 days. Every pasted row must have `date_created` inside it; reject or resolve source records that lack it before running this audit. Set `exportedAt` to the declared time the status snapshot was obtained, at or after the window's end. The Actor cannot verify that every API page or account message was supplied, nor that statuses are still current. Twilio's list endpoint sorts and filters on `date_sent`; this audit groups by `date_created` so unsent rows with a null `date_sent` can be included. Filter the reduced records by `date_created` yourself.

The [synthetic full input](examples/input.json) has two affected service-days, one unaffected service-day, one inbound row, and one identical pagination duplicate. See the [result rows](examples/output.json) and [free summary](examples/summary.json).

### Interpret the counts

Each paid row's `totalOutboundObserved` is the distinct supplied outbound rows for its service and UTC creation day. `failedCount` and `undeliveredCount` are kept separate. `deliveredCount` is confirmed delivered; `readCount` is a separate recipient-read status. `sentUnconfirmedCount` is upstream carrier acceptance, **not** confirmed delivery. `pendingCount` covers accepted, scheduled, queued, and sending. Canceled and deprecated partial-delivery status have separate counts. `observedFailureSharePct` uses only the supplied distinct outbound rows as its denominator; it is not an account-wide delivery rate. The top ten observed error-code counts are labels only, with remaining codes and missing codes counted separately. [Twilio warns](https://www.twilio.com/docs/messaging/api/message-resource) that error-code values can change and should not drive programmatic decisions.

Identical Message SIDs are collapsed before grouping. A SID with conflicting fields is rejected, without any paid delivery. Inbound messages are excluded and counted in the free summary. `OUTPUT` also reports source rows, unique rows, affected/unaffected cohorts, source limits, and planned/delivered counts. `maxCohorts` defaults to 25 (maximum 50); if more affected service-days qualify, the input is rejected before billing rather than silently truncated.

### Pricing and delivery

The proposed pay-per-event price is **$0.05 per delivered affected service-day row**. An empty or invalid input, a service-day without a failure, and a delivery blocked before a dataset write have no dataset-item charge. `OUTPUT` is free. If the run charge cap cannot cover every planned row, the dataset stays empty and `OUTPUT` reports `incomplete` with `charge_limit`. A frozen source-derived plan and checkpoint guard same-run restarts against duplicate dataset writes and native charges. Actual platform cost, contribution, and independent buyer demand remain unmeasured until private cloud qualification and a complete usage window.

### Local validation

```bash
uv sync --frozen --all-groups
uv run --frozen python -B tools/generate_release_fixtures.py
uv run --frozen python -B tools/local_smoke.py
uv run --frozen pytest -q
docker build -t twilio-message-failure-cohort-audit .
```

Cloud exports can be checked with `tools/validate_cloud.py <directory> <cloud-cases.json> <case-name>`. The coordinator's resurrection export is compared with a sibling `full` export from the same run ID. A successful run status alone is insufficient for billing or output qualification.

### Connect a workflow

Connect an MCP client to `https://mcp.apify.com/?actors=natstandridge/twilio-message-failure-cohort-audit`. Pass the UTC period, snapshot timestamp, and an array of reduced messages in one call.

In n8n’s HTTP Request node, select POST, attach your Apify Bearer credential, and choose a JSON body. Use this URL and body, replacing the synthetic values with your projection. The response is the dataset row array.

```text
https://api.apify.com/v2/actors/natstandridge~twilio-message-failure-cohort-audit/run-sync-get-dataset-items
```

```json
{"periodStart":"2026-11-03T00:00:00Z","periodEnd":"2026-11-04T00:00:00Z","exportedAt":"2026-11-05T00:00:00Z","messages":[{"sid":"SM00000000000000000000000000000001","messaging_service_sid":null,"direction":"outbound-api","date_created":"Tue, 03 Nov 2026 12:00:00 +0000","status":"failed","error_code":30007}]}
```

In Make, use **Apify → Run an Actor** with that JSON, wait for completion, and pass the run’s `defaultDatasetId` to **Get Dataset Items**.

# Actor input Schema

## `messages` (type: `array`):

Batch of up to 2,000 reduced Messages and 512,000 UTF-8 bytes. Each object must contain sid, messaging_service_sid, direction, date_created and status. error_code is optional. Remove bodies, phone numbers, names and credentials before upload. Choose messages or messagesJson.

## `periodStart` (type: `string`):

Inclusive UTC midnight. Cohorts use Twilio date_created, not date_sent or failure time.

## `periodEnd` (type: `string`):

Exclusive UTC midnight, after start and at most 31 days later.

## `exportedAt` (type: `string`):

User-declared export time at or after period end. Current statuses may change later; this value and source completeness cannot be verified by the Actor.

## `messagesJson` (type: `string`):

Alternative to messages for existing workflows. Supply a JSON string containing only the reduced rows. Use exactly one of messages and messagesJson.

## `maxCohorts` (type: `integer`):

Hard cap. If more service-day failure cohorts qualify, the entire input is rejected before paid delivery; narrow the period or raise this limit.

## `maxRunSeconds` (type: `integer`):

Bounds parsing, checkpointing, and paid dataset delivery.

## Actor input object example

```json
{
  "messages": [
    {
      "sid": "SM00000000000000000000000000000001",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "failed",
      "error_code": 30007
    },
    {
      "sid": "SM00000000000000000000000000000002",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "undelivered",
      "error_code": 30005
    },
    {
      "sid": "SM00000000000000000000000000000003",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000004",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "sent",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000005",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "failed",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000006",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000007",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "queued",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000008",
      "messaging_service_sid": "MGcccccccccccccccccccccccccccccccc",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "MM00000000000000000000000000000009",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "inbound",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "received",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000001",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "failed",
      "error_code": 30007
    }
  ],
  "periodStart": "2026-11-03T00:00:00Z",
  "periodEnd": "2026-11-05T00:00:00Z",
  "exportedAt": "2026-11-06T12:00:00Z",
  "maxCohorts": 25,
  "maxRunSeconds": 120
}
```

# Actor output Schema

## `cohorts` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "messages": [
        {
            "sid": "SM00000000000000000000000000000001",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "failed",
            "error_code": 30007
        },
        {
            "sid": "SM00000000000000000000000000000002",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "undelivered",
            "error_code": 30005
        },
        {
            "sid": "SM00000000000000000000000000000003",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "delivered",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000004",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "sent",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000005",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "failed",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000006",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "delivered",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000007",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "queued",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000008",
            "messaging_service_sid": "MGcccccccccccccccccccccccccccccccc",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "delivered",
            "error_code": null
        },
        {
            "sid": "MM00000000000000000000000000000009",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "inbound",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "received",
            "error_code": null
        },
        {
            "sid": "SM00000000000000000000000000000001",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "failed",
            "error_code": 30007
        }
    ],
    "periodStart": "2026-11-03T00:00:00Z",
    "periodEnd": "2026-11-05T00:00:00Z",
    "exportedAt": "2026-11-06T12:00:00Z"
};

// Run the Actor and wait for it to finish
const run = await client.actor("natstandridge/twilio-message-failure-cohort-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "messages": [
        {
            "sid": "SM00000000000000000000000000000001",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "failed",
            "error_code": 30007,
        },
        {
            "sid": "SM00000000000000000000000000000002",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "undelivered",
            "error_code": 30005,
        },
        {
            "sid": "SM00000000000000000000000000000003",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "delivered",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000004",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "sent",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000005",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "failed",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000006",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "delivered",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000007",
            "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "queued",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000008",
            "messaging_service_sid": "MGcccccccccccccccccccccccccccccccc",
            "direction": "outbound-api",
            "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
            "status": "delivered",
            "error_code": None,
        },
        {
            "sid": "MM00000000000000000000000000000009",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "inbound",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "received",
            "error_code": None,
        },
        {
            "sid": "SM00000000000000000000000000000001",
            "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "direction": "outbound-api",
            "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
            "status": "failed",
            "error_code": 30007,
        },
    ],
    "periodStart": "2026-11-03T00:00:00Z",
    "periodEnd": "2026-11-05T00:00:00Z",
    "exportedAt": "2026-11-06T12:00:00Z",
}

# Run the Actor and wait for it to finish
run = client.actor("natstandridge/twilio-message-failure-cohort-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "messages": [
    {
      "sid": "SM00000000000000000000000000000001",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "failed",
      "error_code": 30007
    },
    {
      "sid": "SM00000000000000000000000000000002",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "undelivered",
      "error_code": 30005
    },
    {
      "sid": "SM00000000000000000000000000000003",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000004",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "sent",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000005",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "failed",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000006",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000007",
      "messaging_service_sid": "MGbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "queued",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000008",
      "messaging_service_sid": "MGcccccccccccccccccccccccccccccccc",
      "direction": "outbound-api",
      "date_created": "Wed, 04 Nov 2026 09:00:00 +0000",
      "status": "delivered",
      "error_code": null
    },
    {
      "sid": "MM00000000000000000000000000000009",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "inbound",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "received",
      "error_code": null
    },
    {
      "sid": "SM00000000000000000000000000000001",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "direction": "outbound-api",
      "date_created": "Tue, 03 Nov 2026 12:00:00 +0000",
      "status": "failed",
      "error_code": 30007
    }
  ],
  "periodStart": "2026-11-03T00:00:00Z",
  "periodEnd": "2026-11-05T00:00:00Z",
  "exportedAt": "2026-11-06T12:00:00Z"
}' |
apify call natstandridge/twilio-message-failure-cohort-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,natstandridge/twilio-message-failure-cohort-audit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/c9uAHvOQBum0rVsMs/builds/L12iLgJFjkTdIaC4n/openapi.json
