# \CrmApi All URIs are relative to *https://127.0.0.1:8443* Method | HTTP request | Description ------------- | ------------- | ------------- [**delete_generic_crm_integration**](CrmApi.md#delete_generic_crm_integration) | **DELETE** /v2/crm/integrations | Delete a Generic CRM integration (/v2/crm/integrations) [**get_crm_objects**](CrmApi.md#get_crm_objects) | **GET** /v2/crm/entities | Get CRM objects (/v2/crm/entities) [**get_request_status**](CrmApi.md#get_request_status) | **GET** /v2/crm/request-status | Get Request Status (/v2/crm/request-status) [**list_crm_schema_fields**](CrmApi.md#list_crm_schema_fields) | **GET** /v2/crm/entity-schema | List Schema Fields (/v2/crm/entity-schema) [**list_generic_crm_integration**](CrmApi.md#list_generic_crm_integration) | **GET** /v2/crm/integrations | Get Generic CRM integration details (/v2/crm/integrations) [**register_generic_crm_integration**](CrmApi.md#register_generic_crm_integration) | **PUT** /v2/crm/integrations | Register a Generic CRM integration (/v2/crm/integrations) [**upload_crm_schema_field**](CrmApi.md#upload_crm_schema_field) | **POST** /v2/crm/entity-schema | Upload Object Schema (/v2/crm/entity-schema) ## delete_generic_crm_integration > models::AsyncProcessingResponse delete_generic_crm_integration(integration_id, client_request_id) Delete a Generic CRM integration (/v2/crm/integrations)

Asynchronously deletes a CRM integration and all its associated CRM objects (Accounts, Contacts, Deals, Leads, and Users).

This endpoint gets the clientRequestId generated by you as the request identifier. Use this to check the status of the delete request by calling the /request-status endpoint,with the clientRequestId.

A status of DONE indicates that the integration and all its associated crm objects have been successfully deleted. This may take up to 24 hours to be deleted.


When accessed using a bearer token, this endpoint requires the 'api:crm:integration:delete' scope.

Example

DELETE https://api.gong.io/v2/crm/integrations?clientRequestId=1234&integrationId=6286478263646 ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **integration_id** | **i64** | The ID of the integration to delete | [required] | **client_request_id** | **String** | A unique identifier generated and sent by you to allow troubleshooting. Valid characters are letters, numbers, dashes and underscores. | [required] | ### Return type [**models::AsyncProcessingResponse**](AsyncProcessingResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_crm_objects > models::GetGenericCrmObjectsResponse get_crm_objects(integration_id, object_type, objects_crm_ids) Get CRM objects (/v2/crm/entities)

This API is for use in the development phase only, to manually verify that objects are uploaded and processed correctly in Gong.

Returns a JSON object where each key is the object’s crm id and the corresponding value is a nested JSON object representing the CRM object fields. Each key in the nested JSON is the field name and the corresponding value is the field value.

The objects are fetched from the Gong main DB. If the object is not found, the JSON’s value is null.

The request body contains an array of objects ids.

The request is limited to 100 objects. If more than 100 objects are requested only the first 100 are returned.

When accessed using a bearer token, this endpoint requires the 'api:crm:get-objects' scope.

Example

Request

GET https://api.gong.io/v2/crm/entities?integrationId=6286478263646&objectType=DEAL

