> ## 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. # Retrieve all references to a phone number. (/v2/data-privacy/data-for-phone-number) > Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages. Required authorizaton scope: 'api:data-privacy:read'. ## OpenAPI ````json GET /v2/data-privacy/data-for-phone-number { "openapi": "3.0.1", "info": { "title": "Gong API", "version": "V2" }, "servers": [ { "url": "http://127.0.0.1:8090", "description": "Generated server url" } ], "tags": [ { "name": "Calls", "description": "

Gong’s “Calls” API endpoints allow you to:

\n\n

The requested calls may contain the following call details:

\n\n" }, { "name": "Users", "description": "

Gong’s “Users” API endpoints allow you to:

\n\n

The requested users may contain the following details:

\n\n" }, { "name": "Stats", "description": "

Gong’s “Stats” API endpoints allow you to:

\n\n

The requested user activity may contain the following details:

\n\n" }, { "name": "Settings", "description": "

Gong’s “Settings” API endpoints allow you to:

\n\n" }, { "name": "Data Privacy", "description": "

Gong’s “Data Privacy” API endpoints allow you to:

\n\n" }, { "name": "Library", "description": "

Gong’s “Library” API endpoints allow you to:

\n\n" }, { "name": "CRM", "description": "

If you are using the deprecated endpoints, download the PDF file.

What does the CRM API do?

This API enables integration with CRMs that are not natively integrated with Gong, so that Gong can provide you with its full capabilities based on your CRM data. This includes:

By uploading your CRM data to Gong, your Gong users will be able to see their CRM deals in the Gong Deals page, view deal boards to follow up on deal progress, get warnings for deals that are at risk, and see whether their team will reach its quota. The CRM data is also displayed in conversations and calls, so that your Gong users can see account and contact data such as the name and job title of the contact in the call. Account data is displayed in the Accounts page, together with the history of all communication and contact with the company.

Note: Gong provides native integrations with Salesforce, HubSpot and Microsoft Dynamics 365.

API Protocol

The API protocol is based on REST guidelines. Check here what's your base URL for all API calls.\n

The payload is either a JSON object or, for API calls that upload lists of objects, line delimited JSON (see: JSON streaming). JSON objects should be UTF-8 encoded.

