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

# Audit YouTube Channel

Run the YouTube dashboard backend audit and return the same backend result and available metrics (excluding credentials and private ownership metadata). Audits are independent of workspace. Uses existing audit caching, plan and credit rules; does not run frontend AI insights, save workspace context, or add a competitor tracker.

This MCP operation reserves and settles 5 credits against the credential workspace when a new paid audit is required. Cache, duplicate and standalone tracking-plan rules can make the final charge zero.

> [!NOTE]
>
> Examples use illustrative values. The playground sends a real request. Intelligence can consume plan credits. Publishing examples save drafts.

## Endpoint

**POST** `https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel`

**Content type:** application/json

**Authentication:** `x-api-key: YOUR_SAVED_API_KEY`

**MCP tool:** `audit_youtube_channel`. See [MCP Setup](https://creatorinsights.mintlify.site/mcp-setup.md) for AI clients.

## Operation behavior

Audits do not accept a workspace argument and do not run frontend AI insights. The backend returns available platform data using its existing cache and credit rules. The credential default workspace is used only for limit enforcement and billing when no workspace can be supplied. An audit does not create a saved competitor or overwrite brand context.

When this MCP action is billable, its single charge is reserved and settled against the workspace selected for the request. Normal dashboard calls retain their existing billing path.

## MCP call

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "audit_youtube_channel",
    "arguments": {
      "handle": "examplecreator",
      "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
    }
  }
}
```

## Request parameters

**x-workspace-id** `string`

Active workspace ID or current name in your organization. Optional header alternative to passing workspace in the body.

**handle** `string` *required*

Creator handle or profile URL, as accepted by the dashboard audit.

**workspace** `string`

Active workspace ID or current name in your organization. Required for paid requests when more than one active workspace exists; the owned workspace is resolved before billing and paid usage is charged to it.

## Request example

Send these arguments directly as the JSON body.

```json theme={null}
{
  "handle": "examplecreator",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
}
```

```bash cURL theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"handle":"examplecreator","workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME"}'
```

```javascript Node.js theme={null}
const response = await fetch('https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel', {
  method: 'POST',
  headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "handle": "examplecreator",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
})
});
const raw = await response.text();
let result;
try { result = JSON.parse(raw); } catch { throw new Error('Non-JSON response: ' + response.status); }
if (!response.ok || result.status === false) throw new Error(result.message || result.error || 'Request failed');
console.log(result.data);
```

```python Python theme={null}
import json, os, requests

arguments = json.loads("{\"handle\":\"examplecreator\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}")
response = requests.post("https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel",
    headers={"x-api-key": os.environ["CREATOR_INSIGHTS_API_KEY"]},
    json=arguments, timeout=120)
response.raise_for_status()
result = response.json()
print(result["data"])
```

## Response example

HTTP 200. Illustrative values; optional fields can be omitted, null, or empty. Additional platform fields may be returned.

```json Success theme={null}
{
  "status": true,
  "tool": "audit_youtube_channel",
  "credits_deducted": 5,
  "data": {
    "status": true,
    "message": "Data Retrieved",
    "data": {
      "channelTitle": "Example Creator",
      "channelLinkId": "examplecreator",
      "subscribers": 1000,
      "videosData": []
    }
  }
}
```

## Response fields

**status** `boolean` *required*

Whether this operation succeeded. Also check HTTP status and nested platform statuses.

**tool** `string` *required*

The invoked tool name.

**credits\_deducted** `number` *required*

Credits settled against the credential workspace for this call. Cache, duplicate, included-plan and read/edit operations can return zero.

**data** `object` *required*

Operation-specific payload. See the nested field table and response example below.

| Field | Type | Description |
| - | - | - |
| `status` | boolean | Example response field. Availability depends on the record and selected options. |
| `tool` | string | Example response field. Availability depends on the record and selected options. |
| `credits_deducted` | number | Example response field. Availability depends on the record and selected options. |
| `data` | object | Nested object. Expand the response schema for its fields. |
| `data.status` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.message` | string | Example response field. Availability depends on the record and selected options. |
| `data.data` | object | Nested object. Expand the response schema for its fields. |
| `data.data.channelTitle` | string | Example response field. Availability depends on the record and selected options. |
| `data.data.channelLinkId` | string | Example response field. Availability depends on the record and selected options. |
| `data.data.subscribers` | integer | Example response field. Availability depends on the record and selected options. |
| `data.data.videosData` | array | List of returned entries; may be empty. |

The interactive schema includes deeper nested fields. Sample fields are descriptive, not a promise that every record includes them.

## n8n and JSON tool endpoint

**POST** `https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel`. Use Header Auth with `x-api-key` and body content type JSON. This alias returns the n8n envelope below; included operations can report zero credits\_deducted.

````bash theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/audit_youtube_channel' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{\"handle\":\"examplecreator\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}'\n```\n\n\n\n```json\n{\n  \"status\": true,\n  \"tool\": \"audit_youtube_channel\",\n  \"credits_deducted\": 5,\n  \"data\": {\n    \"status\": true,\n    \"message\": \"Data Retrieved\",\n    \"data\": {\n      \"channelTitle\": \"Example Creator\",\n      \"channelLinkId\": \"examplecreator\",\n      \"subscribers\": 1000,\n      \"videosData\": []\n    }\n  }\n}\n```\n\n\n## Errors\n\nHandle non-2xx responses before mapping data. Error codes vary with the cause; these are representative examples. A 429 response may be plain text. Never treat a queued post as published or blindly retry a partial publication.\n\n\n```json\n{\n  \"status\": false,\n  \"error\": \"Unauthorized: Invalid API Key. Please verify your Creator Insights API key.\"\n}\n```\n\n\n| HTTP status | Meaning |\n| --- | --- |\n| 400 | Invalid arguments |\n| 401 | Missing or invalid API key |\n| 402 | Insufficient Creator Insights plan credits |\n| 403 | Subscription or permission required |\n| 404 | Resource not found |\n| 409 | Conflicting request, idempotency key, or unfinished upload |\n| 410 | Managed media expired; upload the file again |\n| 413 | Media too large |\n| 415 | Unsupported media type |\n| 422 | Account selection, connection, or platform payload needs attention |\n| 500 | Authentication or server error |\n| 503 | Service temporarily unavailable or operation failed; inspect saved status before retrying |\n| 429 | Rate limit; inspect response headers and retry later. |\n
````


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