[\"1234\",\"8765\"] //request body ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **integration_id** | **i64** | Integration ID generated when creating the integration | [required] | **object_type** | **String** | Requested objects type | [required] | **objects_crm_ids** | [**Vec**](String.md) | Request Body: The requested objects crm ids (should be sent in the request body) | [required] | ### Return type [**models::GetGenericCrmObjectsResponse**](GetGenericCrmObjectsResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_request_status > models::RequestStatusResponse get_request_status(integration_id, client_request_id) Get Request Status (/v2/crm/request-status)

Returns the current status of the request for endpoints run asynchronously:

When accessed using a bearer token, this endpoint requires the 'api:crm:upload' scope.

Status Codes

Correcting a file that failed to be processed:

When the status in the response is FAILED do one of the following:

### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **integration_id** | **i64** | Integration ID generated when creating the integration | [required] | **client_request_id** | **String** | The client request ID used in the asynchronous endpoint you want to get a status for | [required] | ### Return type [**models::RequestStatusResponse**](RequestStatusResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## list_crm_schema_fields > models::ListSelectedFieldsResponse list_crm_schema_fields(integration_id, object_type) List Schema Fields (/v2/crm/entity-schema)

Retrieves a list of the object schema fields.

When accessed using a bearer token, this endpoint requires the scope 'api:crm:schema'.

Example

Request

GET https://api.gong.io/v2/crm/entity-schema?integrationId=6286478263646&objectType=ACCOUNT

Response

{ \"requestId\": \"afjkzqkqglog7ueki5\", \"objectTypeToSelectedFields\": { \"ACCOUNT\": [ { \"name\": \"accountTypePicklist\", \"label\": \"Account Type\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"accountTypePicklist2\", \"label\": \"Account Type2\", \"type\": \"PICKLIST\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null }, { \"name\": \"fooBar\", \"label\": \"Foo Bar\", \"type\": \"STRING\", \"lastModified\": null, \"isDeleted\": false, \"referenceTo\": null, \"orderedValueList\": null } ] }} ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **integration_id** | **i64** | Integration ID generated when creating the integration | [required] | **object_type** | **String** | Type of object to retrieve the schema fields for (case-sensitive).
Omitting this parameter returns the schema for all object types. | [required] | ### Return type [**models::ListSelectedFieldsResponse**](ListSelectedFieldsResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## list_generic_crm_integration > models::ListGenericCrmIntegrationsResponse list_generic_crm_integration() Get Generic CRM integration details (/v2/crm/integrations)

Returns the CRM integration you set up using the PUT /v2/crm/integrations endpoint. You can only have one integration at a time.

When accessed using a bearer token, this endpoint requires the 'api:crm:integrations:read' scope.

### Parameters This endpoint does not need any parameter. ### Return type [**models::ListGenericCrmIntegrationsResponse**](ListGenericCrmIntegrationsResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## register_generic_crm_integration > models::RegisterGenericCrmResponse register_generic_crm_integration(generic_crm_registration_request) Register a Generic CRM integration (/v2/crm/integrations)

Creates your CRM integration with Gong. Returns an integrationId, which should be used in requests to the CRM API to enable correct association of CRM data.

Multiple CRM integrations are not supported. To create a new integration, delete the old one first (DELETE /v2/crm/integrations).

This includes if you have integrated with Gong using one of the native CRM integrations such as HubSpot or Salesforce.

When accessed using a bearer token, this endpoint requires the 'api:crm:integration:register' scope.

### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **generic_crm_registration_request** | [**GenericCrmRegistrationRequest**](GenericCrmRegistrationRequest.md) | | [required] | ### Return type [**models::RegisterGenericCrmResponse**](RegisterGenericCrmResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## upload_crm_schema_field > models::BaseResponse upload_crm_schema_field(integration_id, object_type, generic_schema_field_request) Upload Object Schema (/v2/crm/entity-schema)

Enables you to add, edit or remove fields to Gong CRM entities, so that you can display additional CRM data in Gong. Fields that are not included in the Gong CRM objects, and are uploaded without updating your schema, are not displayed in Gong.

Update your schema when:

When updating your schema:

When accessed using a bearer token, this endpoint requires the 'api:crm:schema' scope.

Supported field types

This table describes the field types that can be added to your schema

Field typeFormat in JSONPossible values
BOOLEANbooleantrue, false
DATEstring (ISO-8601 date without time)\"2020-05-31\"
DATETIMEstring (ISO-8601 datetime without milliseconds)\"2020-12-17T07:37:21+02:00\"

\"2020-12-17T05:37:21Z\"

PICKLISTstring - one of the values in an orderedValueList\"Analyst\"
NUMBERnumber45.66, 8453
PERCENTnumber (between 0 to 100)67.3
CURRENCY*number34.68
PHONENUMBERstring\"+14055766687\"
EMAILADDRESSstring\"john.doe@anywhere.com\"
REFERENCEstring - the id of another object\"48b009drax\"
IDstring - the id of the object\"843hf8484jr84htg\"
STRINGstring\"whatever you want\"
URLstring\"https://crm.com/account/6d4r578f\"

* In the integration send a number value, and specify the correct currency symbol in the Gong UI. Currently Gong does not support multiple currencies per company.

Example

Request

POST https://api.gong.io/v2/crm/entity-schema?integrationId=6286478263646&objectType=ACCOUNT

[{\"uniqueName\": \"orderId\", \"label\": \"ID\", \"type\": \"ID\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},

{\"uniqueName\": \"parentAccount\", \"label\": \"Main Account\", \"type\": \"REFERENCE\", \"referenceTo\": \"ACCOUNT\", \"lastModified\": \"2020-11-11T08:11:34+01:00\"},

{\"uniqueName\": \"category\", \"label\": \"Category\", \"type\": \"PICKLIST\", \"orderedValueList\": [\"Analyst\", \"Competitor\", \"Customer\", \"Integrator\", \"Investor\", \"Partner\", \"Other\"], \"lastModified\": \"2020-11-11T08:11:34+01:00\"},

// remove custom field

{\"uniqueName\": \"industry\", \"isDeleted\": true, \"label\": \"Industry\", \"type\": \"PICKLIST\", \"lastModified\": \"2020-11-21T08:11:34+01:00\"}]

### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **integration_id** | **i64** | Integration ID generated when creating the integration | [required] | **object_type** | **String** | The object type to set the schema for (case-sensitive) | [required] | **generic_schema_field_request** | [**Vec**](GenericSchemaFieldRequest.md) | | [required] | ### Return type [**models::BaseResponse**](BaseResponse.md) ### Authorization [BasicAuth](../README.md#BasicAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)