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

# Account API and MCP tools

> Every operation on your AgentTV account, as a /v1 API route and as an account MCP tool.

Each operation on this page works two ways. It is a route on `https://api.agentcdn.com/v1`, and it is a tool on the account MCP at `https://mcp.agentcdn.com/account/mcp`. Same name, same inputs, same result.

## Before you call

* **Auth.** Send an API key as `Authorization: Bearer <key>`. Reads need the `account:read` scope. Changes also need `account:write`. See [API keys](https://docs.agentcdn.com/api-keys.md). On the account MCP you can sign in instead ([connect your account](https://docs.agentcdn.com/guides/connect-mcp.md#account-mcp)). An app that can only read sees only the read tools.
* **Changes run in two calls.** The first call changes nothing. It returns a preview and a `confirm_token`. Send the same request again with `confirm_token` to run it. See [changes run in two calls](https://docs.agentcdn.com/api-keys.md#changes-run-in-two-calls). A few safe, repeatable changes run in one call with no preview. The tables mark them.
* **Rate limits.** The API takes up to 120 calls a minute per account. Changes are capped at 20 a minute per account, across the API and the MCP together. Calls that reach an outside address (a website check, a range link, a Kajabi check) are capped at 10 a minute. Over a limit you get `429` with a `retry-after` header.
* **Errors** come back as `{ "error": "<code>", "message": "<what to do>" }`.
* **Full schemas.** The live OpenAPI document is at [`https://api.agentcdn.com/v1/openapi.json`](https://api.agentcdn.com/v1/openapi.json). It lists every input of every route.

In paths, `{video_id}` and the like are path parameters. A `GET` takes its other inputs as query parameters. Every other method takes them as a JSON body.

**Kind** in the tables:

| Kind | Meaning |
| - | - |
| Read | Changes nothing. Needs `account:read`. |
| Change (preview first) | Needs `account:write`. Runs in two calls: preview, then confirm. |
| Change (one call) | Needs `account:write`. Runs at once, with no preview. Safe to call again. |

> [!NOTE]
>
> No tool on this page charges you. Some use your monthly allowance: `start_import`, `manage_source` and `prepare_membership_lesson_uploads` use the import allowance, and `ask_library` counts toward the monthly answer allowance. The preview shows what a change would use, and refuses what the allowance cannot take. `get_account` shows what is left this month.

## Account and profile

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_account` | `GET /v1/account` | Read | Your account: name, libraries, how many videos are live or still processing, and this month's allowances. Call it first. |
| `get_profile` | `GET /v1/profile` | Read | Your public profile (name, public address, bio, picture) and your website setup, with the DNS record still to add. |
| `update_profile` | `PATCH /v1/profile` | Change (preview first) | Changes your public name, address, bio or picture link. The address can change only while nothing of yours is public. |

## Videos

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `list_videos` | `GET /v1/videos` | Read | Lists your videos, newest first, with status, visibility and length. Filter by title words, status or visibility. |
| `get_video` | `GET /v1/videos/{video_id}` | Read | One video in full: title, description, summary, chapters, parts (each match, talk or segment, as a run of chapters; `[]` when it has none), index status and visibility. |
| `get_transcript` | `GET /v1/videos/{video_id}/transcript` | Read | The transcript as timed lines with speakers, in pages. |
| `get_video_timeline` | `GET /v1/videos/{video_id}/timeline` | Read | Everything stored about a time range of a video: words, sentences, shots, speakers, chapters and on-screen text. Up to 10 minutes a call. |
| `get_video_youtube_analytics` | `GET /v1/videos/{video_id}/youtube-analytics` | Read | Your own YouTube Analytics for one of your videos, as YouTube reports them to you as the channel owner. Empty until you turn on YouTube Analytics in the console. |
| `update_video` | `PATCH /v1/videos/{video_id}` | Change (preview first) | Changes a video's title, description or visibility (public, unlisted or private). |
| `video_action` | `POST /v1/videos/{video_id}/actions` | Change (preview first) | Runs one action on a video: `retry` processing, `reindex`, `remove` from the library, or `restore` a removed video. |
| `get_range_link` | `POST /v1/videos/{video_id}/range-link` | Change (one call) | A short-lived signed MP4 of one range of your video, up to 10 minutes. Anyone with the link can play it until it expires. |

> [!WARNING]
>
> `get_range_link` is the only tool that returns a media link. Search and answers never do. Share a range link only with people who may see that video.

## Answers and memory

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `ask_library` | `POST /v1/ask` | Read | Answers a question from your own videos, with the exact moments that back it. Includes unlisted and private videos unless you turn that off. |
| `find_moments` | `POST /v1/moments` | Read | Finds the moments a question points to, fast, with no written answer. |
| `get_memory_page` | `GET /v1/memory` | Read | A Library Memory page: what your library, one video, one topic or one person or thing is about, with each line cited to a moment. |

## Questions and reports

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `list_questions` | `GET /v1/questions` | Read | The questions people asked about your videos, on your Ask page and in AI apps. Latest, most asked, or with no answer. |
| `get_ask_report` | `GET /v1/reports/ask` | Read | Totals for a date range: asks, answered, no answer, plays, moments reached, and the top questions, moments, videos and topics. |
| `get_agent_usage` | `GET /v1/reports/agent-usage` | Read | Which AI apps cited or played your videos in a date range, and how often. |
| `set_featured_questions` | `PUT /v1/featured-questions` | Change (preview first) | Sets the questions your library page, or one video page, offers first. Each is answered ahead of time, so it answers fast. |

Date ranges are `YYYY-MM-DD`. The default is the last 30 days.

## AI access and answers

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_agent_access` | `GET /v1/agent-access` | Read | How AI apps may use your videos for citation, playback and training, for the account and per video. |
| `set_agent_access` | `PUT /v1/agent-access` | Change (preview first) | Allows or blocks citation, playback and training, as the account default or for chosen videos. Blocked playback can keep a free preview of 30, 60 or 120 seconds. |
| `get_answer_settings` | `GET /v1/answer-settings` | Read | How every answer is shown: written or quotes only, the note shown with every answer, and the topics you do not answer. |
| `set_answer_settings` | `PATCH /v1/answer-settings` | Change (preview first) | Changes the answer mode, the answer note, the blocked topics or the reply those topics get. Send only what changes. |

## Discovery

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_discovery` | `GET /v1/discovery` | Read | Where your public videos appear: AgentTV pages and search, AgentTV apps in AI assistants, and Google and Bing. Lists each video left out, with the reason and the fix. |
| `set_discovery` | `POST /v1/discovery` | Change (preview first) | Turns one Discovery switch on or off. Apps and search engines need pages on. Turning pages off takes your watch pages offline. |

## Imports and sources

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `start_import` | `POST /v1/imports` | Change (preview first) | Imports one video from a YouTube, YouTube Shorts, TikTok or Instagram link. The preview shows what it uses of your allowance. |
| `get_import` | `GET /v1/imports/{import_id}` | Read | The progress of one import: status, video, and the processing steps done. |
| `list_sources` | `GET /v1/sources` | Read | Your connected sources (YouTube channels, TikTok and Instagram accounts), their state and what happens to new uploads. |
| `manage_source` | `POST /v1/sources` | Change (preview first) | Connects a TikTok or Instagram account, sets what happens to new uploads, checks a source for new videos now, or removes a source and keeps its videos. |

A YouTube channel connects with a Google sign-in in the browser. `list_sources` gives the address to open.

## Brand catalog

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_catalog_source` | `GET /v1/catalog-source` | Read | Your catalog source and one page of its videos, each marked new, queued, imported, changed, unavailable or removed. |
| `connect_catalog_source` | `POST /v1/catalog-source` | Change (preview first) | Connects your own verified website as your catalog source. The preview finds its video sitemap and says what it lists. |
| `import_catalog_items` | `POST /v1/catalog-source/imports` | Change (preview first) | Imports the videos you picked from your catalog source. Optional `windows` imports one time range of a picked video. See [Import one time range](https://docs.agentcdn.com/guides/import-catalog.md#import-one-time-range). |

## Website

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `manage_website` | `POST /v1/website` | Change (preview first) | Sets up or removes a branded address on your own domain, such as `agents.example.com`. The preview gives the DNS record to add. |
| `check_website` | `POST /v1/website/{site_id}/check` | Change (one call) | Checks your branded address for the DNS record and certificate, and turns it on once both are ready. |

DNS and certificates can take minutes to hours. Run `check_website` again later if it says not yet. Get `site_id` from `get_profile`.

## Links

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `list_links` | `GET /v1/links` | Read | The booking, service and signup links AI answers can offer, for the account or one video. |
| `manage_links` | `POST /v1/links` | Change (preview first) | Adds, changes, reorders or deletes those links. |

## Members and member libraries

Member libraries need setup on your account. [Ask us to set them up](https://agenttv.com/support). See [Paid and member libraries](https://docs.agentcdn.com/guides/member-libraries.md).

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `list_members` | `GET /v1/members` | Read | Your members and their library access, with expiry and whether access was withdrawn. |
| `manage_member` | `POST /v1/members` | Change (preview first) | Adds a member by email, gives a member a library (with an optional end date), withdraws one grant, or disables a member. |
| `manage_member_library` | `POST /v1/member-libraries/{library_id}` | Change (preview first) | Changes a members library's settings: let AI apps cite it free, or make a public library members only. |
| `manage_member_collection` | `POST /v1/members/collections` | Change (preview first) | Makes, empties or deletes a members-only collection of videos. The preview shows what moves and who loses access. |

## Kajabi membership

These tools connect your Kajabi site so the people who buy your offers become members. In every path, `{platform}` is `kajabi`.

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_membership_connection` | `GET /v1/membership/{platform}` | Read | Your Kajabi connection: state, site, last check, last member sync, and how many withdrawals wait for review. Never returns a secret. |
| `list_membership_products` | `GET /v1/membership/{platform}/products` | Read | Your Kajabi offers and the members collection each one feeds. |
| `list_membership_held` | `GET /v1/membership/{platform}/held` | Read | Members whose access the sync held for review instead of withdrawing. |
| `connect_membership_platform` | `POST /v1/membership/{platform}` | Change (preview first) | Connects your Kajabi site with a key you make in Kajabi. The preview checks the key. The secret is stored encrypted and never returned. |
| `check_membership_connection` | `POST /v1/membership/{platform}/check` | Change (one call) | Tests the stored key with Kajabi now and records the result. |
| `map_membership_product` | `POST /v1/membership/{platform}/products/map` | Change (preview first) | Chooses where the buyers of one offer go: an existing members collection, a new one named after the offer, or nowhere. |
| `sync_membership_members` | `POST /v1/membership/{platform}/sync` | Change (preview first) | Syncs your buyers into your members now. Access you gave by hand is never withdrawn. |
| `keep_membership_held` | `POST /v1/membership/{platform}/held/keep` | Change (preview first) | Keeps the access the sync held for review. |
| `register_membership_webhooks` | `POST /v1/membership/{platform}/webhooks` | Change (one call) | Registers the Kajabi purchase webhook again, so a new buyer becomes a member within seconds. |
| `disconnect_membership_platform` | `POST /v1/membership/{platform}/disconnect` | Change (preview first) | Disconnects Kajabi and deletes the stored secret. Delete the key in Kajabi too if it should stop working. |
| `list_membership_lessons` | `GET /v1/membership/{platform}/lessons` | Read | The lessons of the courses whose offers feed a members collection, in order, with each lesson's video state and the most files one upload takes. |
| `prepare_membership_lesson_uploads` | `POST /v1/membership/{platform}/lessons/uploads` | Change (preview first) | Matches your lesson video files to lessons. The preview shows each match and what the upload uses of your allowance. The confirmed call makes members-only videos and returns an `upload_url` for each file. |
| `complete_membership_lesson_uploads` | `POST /v1/membership/{platform}/lessons/uploads/complete` | Change (one call) | After each file's `PUT` to its `upload_url` finishes, send its `upload_session_id`. Starts processing. A file that has not arrived is refused and uses nothing. |

Members also sync every hour on their own.

Kajabi does not share lesson videos, so you upload each one once: `list_membership_lessons`, then `prepare_membership_lesson_uploads`, then `PUT` each file, then `complete_membership_lesson_uploads`.

## Keys, connected apps and webhooks

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `list_ask_keys` | `GET /v1/ask-keys` | Read | Your public Ask keys: name, prefix, scopes, allowed origins, rate limit, state and last use. Never the secret. |
| `manage_ask_key` | `POST /v1/ask-keys` | Change (preview first) | Creates, rotates or revokes a public Ask key. A new key's secret is shown once, in the confirmed result. |
| `list_connected_apps` | `GET /v1/connected-apps` | Read | The AI apps signed in to your account through the account MCP, what each may do, and when it was last seen. |
| `revoke_connected_app` | `POST /v1/connected-apps/revoke` | Change (preview first) | Disconnects one AI app at once. It must sign in again to come back. |
| `list_webhooks` | `GET /v1/webhooks` | Read | Your webhooks: URL, events, and whether failed deliveries turned one off. |
| `create_webhook` | `POST /v1/webhooks` | Change (preview first) | Sends your video events (`video.live`, `video.failed`, `video.updated`, `video.removed`) to an https URL. The signing secret is shown once. |
| `delete_webhook` | `DELETE /v1/webhooks/{webhook_id}` | Change (preview first) | Deletes a webhook. Events stop going to its URL. |

## AI Video Visibility

AI Video Visibility shows how often AI apps such as ChatGPT and Perplexity name or cite your brand and videos. These tools are free.

| Tool | Method and path | Kind | What it does |
| - | - | - | - |
| `get_visibility` | `GET /v1/visibility` | Read | Each of your brands with its website readiness, latest report, history, tracked questions and the fixes per question. |
| `get_visibility_snapshot` | `GET /v1/visibility/brands/{brand_id}/snapshots/{snapshot_id}` | Read | One report in full, per question and per AI app. |
| `get_visibility_answers` | `GET /v1/visibility/brands/{brand_id}/snapshots/{snapshot_id}/questions/{question_id}/answers` | Read | What each AI app answered to one question, with the links it cited. |
| `add_visibility_brand` | `POST /v1/visibility/brands` | Change (preview first) | Adds a website or YouTube channel as a brand and starts its first report. |
| `refresh_visibility` | `POST /v1/visibility/brands/{brand_id}/refresh` | Change (preview first) | Starts a new report for a brand. Once a day per brand. |
| `set_tracked_questions` | `POST /v1/visibility/brands/{brand_id}/questions` | Change (preview first) | Sets the 1 to 10 questions tracked for a brand. An empty list goes back to questions picked for you. |
| `check_visibility_website` | `POST /v1/visibility/brands/{brand_id}/website-check` | Change (preview first) | Checks a brand's website readiness again, without asking any AI app. Use it after a website fix. |


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