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

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# Gong

> A read-only replica of Gong's API v2: calls, extensive call data with CRM context, transcripts, users and workspaces.

The Gong replica implements five read-only endpoints of Gong's API v2. Transcripts are seeded text that becomes available on a schedule; nothing is transcribed. Its key is `gong`.

## Connect

| Variable | Value |
| - | - |
| `GONG_API_URL` | Base URL. Paths start with `/v2/`. |
| `GONG_ACCESS_KEY` | Fake access key. |
| `GONG_ACCESS_KEY_SECRET` | Fake access key secret. |

Gong uses HTTP Basic authentication with the key and secret, not a Bearer token:

```js Node theme={null}
const auth = Buffer.from(process.env.GONG_ACCESS_KEY + ':' + process.env.GONG_ACCESS_KEY_SECRET).toString('base64');
const response = await fetch(process.env.GONG_API_URL + '/v2/calls?fromDateTime=2026-10-01T00:00:00Z&toDateTime=2026-10-27T00:00:00Z', { headers: { Authorization: 'Basic ' + auth } });
const calls = await response.json();
```

This is what `ancha connect gong --lang ts` prints.

## Endpoints

| Method | Path | Behavior |
| - | - | - |
| `GET` | `/v2/calls` | Calls in a date range (`fromDateTime`, `toDateTime`, both required), optionally in one `workspaceId`. Web conferences filter by scheduled time. |
| `POST` | `/v2/calls/extensive` | Calls by date, workspace, call IDs or primary user, with metadata, parties and CRM context. Speech analysis, trackers, summaries and media are coverage gaps. |
| `POST` | `/v2/calls/transcript` | Speaker-attributed transcripts with millisecond offsets, by date, workspace or call IDs. |
| `GET` | `/v2/users` | Users in the account, with cursors. |
| `GET` | `/v2/workspaces` | Workspaces the credentials may read. |

All five are partial. Responses carry `requestId`; paged responses carry `records` and a `cursor` while more pages remain. Dates need a timezone, and time ranges include the start and exclude the end. Unknown routes and fields return HTTP 501 with `x-ancha-gap: 1`.

## Behavior

* **Access.** The credentials belong to the Acme account and can read only the Revenue team workspace. Calls in other workspaces or accounts return 404 and are left out of lists.
* **Transcript timing.** A transcript can become available after its call. Before then, it is left out of mixed requests, and a request for only unavailable transcripts returns 404.
* **Limits.** Pages hold at most 100 records. Requests are limited to 3 per simulated second and 10,000 per simulated day; past that, Gong answers 429 with `Retry-After`.
* **CRM context.** Extensive call data links the Salesforce starter records: the Ridgeway Robotics account, Erin Walsh and the rollout opportunity, and the Pinecrest Health, Bluefield Logistics, Kestrel Credit Union and Lakeview Retail accounts and opportunities. It is seeded data; changing Salesforce does not change it.

## Starter data

The `gong-starter` dataset is the account **Acme**.

| Record | ID | Detail |
| - | - | - |
| Workspace | `100001` | Revenue team. Readable. |
| Workspace | `100002` | Leadership. Not readable. |
| User | `700001` | Mike Turner, Account Executive |
| User | `700003` | Tom Hughes, Account Executive |
| Call | `300001` | "Ridgeway Robotics — analytics discovery", 2026-10-22, 30 minutes, Mike and Erin Walsh. Transcript ready. |
| Call | `300002` | "Ridgeway Robotics — pilot planning", 2026-10-26, 20 minutes. Transcript available 2 simulated minutes after the world starts. |
| Call | `300004` | "Pinecrest Health — onboarding kickoff", 2026-10-26, 45 minutes, Tom and Nora Bell. |
| Call | `300005` | "Bluefield Logistics — security review", 2026-10-20, 30 minutes, Tom and Owen Hart. |
| Call | `300006` | "Kestrel Credit Union — renewal check-in", 2026-10-26, 25 minutes, Mike and Carla Diaz. |
| Call | `300007` | "Lakeview Retail — discovery", 2026-10-23, 35 minutes, Tom and Rob Fisher. |
| Call | `300003` | "Leadership capacity review", private, in the Leadership workspace. No transcript. |

A second account, Helix Manufacturing, with its own workspace (`200001`), user (`700002`) and call (`400001`), exists to test that access stays inside the right account.

## Checks

Gong is read-only and has no state checks. Use trace checks, for example `{ called: "POST /v2/calls/transcript" }`.

## Limits

* Read-only: no uploads, no call creation.
* No speech recognition, audio, analysis, trackers or summaries.
* No OAuth or credential provisioning.


## Related topics

- [Worlds](https://docs.ancha.io/concepts/worlds.md)
- [Tools](https://docs.ancha.io/tools/overview.md)
- [ancha sandbox](https://docs.ancha.io/cli/sandbox.md)
- [Test file (scene.yaml)](https://docs.ancha.io/reference/test-file.md)
- [Troubleshooting](https://docs.ancha.io/troubleshooting.md)


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