Dates and timestamps in JSON objects should be in ISO-8601 format without milliseconds (e.g. '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).

What data can I upload?

To see your CRM data in Gong, upload the following entities:

Uploading CRM data to Gong

This diagram shows how to set up your system in order to upload CRM data to Gong. This is relevant for each scenario of uploading data, initial, incremental and uploading historical data.

\"\"

Registering your Integration

Register your integration to get an integrationId used to identify your company's integration with Gong. This is a one time action that does not need to be repeated unless you delete your integration.

Use PUT v2/crm/integrations to register your integration. The integration Id is returned in the response. Include the integration Id each time you upload your CRM data.

Uploading additional data for CRM entities

Each CRM entity has a set of standard fields. In addition, you may want to upload additional fields.

Use the POST /v2/crm/entity-schema to adjust the schema according to your needs. Once you have uploaded your schema to Gong, you can upload your entities with the additional fields.

Uploading your CRM data to Gong

This section explains how you can use the CRM API to upload your data to Gong:

First-time upload

Create a database dump of the data you want to upload to Gong based on your CRM schema and data. When uploading your data for the first time you should include all of the CRM records that should appear in Gong.

Incremental upload

Send regular incremental data updates to Gong. You can update your data as often as you like, we recommend updating between every 1-5 minutes.
You should only send new records or records that have changed since the previous upload of data. New records are added to Gong and existing records are updated or deleted, whichever is relevant. Entities are identified by the objectId. Ensure that this ID remains the same each time it is updated.

When updating data, the modificationDate parameter is mandatory. This enables us to maintain accurate historical data. If your CRM does not store the modification date, send the date the API call is made.

Uploading data change history

Gong incorporates historical change data in different areas of Gong in order to provide a more accurate picture of the status of different entities at that time. For example, showing the correct stage of a deal at the time a call was made.

If your CRM stores record history, you are encouraged to load historical change data as part of the integration. You can do this at any time, but we recommend doing this after the initial upload as follows:

  1. Generate the JSON files with the relevant data. Ensure that the modifiedDate is set to the date the entity was updated.
  2. Upload the entities with their historical data using the POST /v2/crm/entities?objectType=ACCOUNT|CONTACT|DEAL|LEAD endpoint.

Gong Data Model

This diagram shows the connection between the different objects in the CRM API:

\"\"

The following relationship between entities must exist:

What if my CRM doesn't match the Gong data model?

It is possible that your CRM entity model won't match the Gong CRM entity model. Your CRM may store your data in different entities, or you may not have an entity that represents one of the Gong CRM entities.

In order to upload your CRM data and associate it with calls and conversations, you need to identify the objects in your CRM which match the Gong CRM entities.

The account is a mandatory entity which must be uploaded in order to integrate Gong with your CRM. To upload account data, identify your CRM entities that contain data about your customers or companies that you do business with. These customers are not actual people within the org, rather they represent the org itself.

To upload contact details, identify your CRM entities that hold data about employees in the company that your reps are in touch with. A contact represents a person where communication has advanced beyond the prospect stage. Your reps will have multiple conversations and interactions with the contact.

The deal represents the selling process to the customer (account).

The lead is a prospect or potential contact, who is not yet associated with an account. If your CRM has an entity which represents people who you contact in the very early stages, and who is later converted to another entity which represents the people you are doing business with (the contact), upload this data as a lead entity.

When will my CRM data be displayed in Gong?

In addition to the time it takes for data to upload to Gong, the data is first uploaded as raw data and is not automatically available in Gong.





" }, { "name": "Auditing", "description": "

Gong’s “Auditing” API endpoints allow you to request the following log types from Gong:

\n\n" }, { "name": "Meetings (in Beta Phase)", "description": "

Gong’s “Consent Meeting” API endpoints allow you to:

\n\n

The requested calls may contain the following meeting details:

\n\n" }, { "name": "Permissions", "description": "

Gong’s \"Permission\" API endpoints allow you to:

\n\n" }, { "name": "Engage Flows", "description": "

Gong’s “Flows” API endpoints allow you to:

\n\n" }, { "name": "Digital Interactions", "description": "

Digital interactions (DIs) are events people make when interacting with (mostly) digital content. It can be described as an action someone did on an object. Anything from viewing a document or a video, to registering/completing a course or someone visiting your website.

The below proposed Digital Interactions API allows mainly tech-partners (and also customers) to capture and track user interactions with various types of digital content. It provides a structured schema for recording a person’s identity, action, content details, and additional contextual information. The API enables seamless integration between tech-partner systems and the Gong platform, providing valuable insights into buyer-seller interactions that sometimes are hidden from a seller’s line-of-sight.

For simplicity & clarity, the API scheme is designed according to a real-world scenario, including the following terminology:For simplicity & clarity, the API scheme is designed according to a real-world scenario, including the following terminology:

" }, { "name": "Integration Settings", "description": "

Configure your integration settings for displaying your company data in iFrames. For example, use this API to configure dynamic links as the iFrame source. This endpoint includes validation mechanisms to ensure the integration is secure.

Mandatory fields are marked with a *.

" }, { "name": "Engagement (Legacy – See “Digital Interactions”)", "description": "

Limited release - contact integration.requests@gong.io for more information.\n

\n\n

Gong’s \"Engagement\" API endpoints allow you to push engagement events into Gong and display them as events in Gong’s activity timeline.

\n

There are currently 3 types of events:

\n\n" } ], "paths": { "/v2/data-privacy/data-for-phone-number": { "get": { "operationId": "findAllReferencesToPhoneNumber", "summary": "Retrieve all references to a phone number. (/v2/data-privacy/data-for-phone-number)", "description": "Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages.\n\nRequired authorizaton scope: 'api:data-privacy:read'.", "parameters": [ { "name": "phoneNumber", "in": "query", "description": "The phone number.\n\nThis number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored.\n\nThe following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc.\n\nNote: This parameter should be URL-encoded.", "required": true, "schema": { "type": "string" }, "example": "+1(425) 555-2671" } ], "responses": { "200": { "description": "Successful request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberReferences" } } } }, "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Access denied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "API request limit exceeded", "headers": { "Retry-After": { "description": "Number of seconds to wait before making a new request.", "style": "simple", "schema": { "type": "integer", "format": "int32" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "500": { "description": "Failed to complete the operation due to an unexpected error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "tags": [ "Data Privacy" ] } } }, "components": { "schemas": { "PhoneNumberReferences": { "type": "object", "properties": { "requestId": { "description": "A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.", "type": "string", "example": "4al018gzaztcr8nbukw" }, "emails": { "description": "Related email messages.", "type": "array", "items": { "$ref": "#/components/schemas/EmailMessage" } }, "calls": { "description": "Related calls.", "type": "array", "items": { "$ref": "#/components/schemas/CallReference" } }, "meetings": { "description": "Related meetings.", "type": "array", "items": { "$ref": "#/components/schemas/Meeting" } }, "customerData": { "description": "A list of links to data from external systems (such as CRM, Telephony System, Case Management, etc.) that reference the email address and that Gong stores.", "type": "array", "items": { "$ref": "#/components/schemas/CustomerData" } }, "suppliedPhoneNumber": { "description": "The supplied phone number.", "type": "string" }, "matchingPhoneNumbers": { "description": "Matching phone numbers found.", "type": "array", "items": { "type": "string", "description": "Matching phone numbers found." }, "uniqueItems": true }, "emailAddresses": { "description": "Related email addresses.", "type": "array", "items": { "type": "string", "description": "Related email addresses." }, "uniqueItems": true } } }, "ErrorResponse": { "type": "object", "properties": { "requestId": { "description": "A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.", "type": "string", "example": "4al018gzaztcr8nbukw" }, "errors": { "description": "Error messages.", "type": "array", "items": { "type": "string" }, "example": [ "An error has occurred" ] } } }, "EmailMessage": { "description": "Related email messages.", "type": "object", "properties": { "from": { "description": "The sender's email address.", "type": "string", "example": "test@test.com" }, "id": { "description": "Gong's unique 32 character identifier for the email message.", "type": "string", "example": "223mjfaaqqjuegabiyrmpctvcwwl75oz" }, "sentTime": { "description": "The date and time the email message was sent in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC.", "type": "string", "example": "2019-01-20T08:00:00+00:00" }, "mailbox": { "description": "The mailbox from which the email was retrieved.", "type": "string", "example": "test@test.com" }, "messageHash": { "description": "Hash code of the email message.", "type": "string", "example": "l3z7w2s7oircdabnkwizmycm6g2uwznc" } } }, "CallReference": { "description": "Details of a call referencing the email address.", "type": "object", "properties": { "id": { "description": "Gong's unique numeric identifier for the call (up to 20 digits).", "type": "string", "example": "7782342274025937895" }, "status": { "description": "Call status", "type": "string", "example": "COMPLETED" }, "externalSystems": { "description": "A list of links to external systems such as CRM, Telephony System, Case Management, etc.", "type": "array", "items": { "$ref": "#/components/schemas/ExternalSystem" } } } }, "Meeting": { "description": "Related meetings.", "type": "object", "properties": { "id": { "description": "Gong's unique identifier for the meeting.", "type": "string", "example": "8059707022269524529.sb5gr1tgpt5dd799eh035rb3dk@google.com_2022-06-30T13:00:00Z" } } }, "CustomerData": { "description": "A list of links to data from external systems (such as CRM, Telephony System, Case Management, etc.) that reference the email address and that Gong stores.", "type": "object", "properties": { "system": { "description": "External system name.", "type": "string", "example": "Salesforce", "enum": [ "Salesforce", "HubSpot", "MicrosoftDynamic", "Generic" ] }, "objects": { "description": "List of objects in the external system.", "type": "array", "items": { "$ref": "#/components/schemas/CustomerDataObject" } } } }, "ExternalSystem": { "description": "A list of links to external systems such as CRM, Telephony System, Case Management, etc.", "type": "object", "properties": { "system": { "description": "External system name.", "type": "string", "example": "Salesforce", "enum": [ "Salesforce", "HubSpot", "MicrosoftDynamic", "Generic" ] }, "objects": { "description": "List of objects within the external system.", "type": "array", "items": { "$ref": "#/components/schemas/ExternalSystemObject" } } } }, "CustomerDataObject": { "description": "List of objects in the external system.", "type": "object", "properties": { "id": { "description": "Gong's unique numeric identifier (up to 20 digits) for the Lead or Contact.", "type": "string", "example": "7782342274025937895" }, "objectType": { "description": "Object Type.", "type": "string", "example": "Contact", "enum": [ "Lead", "Contact" ] }, "externalId": { "description": "External ID.", "type": "string", "example": "0013601230sV7grAAC" }, "mirrorId": { "description": "Crm Mirror ID.", "type": "string", "example": "\"{\\\"integrationId\\\":\\\"262834820328732\\\",\\\"crmObjectType\\\":\\\"CONTACT\\\",\\\"crmId\\\":\\\"0031Q00002DFhi4QAD\\\"}\"" }, "fields": { "description": "Object fields.", "type": "array", "items": { "$ref": "#/components/schemas/ContextField" } } } }, "ExternalSystemObject": { "description": "List of objects within the external system.", "type": "object", "properties": { "objectType": { "description": "Object Type.", "type": "string", "example": "Task", "enum": [ "Conversation", "Task" ] }, "externalId": { "description": "External ID.", "type": "string", "example": "0013601230sV7grAAC" } } }, "ContextField": { "description": "External object data", "type": "object", "properties": { "name": { "description": "Field name. For Account supported fields are: Name, Website, Industry and all the custom fields. For Opportunity supported fields are Name, LeadSource, Type, StageName, Probability, Amount, CloseDate and all the custom fields.", "type": "string", "example": "name" }, "value": { "description": "Field value", "type": "object", "example": "Gong Inc." } } } } } } ````