> ## Documentation Index
> Fetch the complete documentation index at: https://help.gong.io/llms.txt
> Use this file to discover all available pages before exploring further.
# List company library folders
> Returns the folders in a workspace's company library, so that you can find the ID of the folder whose calls you want. The response doesn't include folders in users' own libraries, archived folders or streams.
Each folder is listed before the folders inside it. To rebuild the folder tree, match each folder's `parentFolderId` to the `id` of the folder it's in.
If the workspace has no company library folders, or no workspace in the company has the ID you send, the response holds an empty `folders` list.
Required authorization scope: 'api:library:read'.
## OpenAPI
````json GET /v2/library/folders
{
"openapi": "3.0.1",
"info": {
"title": "Gong API",
"description": "
Overview
\nThe Gong API lets your systems get data from Gong and send data to it. Gong records and analyzes a company's customer conversations, such as calls, emails and meetings, and connects them to the company's CRM data. Through the API you can, for example:
\n\n- Get calls, with their participants, transcripts and Gong's analysis, for your own systems or data warehouse.
\n- Get what Gong AI generates, such as answers about an account or a deal, briefs and call summaries.
\n- Get the company's users, their activity statistics and the company's Gong settings.
\n- Add calls recorded by other systems, CRM data and other customer interactions to Gong.
\n- Find and delete the data Gong holds about a person, to answer data privacy requests.
\n
\nTo use the API, a tech admin in your company must create an API key, or approve your OAuth integration.
\nThe endpoints are grouped into sections, such as Calls, Users and CRM. Each section starts with an introduction that says what the section is for and which endpoint to use for each task.
\n\nGong AI
\nGong AI analyzes the company's calls and emails. Some endpoints return what Gong AI generates:
\n\n- To ask a question about an account, deal, contact or lead, and get an answer based on its calls and emails:
GET /v2/entities/ask-entity. \n- To generate a brief about an account, deal, contact or lead:
GET /v2/entities/get-brief. \n- To get Gong AI's summary of a call, such as its brief, outline, key points and highlights:
POST /v2/calls/extensive. \n- To get the outcome Gong AI set for a call:
POST /v2/calls/extensive. \n- To get the definitions of the company's AI trackers, which Gong AI uses to find topics in calls:
GET /v2/settings/trackers. POST /v2/calls/extensive reports what AI trackers found in each call. \n- To get the answers Gong AI gave on scorecards:
POST /v2/stats/activity/scorecards, with the review method set to AUTOMATIC or BOTH. By default, the response lists only scorecards that people filled in. \n
\nThe two Entities endpoints use Gong credits. If there aren't enough credits left, the response is 402. Learn more about how the APIs use Gong credits.
\n\nGong concepts
\n\n- Company: your organization's Gong account. API keys, OAuth integrations and the rate limit belong to the company. The API returns only the company's data.
\n- Workspace: a part of the company's Gong account, usually for one team or business unit. Each workspace has its own settings, such as trackers and scorecards. Some endpoints need a workspace ID. To look up workspace IDs, use
GET /v2/workspaces. \n- User: a person with a Gong account in the company. The API identifies users by their Gong user ID. To look up user IDs, use
GET /v2/users. The participants in a call can be users, or people outside Gong, such as customers. \n- Call: a recorded conversation, such as a video meeting or a phone call. Gong transcribes and analyzes each call. A meeting is an event in a calendar, before anything is recorded.
\n- CRM entity: an account, deal, contact or lead that Gong imports from the company's CRM, such as Salesforce.
\n- Tech admin: a Gong user who manages the company's Gong setup, including its API keys and integrations.
\n
\n\nGet started
\nTo check that your setup works, send one request that lists the company's users.
\n\n- Ask a tech admin to create an API key on the API page in Gong: Admin center > Settings > Ecosystem > API. Get the access key, the access key secret and the company's base URL.
\n- Send this request, with your own values:\n
curl -u \"ACCESS_KEY:ACCESS_KEY_SECRET\" https://us-12345.api.gong.io/v2/users
\nThe -u option sends the key in the Basic Authorization header. \n- Check the response. It lists up to 100 users in
users. records holds the total number of users and, if there are more, the cursor for the next page. \n
\nIf the response is 401, check that you sent the access key and the access key secret, in that order, with a colon between them.
\n\nBase URL
\nEach company sends its API requests to its own base URL, such as https://us-12345.api.gong.io. Add the endpoint's path to it: https://us-12345.api.gong.io/v2/calls.
\n\n- API keys: a tech admin finds the base URL on the API page in Gong: Admin center > Settings > Ecosystem > API.
\n- OAuth: the token response holds the company's base URL in
api_base_url_for_customer. The base URL is different for each company, so store it with the company's tokens. \n
\n\nAuthentication
\nThe API accepts two kinds of credentials.
\n\n- API key: for your own company's integrations. A tech admin creates the key in Gong, on the API page, and gets an access key and an access key secret. Join them with a colon, encode the result in Base64, and send it in the Basic Authorization header (RFC 7617):
Authorization: Basic <Base64(accessKey:accessKeySecret)>. Learn more about API keys. \n- OAuth: for apps that other Gong companies connect to. You create an OAuth integration in Gong, and a tech admin at each company that uses it approves the integration's scopes. Send the access token in the Bearer Authorization header (RFC 6750):
Authorization: Bearer <token>. Learn more about OAuth apps. \n
\n\nScopes
\nA scope is a permission that lets an OAuth integration use a set of endpoints, for example api:calls:read:basic to read calls or api:calls:create to add them. Each endpoint's description ends with the scope it requires. API keys aren't limited by scopes.
\nYou choose an integration's scopes when you set it up in Gong: Admin center > Settings > Ecosystem > API, Integrations tab. If the integration calls an endpoint it doesn't have the scope for, the response is 401, and the error message names the scope.
\nOne exception: if an integration calls POST /v2/calls/extensive without api:calls:read:media-url, the request succeeds, but the response leaves out the media URLs.
\n\nRate limits
\nEach company has one rate limit, which all of its API keys and OAuth integrations share. By default, the company can send up to 3 requests per second, and up to 10,000 requests in 24 hours. The 24 hours start with the company's first request, not at midnight.
\nGong doesn't slow down requests over the rate limit. It rejects them, and the response is 429. Wait the number of seconds in the Retry-After header, then send the request again. If the response is 429 again, wait longer before each new try, for example twice as long each time.
\nTo find out which API keys and integrations use the most requests, a tech admin can create a usage report in Gong. Learn more about API usage reports. To raise the company's rate limit, contact Gong Support.
\n\nErrors
\nWhen a request fails, the response has an HTTP status code and a JSON body with two fields: requestId, and errors, a list of error messages. Each endpoint lists the status codes it returns, with the reasons. These are the codes that most endpoints return:
\n\n- 400: the request isn't valid. For example, a required field is missing, or a value has the wrong type or format. The error message names the field or parameter. Fix the request before you send it again.
\n- 401: the API key or access token is missing or isn't valid, or the OAuth token doesn't have the scope the endpoint requires. The error message names the scope.
\n- 404: Gong can't find what the request asks for, such as a call ID that doesn't exist.
\n- 429: the company sent more requests than its rate limit allows. See Rate limits.
\n- 500: Gong couldn't complete the request because of an unexpected error. Try again. If the error continues, contact Gong Support.
\n
\n\nPaging
\nEndpoints that return lists return the results in pages. Each endpoint's description gives its page size. If there are more results, the response includes records.cursor. To get the next page, send the same request again, with that value in cursor. Keep every other value in the request the same.
\n\nRequests and responses
\n\n- Dates and times: send them in ISO-8601 format, in UTC (
Z) or with a time zone offset such as -07:00. In a query string, write the plus sign of an offset as %2B. \n- Gong IDs: Gong IDs are numbers of up to 20 digits. Some programming languages can't hold numbers that large exactly. Store Gong IDs as strings.
\n- New fields: Gong can add fields to responses at any time, without notice. Write your code so that it ignores fields it doesn't use.
\n
\n\nDownload the API definition
\nThe API definition is an OpenAPI file that describes every endpoint. You can download it to use in an API client, such as Postman or Insomnia.
\nTo download the API definition:
\n\n- On the API documentation site, hover over Gong API and click the More icon.
\n- Click Download API reference. The file is saved to your downloads folder.
\n
\n\nGet help
\nFor help with the API, contact Gong Support. Every response holds a requestId. Give Support the requestId of the request, the endpoint and the time you sent it.
",
"version": "V2"
},
"servers": [
{
"url": "https://127.0.0.1:8443",
"description": "Generated server url"
}
],
"tags": [
{
"name": "Calls",
"x-section-intro": "The Calls endpoints return your company's recorded calls and their data: details such as the title and time, participants, content, transcripts and media. They also let you add calls recorded in other systems.\n\n**Where to go in Gong:** Conversations > Search. Learn more about [call search in Gong](https://help.gong.io/docs/about-call-search-in-gong).\n\nUse them to:\n\n- Copy calls into your own systems, such as a data warehouse or CRM.\n- Analyze what was said: transcripts, topics, trackers and interaction statistics.\n- Add calls recorded by a telephony system or dialer, with their recordings, so Gong analyzes them.\n\nWhich endpoint to use:\n\n- To list the calls in a date range, with each call's title, start time, duration and call owner: `GET /v2/calls`\n- To get the same details for one call: `GET /v2/calls/{id}`\n- To get participants, CRM objects, content, interaction statistics, comments or media URLs: `POST /v2/calls/extensive`\n- To get transcripts: `POST /v2/calls/transcript`\n- To add a call: `POST /v2/calls`\n- To add a call's recording: send `downloadMediaUrl` in `POST /v2/calls`, or upload the file afterwards with `PUT /v2/calls/{id}/media`\n\nGood to know:\n\n- **Which calls are returned:** calls with a recording, whether Gong recorded or imported them or they were added through the API. Meetings that weren't recorded aren't returned.\n- **Speaker names:** transcripts identify each speaker by `speakerId`, not by name. To get names, get the call's participants from `POST /v2/calls/extensive` and match `speakerId`.\n- **Call IDs:** requesting one call at a time uses up your company's daily rate limit quickly. Define filters to return all the calls you need, or send several call IDs in each request.\n- **Paging:** each response contains up to 100 calls. If there are more, the response includes `records.cursor`. To get the next 100, send it as `cursor` in your next request.\n\nCall owner and host:\n\nEach call has one owner, a Gong user from your company. In the API, the call owner is the primary user:\n\n- `primaryUserId` in the response is the call owner.\n- Use `filter.primaryUserIds` in `POST /v2/calls/extensive` to get the calls a user owns.\n- Use `primaryUser` in `POST /v2/calls` to set the owner of a call you add. Send the Gong user ID of the user who ran the call.\n- Interaction statistics, such as talk ratio and patience, are the call owner's.\n\nThe owner isn't always the meeting's host. Gong makes the host the owner when the host is a Gong user whose calls Gong records. If someone changes the owner manually in Gong, Gong keeps that change. If the host is from outside the company, the owner is a different Gong user.\n\nGong imports a telephony call only when a participant is a Gong user whose telephony system calls are set to import. That user is the owner. Other telephony calls aren't in Gong, so the API doesn't return them.\n\nRequired authorization scopes for the Calls endpoints:\n\n- 'api:calls:read:basic': `GET /v2/calls` and `GET /v2/calls/{id}`\n- 'api:calls:read:extensive': `POST /v2/calls/extensive`\n- 'api:calls:read:media-url': media URLs in `POST /v2/calls/extensive`\n- 'api:calls:read:transcript': `POST /v2/calls/transcript`\n- 'api:calls:create': `POST /v2/calls` and `PUT /v2/calls/{id}/media`"
},
{
"name": "Users",
"x-section-intro": "The Users endpoints return your company's Gong users: who they are, what Gong records and imports for them, and how their settings have changed.\n\n**Where to go in Gong:** Admin center > Settings > People > Team members. Learn more about [managing team members](https://help.gong.io/docs/add-or-edit-a-team-member).\n\nUse them to:\n\n- Match people in your own systems to Gong users by email address, to get the Gong user ID that other endpoints use.\n- Check what Gong records and imports for a user (`settings`).\n- Audit changes to a user's recording, email import and active status (settings history).\n- Get a user's recording consent page and web conferencing providers, for scheduling tools.\n\nWhich endpoint to use:\n\n- To list all users: `GET /v2/users`\n- To get users by Gong user ID, or users created in a time range: `POST /v2/users/extensive`\n- To get one user: `GET /v2/users/{id}`\n- To get the changes to one user's settings: `GET /v2/users/{id}/settings-history`\n\nGood to know:\n\n- **Inactive users:** results include inactive users. To tell them apart, check `active`.\n- **Avatars:** avatars are users that represent Gong employees, such as support staff, when they log in to your company's Gong account. Results don't include them by default. To include them, set `includeAvatars` to true. The response doesn't mark which users are avatars.\n- **Email addresses:** a user can have more than one. To find a user by email address, list the users with `GET /v2/users` and look for the address in each user's `emailAddress` and `emailAliases`.\n- **User IDs:** requesting one user at a time with `GET /v2/users/{id}` uses up your company's daily rate limit quickly. To get several users, send their IDs in `filter.userIds` of `POST /v2/users/extensive`.\n- **Paging:** each response contains up to 100 users. If there are more, the response includes `records.cursor`. To get the next 100, send it as `cursor` in your next request.\n\nRequired authorization scope for all Users endpoints: 'api:users:read'."
},
{
"name": "Stats",
"x-section-intro": "The Stats endpoints return statistics about your company's Gong users: what they do with calls in Gong, how they interact on their calls, and the scorecards filled in on their calls.\n\n**Where to go in Gong:** Insights > Team. Learn more about [team stats](https://help.gong.io/docs/analyze-team-performance) and [scorecards](https://help.gong.io/docs/about-scorecards).\n\n**Use them to:**\n\n- Build coaching and adoption reports in your own BI tool or data warehouse.\n- Track how many calls each user hosts, listens to, shares and gives feedback on.\n- Compare users' talk ratio, patience and question rate on their calls.\n- Export scorecard answers, to analyze call quality outside Gong.\n\n**Which endpoint to use:**\n\n- To get each user's activity totals for a date range: `POST /v2/stats/activity/aggregate`\n- To get each user's activity totals for each day, week, month, quarter or year: `POST /v2/stats/activity/aggregate-by-period`\n- To get the IDs of the calls behind each user's activity, day by day: `POST /v2/stats/activity/day-by-day`\n- To get each user's interaction statistics, such as talk ratio: `POST /v2/stats/interaction`\n- To get the answers to scorecards filled in on calls: `POST /v2/stats/activity/scorecards`\n\n**Good to know:**\n\n- **Dates:** the endpoints take dates without a time (YYYY-MM-DD), in the time zone set for the company in Gong. A day runs from midnight to midnight in that time zone. Convert your dates to the company's time zone before you send them.\n- **Complete days:** the activity and interaction endpoints return complete days. Gong prepares a day's statistics at 00:30 the next day, in the company's time zone. Request yesterday's statistics from 00:30 onward.\n- **Large companies:** if you don't specify which users to return, the activity endpoints return every user who had activity in the date range. In a large company, this can make the request time out. To avoid timeouts, request 100 to 200 users at a time, by sending their user IDs in `filter.userIds`.\n- **Other ways to get this data:** Gong Data Cloud has tables of user activity, interaction statistics and scorecard answers, which you can query from your own data warehouse. For large or regular exports, Data Cloud doesn't use up your rate limit or time out as API requests can. To export the statistics once as a CSV file, without code, use Insights > Team > Export in Gong. Learn more about [Gong Data Cloud tables](https://help.gong.io/docs/database-design) and [exporting team stats](https://help.gong.io/docs/export-team-stats).\n- **User IDs:** the responses identify users by Gong user ID and email address. To get users' names and other details, use the Users endpoints.\n- **Paging:** each response contains up to 100 users, or 100 answered scorecards. If there are more, the response includes `records.cursor`. To get the next page, send it as `cursor` in your next request.\n\n**Required authorization scopes for the Stats endpoints:**\n\n- 'api:stats:user-actions': `POST /v2/stats/activity/aggregate` and `POST /v2/stats/activity/aggregate-by-period`\n- 'api:stats:user-actions:detailed': `POST /v2/stats/activity/day-by-day`\n- 'api:stats:interaction': `POST /v2/stats/interaction`\n- 'api:stats:scorecards': `POST /v2/stats/activity/scorecards`"
},
{
"name": "Entities",
"x-section-intro": "The Entities endpoints use Gong AI to answer questions about a CRM entity, and to generate briefs about it. A CRM entity is an account, deal, contact or lead that Gong imports from your CRM. Gong AI bases each answer and brief on the calls and emails that are associated with the entity in Gong.\n\nLearn more about [AI Ask Anything](https://help.gong.io/docs/understanding-ai-ask-anything) and [briefs](https://help.gong.io/docs/understanding-ai-briefer).\n\n**Use them to:**\n\n- Show answers about an account or deal in your own app or CRM, such as the customer's main concerns or the next steps agreed on.\n- Add a brief to a CRM record, a handoff document or an email, for example before a meeting or when a deal moves to a new stage.\n- Link each point of an answer or a brief to the calls and emails it's based on.\n\n**Which endpoint to use:**\n\n- To ask a question about an account, deal, contact or lead: `GET /v2/entities/ask-entity`\n- To generate a brief about an account, deal, contact or lead: `GET /v2/entities/get-brief`\n- To get the names of the brief types you can generate briefs from: `GET /v2/settings/briefs`\n\n**Good to know:**\n\n- **CRM IDs:** you identify the account, deal, contact or lead by its object type and its ID in your CRM. Gong must have imported the object from the CRM that's connected to Gong. The endpoints work with the CRMs Gong integrates with natively (Salesforce, HubSpot and Microsoft Dynamics 365), and with any other CRM whose data you upload through the CRM endpoints.\n- **Gong credits:** each request uses Gong credits, according to the number of calls and emails Gong AI analyzes. If there aren't enough credits left, the endpoints return 402. Learn more about [how the APIs use Gong credits](https://help.gong.io/docs/how-mcp-server-tools-and-apis-consume-credits) and [how to reduce credit usage](https://help.gong.io/docs/guide-optimize-credit-consumption-for-mcp-server-tools-and-apis).\n- **AI-generated text:** Gong AI writes the answers and briefs, so the same request can return different text each time.\n\n**Required authorization scopes for the Entities endpoints:**\n\n- 'api:ai-ask:read': `GET /v2/entities/ask-entity`\n- 'api:ai-briefer:read': `GET /v2/entities/get-brief`"
},
{
"name": "Settings",
"x-section-intro": "The Settings endpoints return how the company has set up Gong: its workspaces, trackers, scorecards and brief types.\n\n**Where to go in Gong:** Trackers and brief types: Admin center > Agent Studio. Scorecards: Assets > Scorecards. Learn more about [trackers](https://help.gong.io/docs/about-trackers), [scorecards](https://help.gong.io/docs/about-scorecards), [brief types](https://help.gong.io/docs/understanding-ai-briefer) and [workspaces](https://help.gong.io/docs/about-workspaces).\n\n**Use them to:**\n\n- Look up workspace IDs for the `workspaceId` parameter of other endpoints, such as `GET /v2/calls`.\n- Get the definitions of the trackers that `POST /v2/calls/extensive` reports in calls.\n- Get the questions and answer options of the scorecards that `POST /v2/stats/activity/scorecards` returns answers for.\n- Look up brief type names for `briefName` on `GET /v2/entities/get-brief`.\n\n**Which endpoint to use:**\n\n- To get the company's workspaces: `GET /v2/workspaces`\n- To get keyword tracker and AI tracker definitions: `GET /v2/settings/trackers`\n- To get scorecards with their questions: `GET /v2/settings/scorecards`\n- To get brief types: `GET /v2/settings/briefs`\n\n**Required authorization scopes for the Settings endpoints:**\n\n- 'api:workspaces:read': `GET /v2/workspaces`\n- 'api:settings:trackers:read': `GET /v2/settings/trackers`\n- 'api:settings:scorecards:read': `GET /v2/settings/scorecards`\n- 'api:ai-briefer:read': `GET /v2/settings/briefs`"
},
{
"name": "Data Privacy",
"x-section-intro": "Two Data Privacy endpoints list the data that Gong holds about a person outside the company, found by the person's email address or phone number. The other two Data Privacy endpoints delete that data. The data includes calls, email messages, calendar meetings, and CRM contacts and leads.\n\n**Where to go in Gong:** Admin center > Settings > Data protection & privacy. Learn more about [deleting personal data](https://help.gong.io/docs/delete-personal-data).\n\n**Use them to:**\n\n- Answer a person's request to see the data that Gong holds about them.\n- Delete a person's data from Gong when they ask you to erase it, for example from your privacy request system.\n- Check that Gong finished deleting the data.\n\n**Which endpoint to use:**\n\n- To list the data for an email address: `GET /v2/data-privacy/data-for-email-address`\n- To list the data for a phone number: `GET /v2/data-privacy/data-for-phone-number`\n- To delete the data for an email address: `POST /v2/data-privacy/erase-data-for-email-address`\n- To delete the data for a phone number: `POST /v2/data-privacy/erase-data-for-phone-number`\n\n**Good to know:**\n\n- **People outside the company:** the endpoints are for people who aren't Gong users. To delete a Gong user's data, contact Gong Support.\n- **Deletion is permanent:** Gong deletes each matching call for everyone who took part in it. Deleted data can't be restored. Before you delete, list the data with the matching `GET` endpoint and check it.\n- **Other systems:** Gong imports data again from your CRM and email system. Delete the person's data in those systems first.\n- **Large deletions:** when an email address or phone number matches more than 1,500 email messages, 600 calls, 150 completed calls, 25 contacts, 50 leads or 3,500 calendar meetings, Gong deletes nothing and returns 400. To delete the data, contact Gong Support.\n\n**Required authorization scopes for the Data Privacy endpoints:**\n\n- 'api:data-privacy:read': `GET /v2/data-privacy/data-for-email-address` and `GET /v2/data-privacy/data-for-phone-number`\n- 'api:data-privacy:delete': `POST /v2/data-privacy/erase-data-for-email-address` and `POST /v2/data-privacy/erase-data-for-phone-number`"
},
{
"name": "Library",
"x-section-intro": "The Library endpoints return the folders of a workspace's company library and the calls saved in each folder. In Gong, users save calls to library folders, for example to collect training or onboarding calls. Folders in the company library are visible to every user with library access. Folders in a user's own library are private unless the user shares them.\n\n**Where to go in Gong:** Conversations > Company library. Learn more about [the call library](https://help.gong.io/docs/about-the-call-library).\n\n**Use them to:**\n\n- Show the calls your team saved in the company library in your own app, such as a training or onboarding portal.\n- Get the IDs of the calls in a folder, then get the calls' participants, content or transcripts with the Calls endpoints.\n\n**Which endpoint to use:**\n\n- To list the folders in a workspace's company library: `GET /v2/library/folders`\n- To list the calls in a folder: `GET /v2/library/folder-content`\n\n**Good to know:**\n\n- **Private and archived folders:** the API doesn't list folders in users' own libraries or archived folders. A folder must be in the company library, and not archived, for the API to list it.\n- **Streams:** a stream is a collection that Gong fills automatically with the calls that match a set of filters, such as participants, accounts or keywords. The Library endpoints don't return streams or the calls in them. To get calls that match a stream's filters, use `POST /v2/calls/extensive` with similar filters, then filter the response yourself.\n- **One response:** the Library endpoints aren't paged. Each response lists every folder in the workspace, or every call in the folder.\n\nRequired authorization scope for all Library endpoints: 'api:library:read'."
},
{
"name": "CRM",
"x-section-intro": "The CRM endpoints let you send data from a CRM that Gong doesn't integrate with natively, so Gong can give you its full capabilities based on your CRM data. Gong has native integrations with Salesforce, HubSpot and Microsoft Dynamics 365.\n\nIf you use the deprecated CRM endpoints, download the [PDF file](/r/img/permanent/crm_api_deprecated_endpoints.pdf).\n\n**Where to go in Gong:** Admin center > Settings > CRM. Learn more about [managing your CRM API integration](https://help.gong.io/docs/manage-your-crm-api-integration).\n\nOnce you upload your CRM data, your Gong users can see their deals on the Deals page, follow deal progress on deal boards, get warnings for deals at risk, and see whether their team will reach its quota. Calls show account and contact data, such as the name and job title of the contact in the call. The Accounts page shows account data, with the history of all communication with the company.\n\nUse them to:\n\n- Review your pipeline and forecast.\n- Narrow down calls and emails by customer data, for coaching and analytics.\n- Track initiatives and adoption by account and opportunity.\n- Associate calls and emails with your accounts, contacts, leads and deals.\n- Add your own CRM fields to the objects Gong shows.\n\nWhich endpoint to use:\n\n- To register the integration and get its `integrationId`: `PUT /v2/crm/integrations`\n- To get the integration's ID, name and owner's email address: `GET /v2/crm/integrations`\n- To add, change or delete custom fields: `POST /v2/crm/entity-schema`\n- To list the fields of an object type: `GET /v2/crm/entity-schema`\n- To upload accounts, contacts, deals, leads, business users or stages: `POST /v2/crm/entities`\n- To check whether an upload or a deletion has finished: `GET /v2/crm/request-status`\n- To check how Gong stored some objects, while you build the integration: `GET /v2/crm/entities`\n- To delete the integration and the CRM objects uploaded through it: `DELETE /v2/crm/integrations`\n\nGood to know:\n\n- **API integrations only:** the endpoints work with a CRM integration registered with `PUT /v2/crm/integrations`. If the company uses a native integration, there's no integration to return, and you can't register one.\n- **One integration:** a company can have one CRM integration at a time. To connect a different CRM, disconnect the current one first: a native integration in Gong, an API integration with `DELETE /v2/crm/integrations`.\n- **Integration ID:** every endpoint except `GET` and `PUT /v2/crm/integrations` takes `integrationId`. It's a 64-bit number. Read and store it as a 64-bit integer (long or BigInt) or as a string. Tools that read it as a regular number, such as JavaScript, round it, and a rounded ID fails with 400 \"This integration id is inactive\".\n- **Asynchronous requests:** `POST /v2/crm/entities` and `DELETE /v2/crm/integrations` return before Gong processes them. Send a new `clientRequestId` with each request, then call `GET /v2/crm/request-status` with it. Continue polling until `status` is `DONE` or `FAILED`.\n\nAPI protocol:\n\nThe API follows REST guidelines. Your base URL for all API calls is on the [API page in Gong](https://app.gong.io/company/api-authentication?currentTab=MY_API_TAB).\n\nThe payload is a JSON object or, for requests that upload lists of objects, newline-delimited JSON ([JSON streaming](https://en.wikipedia.org/wiki/JSON_streaming#Newline-Delimited_JSON)). Encode JSON in UTF-8.\n\nDates and timestamps in JSON use ISO-8601 format without milliseconds, such as `2018-02-18T02:30:00-07:00` or `2018-02-18T08:00:00Z` (Z stands for UTC).\n\nWhat data you can upload:\n\nTo see your CRM data in Gong, upload these objects:\n\n- **Business user:** a CRM user, such as a seller or manager.\n- **Account:** a customer, as stored in the CRM.\n- **Contact:** a person in the CRM who belongs to a customer.\n- **Deal:** a deal, opportunity or contract of an account.\n- **Lead:** a potential customer who isn't linked to an account.\n- **Stage:** a stage a deal can be in, in your CRM.\n\nHow to upload CRM data:\n\nThis diagram shows how to set up your system to upload CRM data to Gong. It applies to every upload: the first upload, incremental uploads and history.\n\n\n\n1. **Register the integration:** register it once with `PUT /v2/crm/integrations`, to get the `integrationId` that identifies the company's integration with Gong. You don't need to register again unless you delete the integration. Send the `integrationId` each time you upload CRM data.\n2. **Add fields:** each object type has a set of standard fields. To upload more fields, add them to the schema with `POST /v2/crm/entity-schema`. Once the schema is in Gong, upload your objects with the extra fields.\n3. **First upload:** create a database dump of the data to upload, based on your CRM schema and data. The first time, upload every object that should appear in Gong.\n4. **Incremental uploads:** send regular updates. You can send them as often as you like; every 1 to 5 minutes is recommended.\n - Send only objects that are new or changed since the last upload. Gong adds new objects, and updates or deletes existing ones.\n - Gong identifies each object by its `objectId`. Keep the same `objectId` each time you update the object.\n - `modifiedDate` is required when you update an object, so Gong keeps accurate history. If your CRM doesn't store the modification date, send the date of the request.\n - Gong updates an object only when its `modifiedDate` is later than the one Gong has.\n5. **History:** Gong uses history to show what objects looked like at a point in time, such as a deal's stage at the time of a call. If your CRM stores history, upload it as part of the integration. You can do it at any time; after the first upload is recommended:\n 1. Generate the JSON files, with `modifiedDate` set to the date each object was updated.\n 2. Upload them with `POST /v2/crm/entities`, with `objectType` set to `ACCOUNT`, `CONTACT`, `DEAL` or `LEAD`.\n\nGong data model:\n\nThis diagram shows how the objects connect:\n\n\n\nThese links must exist:\n\n- A contact belongs to one account.\n- A deal belongs to one account.\n- A deal has an owner: a business user whose email address matches a Gong user's.\n- A converted lead is converted into an account, a deal or a contact, or more than one of them.\n\nIf your CRM doesn't match the Gong data model:\n\nYour CRM may store its data in other objects, or have no object for one of Gong's. To upload your CRM data and associate it with calls and emails, find the objects in your CRM that match Gong's:\n\n- **Account (required):** you must upload accounts to integrate your CRM with Gong. Use the objects that hold data about your customers, the companies you do business with. An account represents the company itself, not a person in it.\n- **Contact:** use the objects that hold data about the people at the customer that your reps are in touch with. A contact is a person you've moved beyond the prospect stage with. Your reps have several conversations and interactions with them.\n- **Deal:** the process of selling to the customer (account).\n- **Lead:** a prospect or potential contact who isn't linked to an account yet. If your CRM has an object for people you contact in the very early stages, who later become the people you do business with (contacts), upload them as leads.\n\nWhen your CRM data appears in Gong:\n\nBesides the time the upload takes, Gong first stores the data as raw data, so it isn't available in Gong right away. When `GET /v2/crm/request-status` returns `DONE`, Gong has read every object; adding them to its CRM data can take a while longer. A contact appears only when Gong associates it with a call or email.\n\nRequired authorization scopes for the CRM endpoints:\n\n- 'api:crm:integration:register': `PUT /v2/crm/integrations`\n- 'api:crm:integrations:read': `GET /v2/crm/integrations`\n- 'api:crm:integration:delete': `DELETE /v2/crm/integrations`\n- 'api:crm:schema': `GET /v2/crm/entity-schema` and `POST /v2/crm/entity-schema`\n- 'api:crm:upload': `POST /v2/crm/entities` and `GET /v2/crm/request-status`\n- 'api:crm:get-objects': `GET /v2/crm/entities`"
},
{
"name": "Auditing",
"x-section-intro": "The Auditing endpoint returns Gong's logs of what users do in Gong, so you can audit how your company's data is accessed and changed.\n\n**Gong keeps five logs:**\n\n- Access log (`AccessLog`): pages users opened in Gong, with each page's URL and response status.\n- User activity log (`UserActivityLog`): audited actions users took, such as sharing a call or changing permissions, with the details of each action.\n- Call play log (`UserCallPlay`): parts of calls users played.\n- Externally shared call access log (`ExternallySharedCallAccess`): times people outside the company opened a shared call.\n- Externally shared call play log (`ExternallySharedCallPlay`): parts of shared calls that people outside the company played.\n\nEach log goes back a different length of time. The access log holds the last 14 days. The user activity log goes back to March 2021. The call play log and the two externally shared call logs go back to the start of your company's Gong account.\n\n**Use it to:**\n\n- Send Gong activity to your security or monitoring system.\n- Find out who viewed or played a call, including people outside the company it was shared with.\n- Find out who changed settings, permissions or user access, and when.\n\n**Which endpoint to use:**\n\n- To get one log for a time range: `GET /v2/logs`\n\n**Good to know:**\n\n- **Keeping the access log:** the access log holds only the last 14 days. Request `AccessLog` entries at least once a day and store them.\n- **Volume:** an access log can hold many entries a day, and each response contains up to 300. Every page counts toward your company's daily rate limit, so check that the limit covers the requests you need.\n- **Usage totals:** for counts per user, such as calls listened to, use the [utilization report](https://help.gong.io/docs/generate-a-utilization-report) or Gong Data Cloud.\n\nRequired authorization scope for all Auditing endpoints: 'api:logs:read'."
},
{
"name": "Meetings (BETA)",
"x-section-intro": "The Meetings endpoints let another system, such as a scheduling tool, create Gong meeting links for a user's meetings. A Gong meeting link opens the Gong recording consent page, where participants are asked to consent to the recording before they join the call.\n\nLearn more about [recording consent](https://help.gong.io/docs/understanding-recording-consent).\n\n**Use them to:**\n\n- Add a Gong meeting link to meetings booked in a scheduling tool.\n- Keep a meeting's time and title in Gong up to date when it's rescheduled, and delete it when it's canceled.\n- Check which users Gong can create meeting links for, and why it can't for the others.\n\n**Which endpoint to use:**\n\n- To check which users Gong can create meeting links for: `POST /v2/meetings/integration/status`\n- To create a meeting and get its Gong meeting link: `POST /v2/meetings`\n- To change a meeting's time, title, or external ID: `PUT /v2/meetings/{meetingId}`\n- To delete a meeting: `DELETE /v2/meetings/{meetingId}`\n\n**Good to know:**\n\n- **Users who can have meeting links:** Gong creates a meeting link only for a user whose consent profile has the consent page turned on, and whose web conferencing accounts are connected to Gong. Check your users with `POST /v2/meetings/integration/status` before you create meetings for them.\n- **Invitations:** Gong doesn't send meeting invitations. Put `meetingUrl` in the invitation your system sends, as the meeting's only join link, so that every participant goes through the consent page.\n- **Organizer:** each meeting belongs to the user in `organizerEmail`. To update or delete a meeting, send the same `organizerEmail` and the `meetingId` returned when you created it.\n\n**Required authorization scopes for the Meetings endpoints:**\n\n- 'api:meetings:user:create': `POST /v2/meetings`\n- 'api:meetings:user:update': `PUT /v2/meetings/{meetingId}`\n- 'api:meetings:user:delete': `DELETE /v2/meetings/{meetingId}`\n- 'api:meetings:integration:status': `POST /v2/meetings/integration/status`"
},
{
"name": "Permissions",
"x-section-intro": "The Permissions endpoints let you create and manage permission profiles, and give users access to individual calls.\n\nIn Gong, a permission profile is a set of permissions that a Gong tech admin assigns to users. It controls which calls, emails, deals and stats the users can see, which pages they can open, and which actions they can take, such as scoring or downloading calls. Each permission profile belongs to one workspace. A user has one permission profile in each workspace they work in.\n\n**Where to go in Gong:** Admin center > Settings > People > Permission profiles. Learn more about [permission profiles](https://help.gong.io/docs/about-permission-profiles).\n\n**Use them to:**\n\n- Audit the permission profiles in a workspace, and the users who have each profile.\n- Create permission profiles, and update their permissions when your own access rules change.\n- Give users access to individual calls, for example the calls of the accounts they work on.\n\n**Which endpoint to use:**\n\n- To list a workspace's permission profiles and their permissions: `GET /v2/all-permission-profiles`\n- To get one permission profile: `GET /v2/permission-profile`\n- To create a permission profile: `POST /v2/permission-profile`\n- To change a permission profile's permissions: `PUT /v2/permission-profile`\n- To list the users who have a permission profile: `GET /v2/permission-profile/users`\n- To give users access to calls: `PUT /v2/calls/users-access`\n- To list the users you gave access to calls: `POST /v2/calls/users-access`\n- To remove the access you gave: `DELETE /v2/calls/users-access`\n\n**Good to know:**\n\n- **Assigning profiles:** the API doesn't assign permission profiles to users. A Gong tech admin assigns them in Gong, or your identity provider assigns them when it provisions users.\n- **Access to individual calls:** a user you give access to a call with `PUT /v2/calls/users-access` can access that call, even if their permission profile doesn't allow it. Their permission profile doesn't change. If their permission profile changes later, the user can still access the call until you remove the access. You can list and remove only the access you gave through the API.\n- **Permission fields:** each field in a permission profile matches a setting on the profile's page in Gong. Learn more about [permission settings](https://help.gong.io/docs/available-permission-settings).\n\nRequired authorization scopes for the Permissions endpoints:\n\n- 'api:permission-profile:read': `GET /v2/all-permission-profiles` and `GET /v2/permission-profile`\n- 'api:permission-profile:write': `POST /v2/permission-profile` and `PUT /v2/permission-profile`\n- 'api:users:read': `GET /v2/permission-profile/users`\n- 'api:call-user-access:read': `POST /v2/calls/users-access`\n- 'api:call-user-access:write': `PUT /v2/calls/users-access` and `DELETE /v2/calls/users-access`"
},
{
"name": "Engage Flows",
"x-section-intro": "The Engage Flows endpoints let you add your CRM contacts and leads to Gong Engage flows and remove them. You can also get your company's flows, with their steps and folders, and the flows each prospect is in.\n\n**Where to go in Gong:** Assets > Flows. Learn more about [flows in Engage](https://help.gong.io/docs/about-flows-in-engage).\n\nUse them to:\n\n- Add prospects to flows from another system, such as a lead routing or data enrichment tool.\n- Personalize each prospect's flow steps when you add them: step subjects and bodies, and variable values.\n- Remove prospects from flows when your own system says their outreach should stop.\n- Check which flows a prospect is in now, and the status of each.\n- Copy flows and their steps into your own systems, for reporting or to check their content.\n\nWhich endpoint to use:\n\n- To list the flows a user can see: `GET /v2/flows`\n- To find flows by name: `GET /v2/flows/search`\n- To list the flow folders a user can see: `GET /v2/flows/folders`\n- To get flows with their steps, including each step's subject and body: `POST /v2/flows/steps`\n- To add up to 100 prospects to a flow: `POST /v2/flows/prospects/assign`\n- To add up to 50 prospects to a flow asynchronously: `POST /v2/flows/prospects/bulk-assignments`\n- To get the results of a bulk assignment: `GET /v2/flows/prospects/bulk-assignments/{id}`\n- To get the flows a prospect is in now: `POST /v2/flows/prospects`\n- To remove prospects from flows by flow instance ID: `POST /v2/flows/prospects/unassign-flows-by-instance-id`\n- To remove one prospect from flows by CRM ID: `POST /v2/flows/prospects/unassign-flows-by-crm-id`\n\nGood to know:\n\n- **Flow instances:** each time a prospect is added to a flow, Gong creates a flow instance, with its own ID and status. To track or remove one prospect's place in a flow, keep the `flowInstanceId` from the response, or get it later from `POST /v2/flows/prospects`.\n- **Gong users:** `flowOwnerEmail`, `flowFolderOwnerEmail`, `flowInstanceOwnerEmail` and `unassignedByUserEmail` take the email address of a Gong user with a Gong Engage license. If the address isn't a Gong user's, or the user doesn't have a Gong Engage license, the request fails.\n- **One user per request:** `GET /v2/flows`, `GET /v2/flows/search` and `GET /v2/flows/folders` take one user's email address. The response lists the company's flows, the user's personal flows and flows shared with them. To get flows or folders for several users, send a separate request for each user. Each request counts toward your company's daily rate limit, so request only the users you need.\n- **Prospect batches:** adding prospects one at a time uses up your company's daily rate limit quickly. Send up to 100 prospects in each `POST /v2/flows/prospects/assign` request.\n- **Paging:** each response from `GET /v2/flows` and `GET /v2/flows/folders` contains up to 100 flows or folders. If there are more, the response includes `records.cursor`. To get the next 100, send it as `cursor` in your next request.\n\nRequired authorization scopes for the Engage Flows endpoints:\n\n- 'api:flows:read': `GET /v2/flows`, `GET /v2/flows/search`, `GET /v2/flows/folders`, `POST /v2/flows/steps`, `POST /v2/flows/prospects` and `GET /v2/flows/prospects/bulk-assignments/{id}`\n- 'api:flows:write': `POST /v2/flows/prospects/assign`, `POST /v2/flows/prospects/bulk-assignments`, `POST /v2/flows/prospects/unassign-flows-by-instance-id`, `POST /v2/flows/prospects/unassign-flows-by-crm-id` and the deprecated `POST /v2/flows/prospects/assign/cool-off-override`"
},
{
"name": "Digital Interactions",
"x-section-intro": "Through the Digital Interactions API, you can send Gong the actions that people outside the company take in your app, such as viewing a document, watching a video, completing a course step or signing a contract. In Gong, each of these actions is a digital interaction. Gong shows a digital interaction in the activity timeline of the CRM account, deal, contact or lead it's linked to, next to the calls and emails with that customer. Sales teams use digital interactions to see how buyers engage when no one from the company is talking to them.\n\nEach event describes one person, the action they took, and the content they took it on. Send them in `person`, `eventType` and `content`.\n\n**Where to go in Gong:** an account's Activity tab. Learn more about [the account activity timeline](https://help.gong.io/docs/review-accounts-in-the-account-console).\n\n**Use them to:**\n\n- Show what buyers do in your app, such as content views, form submissions or signatures, in Gong next to the customer's calls and emails.\n- Send buyer intent signals, such as a prospect comparing products on a review site, to the account the prospect belongs to.\n- Build a partner integration that sends events from your product to each Gong customer that connects it.\n\n**Which endpoint to use:**\n\n- To send a digital interaction: `POST /v2/digital-interaction`\n\n**Good to know:**\n\n- **Linking to the CRM:** Gong shows an event only when it can link the event to the CRM account, deal, contact or lead. Send everything you know about the person: their CRM contact or lead ID, their company's CRM account or opportunity ID, their email address, their phone number or their company's domain.\n- **200 responses:** a 200 response means that Gong accepted the event. Gong links the event to the CRM after it responds. If Gong can't link the event, Gong drops it without an error. Check a few test events in Gong before you send events in bulk.\n- **Field names:** Gong ignores fields it doesn't recognize, without an error. Check the spelling and case of each field name against this reference.\n- **Engagement endpoints:** the Engagement endpoints (`PUT /v2/customer-engagement/...`) are an older way to send these events. Use `POST /v2/digital-interaction` for new integrations.\n\nRequired authorization scope for all Digital Interactions endpoints: 'api:digital-interactions:write'."
},
{
"name": "Integration Settings",
"x-section-intro": "The Integration Settings endpoint sets the origins that Gong allows your app's iFrame to load from, for one company. Use this endpoint when your app serves each customer from an address of its own, such as `https://acme.partner.com`.\n\nAn app can show its own page inside Gong, in an iFrame. In the Engage email composer, users add your app's content to their emails. On the Engage account pages, users see your app's account data. To set this up, you register your app in Gong as an OAuth integration, with the URL of the page to open and a list of allowed origins. Gong blocks content in the iFrame from any origin that isn't allowed for the company. Gong also rejects messages that the page sends from any other origin. If your app sends users to an address of their own, such as a page your app opens after they sign in, register that address with this endpoint.\n\nLearn more about [creating an OAuth app for Gong](https://help.gong.io/docs/create-an-app-for-gong).\n\n**Use them to:**\n\n- Allow each customer's own address in your app's iFrame, for that customer's company only.\n- Replace a customer's addresses when they change.\n\n**Which endpoint to use:**\n\n- To set the allowed origins for one company: `POST /v2/integration-settings`\n\n**Good to know:**\n\n- **Origins for every company:** origins that are the same for every company go in your integration's **Allowed origins** setting in Gong, not in this endpoint. Use this endpoint for origins that differ by company.\n- **One company per request:** Gong saves the origins for the company that gave your integration the access token you send. Send a request for each company, with that company's access token.\n- **Scope:** if you add the scope to an integration that companies already installed, a tech admin at each company must authorize the integration again before its access token includes the scope.\n- **Sign-in pages:** Gong blocks third-party pages in the iFrame, including other services' sign-in pages. Open a third-party sign-in page in a new window.\n\nRequired authorization scope for all Integration Settings endpoints: 'api:integration-settings:write'."
},
{
"name": "Engagement (Legacy – See “Digital Interactions”)",
"x-section-intro": "\n\nGong?s \"Engagement\" API endpoints allow you to push engagement events into Gong and display them as events in Gong?s activity timeline.
\nThere are currently 3 types of events:
\n\n- \n\"Content Shared\" Event Type - Use this event type to push engagement events into Gong when a Gong user shares content with external participants (for example, a contract was ?shared? by the account executive with his prospects)
\n- \n\"Content Viewed\" Event Type - Use this event type to push engagement events into Gong when a content is viewed by an external participant (for example, a contract was ?viewed? by the prospect)\n
\n- \n\"Custom Action\" Event Type - Use this event type to push engagement events into Gong when a content is engaged by an external participant (for example, a contract was ?signed? by the prospect)
\n
"
},
{
"name": "Accounts Enrich",
"x-section-intro": "Gong’s “Accounts Enrich” API endpoints allow you to enrich your account records with Gong's data.
\nEnrichment is asynchronous and works in two steps:
\n\n- \nSubmit up to 10 accounts, along with the data categories you want, and receive a jobId.\n
\n- \nRetrieve the results using the jobId. A data category whose status is “Running” is still being enriched, so poll until no category is “Running”.\n
\n
\n\nEach account is identified by search criteria - its name, domain or LinkedIn URL - and is returned with the id you supplied, so you can correlate results with your request.\n
"
},
{
"name": "Contacts Enrich",
"x-section-intro": "Gong’s “Contacts Enrich” API endpoints allow you to enrich your contact records with Gong's data.
\nEnrichment is asynchronous and works in two steps:
\n\n- \nSubmit up to 10 contacts, along with the data categories you want, and receive a jobId.\n
\n- \nRetrieve the results using the jobId. A data category whose status is “Running” is still being enriched, so poll until no category is “Running”.\n
\n
\nEach contact must be identified by one of the following combinations:
\n\n- \nlinkedinUrl on its own\n
\n- \nfirstName + lastName + email\n
\n- \nfirstName + lastName + accountSearchCriteria (the account's name, domain or LinkedIn URL)\n
\n
\n\nEach contact is returned with the id you supplied, so you can correlate results with your request.\n
"
},
{
"name": "Tasks",
"x-section-intro": "The Tasks endpoints let you get a user's Engage to-dos for calling prospects, with the contact, account and flow step of each. You can also mark them done, skip them, or change their due date or priority. In the API, an Engage to-do is called a task.\n\n**Where to go in Gong:** To-dos. Learn more about [to-dos](https://help.gong.io/docs/about-to-dos).\n\n**Use them to:**\n\n- Load a user's tasks into a dialer, with each contact's phone numbers.\n- Mark tasks done or skip them from another system, so that prospects move on to the next step of their flow.\n- Change a task's due date or priority from another system.\n\n**Which endpoint to use:**\n\n- To get a user's tasks: `POST /v2/tasks`\n- To mark a task done, dismiss it, or change its due date or priority: `PATCH /v2/tasks/{taskId}`\n\n**Good to know:**\n\n- **Task types:** a `FLOW` task is a step in a flow. A `MANUAL` task is a one-off task a user created.\n- **Flow steps:** setting a flow task to `DONE` or `DISMISSED` ends the step and moves the prospect to the next step of the flow, as completing or skipping the step does in Gong. To keep the prospect on the step, change the due date instead.\n- **Tasks of one flow:** there's no filter by flow. To work on one flow's tasks, get the user's tasks and keep the ones whose `flow.id` matches.\n- **One user per request:** `POST /v2/tasks` returns one user's tasks. Each request counts toward your company's daily rate limit, so a dialer that requests every user's tasks many times a day can use it up. Request only the users you need, only as often as you need.\n\n**Required authorization scopes for the Tasks endpoints:**\n\n- 'api:tasks:read': `POST /v2/tasks`\n- 'api:tasks:write': `PATCH /v2/tasks/{taskId}`"
},
{
"name": "Outcomes",
"x-section-intro": "The Outcomes endpoint returns your company's call outcomes. In Gong Engage, users call prospects with the Gong Dialer. After each call, the user selects a call outcome, such as `Meeting booked` or `Left voicemail`, to record how the call went. Gong provides a default set of outcomes, and a Gong admin can change them. Every user in the company chooses from the same outcomes.\n\n**Where to go in Gong:** Admin center > Settings > Gong Engage > Dialer setup > Call outcomes. Learn more about [call outcomes](https://help.gong.io/docs/configure-call-outcomes-for-the-gong-dialer).\n\n**Use it to:**\n\n- Offer the same outcomes in your own dialer or app.\n- Find out how Gong counts the calls logged with each outcome, such as which outcomes count as connected calls.\n- Map Gong's outcomes to the call result values in your CRM or reporting tool.\n\n**Which endpoint to use:**\n\n- To list the company's call outcomes and their settings: `GET /v2/call-outcomes`\n- To get the outcome a user selected for a call: `GET /v2/calls` or `POST /v2/calls/extensive`, in the call's `sdrDisposition`\n- To get the outcome Gong AI set for a call: `POST /v2/calls/extensive`, with `contentSelector.exposedFields.content.callOutcome` set to true\n\n**Good to know:**\n\n- **Two outcomes on a call:** a call can have the outcome the user selected and an outcome that Gong AI set from the call's transcript. The two are separate and can differ. `GET /v2/call-outcomes` lists the outcomes users can select. The outcome Gong AI sets is always one of Gong's default outcomes, even when the company has defined its own.\n- **Matching a call's outcome to the list:** a call doesn't hold an outcome ID. It holds the name of the outcome the user selected, as text. To find that outcome's settings, such as its connect status, look for the same name in the response from `GET /v2/call-outcomes`. Some names aren't in that response. Calls made with other dialers, such as Outreach or HubSpot, hold those dialers' outcome names. Some names differ from Gong's only in capital letters or extra spaces. Compare names ignoring capital letters and extra spaces, and handle names you can't find.\n- **Removed outcomes:** `GET /v2/call-outcomes` lists only the outcomes users can select now. Calls logged with an outcome that an admin later removed keep that outcome's name.\n\nRequired authorization scope for all Outcomes endpoints: 'api:call-outcomes:read'."
},
{
"x-section-intro": "Through the Targets endpoints, you can send target values to Gong from the system where your company plans them, such as a sales planning or compensation tool. In Gong, a target is a goal, such as a revenue quota or a number of deals. Dashboards and forecast boards compare each target with actual results. A business admin creates each target in Gong. Each target holds target values. A target value is the goal for one user, one manager's team or one territory, in one period, such as `Q1 FY2026`. In the endpoint path, target values are called assignments.\n\n**Where to go in Gong:** Admin center > Settings > Data Studio > Targets. Learn more about [targets](https://help.gong.io/docs/create-and-manage-targets).\n\n**Use them to:**\n\n- Update the targets in Gong from your planning or compensation system, instead of uploading CSV files in Gong by hand.\n- Check a target file for errors before you change any targets in Gong.\n\n**Which endpoint to use:**\n\n- To list the targets in a workspace, with the ID and file columns of each one: `GET /v2/targets`\n- To add or update a target's values from a CSV file: `POST /v2/targets/{targetId}/assignments`\n\n**Good to know:**\n\n- **Creating targets:** the API doesn't create or delete targets. A business admin creates the target in Gong. Then you can upload its values through the API.\n- **Removing target values:** the API can't remove a target value. A row with the wrong period, or a user's own target sent as a team target, adds a new target value instead of correcting the existing one. To remove target values, a business admin deletes the target in Gong and creates it again. Before you save a file, check it with `POST /v2/targets/{targetId}/assignments` and `validateOnly` set to `true`.\n- **Reading target values:** the API doesn't return a target's values. To see them, open the target in Gong.\n\nRequired authorization scopes for the Targets endpoints:\n\n- 'api:targets:read': `GET /v2/targets`\n- 'api:targets:write': `POST /v2/targets/{targetId}/assignments`",
"name": "Targets"
},
{
"name": "Coaching",
"x-section-intro": "The Coaching endpoint returns the coaching activity of your company's managers: the calls of their team members that each manager listened to, attended, commented on, filled out a scorecard for, or gave feedback on. It returns the same activity that the Coaching metrics page in Gong shows.\n\nIn Gong, each user can have a manager. A manager's team is every user who reports to the manager, directly or through other managers. Coaching activity counts only on calls that a member of the manager's team owned or attended.\n\n**Where to go in Gong:** Coaching > Coaching metrics. Learn more about [manager coaching activity](https://help.gong.io/docs/review-manager-coaching).\n\n**Use it to:**\n\n- Track how often managers coach their teams, in your own BI tool or data warehouse.\n- Compare the coaching activity of the managers who report to a senior manager, such as a sales director.\n- Find the calls a manager coached, then get their participants, content or transcripts with the Calls endpoints.\n\n**Which endpoint to use:**\n\n- To get the coaching activity of the managers who report to a manager: `GET /v2/coaching`\n\n**Good to know:**\n\n- **Senior manager in the request:** the response lists the managers who report directly to the manager you send. It doesn't include that manager's own coaching activity. To get a frontline manager's coaching activity, send the ID of the frontline manager's own manager.\n- **Activity time:** the time range applies to when the manager coached, not when the call took place. When a manager listens in March to a call from January, the response lists the call in March's activity.\n- **Not real time:** Gong updates coaching activity about once a day. Activity can take a day or more to appear in the response. To get complete data for a day, request it the next day or later.\n- **Inactive users:** the response leaves out inactive users and inactive managers. When a user is deactivated, their past coaching activity is no longer returned either. To keep the coaching history of users who leave, store the responses.\n\nRequired authorization scope for all Coaching endpoints: 'api:coaching:read'."
}
],
"paths": {
"/v2/library/folders": {
"get": {
"tags": [
"Library"
],
"summary": "List company library folders",
"description": "Returns the folders in a workspace's company library, so that you can find the ID of the folder whose calls you want. The response doesn't include folders in users' own libraries, archived folders or streams.\n\nEach folder is listed before the folders inside it. To rebuild the folder tree, match each folder's `parentFolderId` to the `id` of the folder it's in.\n\nIf the workspace has no company library folders, or no workspace in the company has the ID you send, the response holds an empty `folders` list.\n\nRequired authorization scope: 'api:library:read'.",
"operationId": "getLibraryStructure",
"parameters": [
{
"name": "workspaceId",
"in": "query",
"description": "The ID of the workspace the folders belong to. Use the Workspaces API to look up workspace IDs.",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LibraryResponse"
}
}
}
},
"400": {
"description": "- The request doesn't include a workspace ID, or the ID in `workspaceId` isn't a number.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"401": {
"description": "- The API key or access token is missing or isn't valid.\n- The integration uses OAuth, and its token doesn't have the scope this endpoint requires. The error message names the scope.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "No folders found for the specified period",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"429": {
"description": "- The company sent more requests than its rate limit allows. Wait the number of seconds in `Retry-After`, then send the request again.",
"headers": {
"Retry-After": {
"description": "The number of seconds to wait before you send the request again.",
"style": "simple",
"explode": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "- Gong couldn't complete the request because of an unexpected error. Try again. If the error continues, contact Gong Support and give them the `requestId` from the response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"LibraryResponse": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.",
"example": "4al018gzaztcr8nbukw"
},
"folders": {
"type": "array",
"description": "The folders in the workspace's company library.",
"items": {
"$ref": "#/components/schemas/LibraryFolder"
}
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.",
"example": "4al018gzaztcr8nbukw"
},
"errors": {
"type": "array",
"description": "Error messages.",
"example": [
"An error has occurred"
],
"items": {
"type": "string"
}
}
}
},
"LibraryFolder": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The Gong ID of the folder. Up to 20 digits. To list the folder's calls, send this ID in `folderId` on `GET /v2/library/folder-content`.",
"example": "3843152912968920037"
},
"name": {
"type": "string",
"description": "The name of the folder.",
"example": "Sales Onboarding"
},
"parentFolderId": {
"type": "string",
"description": "The Gong ID of the folder this folder is in. Null for a folder at the top level of the company library.",
"example": "295738305212375930"
},
"createdBy": {
"type": "string",
"description": "The Gong user ID of the user who created the folder.",
"example": "234599484848423"
},
"updated": {
"type": "string",
"description": "The date and time the folder was last modified, in ISO-8601 format, in the company's time zone.",
"format": "date-time",
"example": "2020-03-14T13:30:00+00:00"
}
},
"description": "A folder in the company library."
}
}
}
}
````