Add a call

Prev Next
Post
/v2/calls

Adds a call to Gong and returns its callId.

To add the recording, provide a downloadMediaUrl in this request. Or upload the file afterwards with the Upload call media endpoint (PUT /v2/calls/{id}/media), and send the callId as id.

For a stereo recording, use parties[].mediaChannelId to specify which channel the primaryUser is on. Gong uses it to tell the primaryUser's speech apart from the other participants'.

downloadMediaUrl must link directly to the media file, and Gong must be able to download it without signing in. Gong checks the link when you add the call. If the download fails after that, the call is added without its recording.

Required authorization scope: 'api:calls:create'.

Body parameters
Expand All
object

The call to add.

clientUniqueId
string Required

The call's ID in the system that recorded it, such as a telephony system or PBX. Must be unique in the company. Gong uses it to prevent the same call from being added twice. Up to 2048 characters.

Min length0
Max length2048
Example123abc
title
string

The title of the call. Up to 1024 characters.

ExampleExample call
purpose
string

The purpose of the call. Up to 255 characters.

Min length0
Max length255
ExampleDemo Call
scheduledStart
string

The date and time the call was scheduled to start. Can't be in the future. Use ISO-8601 format, in UTC (Z) or with a timezone offset such as -07:00.

Example2018-02-17T02:30:00-08:00
scheduledEnd
string

The date and time the call was scheduled to end. Can't be before scheduledStart. Use ISO-8601 format, in UTC (Z) or with a timezone offset such as -07:00.

Example2018-02-19T02:30:00-08:00
actualStart
string Required

The date and time the call started. Can't be in the future. Use ISO-8601 format, in UTC (Z) or with a timezone offset such as -07:00.

Example2018-02-17T02:30:00-08:00
duration
number (float)

The duration of the call, in seconds. Can be a decimal number. The minimum is 1.

Example125.8
parties
Array of object (CallParticipant) Required

The participants in the call. Must include a party for the primaryUser, with their Gong user ID in userId. Every other party needs at least a phoneNumber, emailAddress or name.

Min items1
Max items2147483647
object

A participant in the call.

phoneNumber
string

The phone number of the participant.

Example+1 123-567-8989
emailAddress
string

The email address of the participant.

Exampletest@test.com
name
string

The name of the participant.

ExampleTest User
partyId
string

Your ID for the participant, used to match them to speech segments in speakersTimeline. Required when you provide speakersTimeline. Must be unique within the call.

Example1
mediaChannelId
integer (int32)

The audio channel the primaryUser is on, in a stereo recording. Set it in the primaryUser's entry in parties[]. Accepted values: 0 (left), 1 (right).

Minimum0
Maximum1
Example0
context
Array of object (PartyUploadContext)

The participant's objects in external systems, such as their CRM contact or lead. Without them, Gong matches the participant by phone number, which can link the call to several leads that share the number.

object

An external system, such as a CRM, with the objects to link to the person.

system
string Required

The external system the objects are in. Accepted values: Salesforce, Generic.

Valid values[ "Salesforce", "HubSpot", "MicrosoftDynamic", "Generic" ]
ExampleSalesforce
objects
Array of object (ExternalCrmPartyObject)

The objects in the external system.

object

An object in an external system to link to the person, such as a CRM contact or lead.

objectType
string Required

The type of the object within the external system. Accepted values: Lead, Contact, Account, Opportunity, User. Applies to participants from outside the company.

Valid values[ "Lead", "Contact", "Account", "Opportunity", "User", "Lead,Contact" ]
ExampleContact
objectId
string Required

The ID of the object in the external system. For Salesforce, the 15-character and the 18-character ID are both accepted.

Example0013601230sV7grAAC
fields
Array of object (CrmPartyContextField)

Reserved for future use.

object

A field of an object in an external system, with its value.

name
string

The name of the field.

Examplename
value
object

The value of the field.

ExampleGong Inc.
userId
string

The Gong user ID of the participant, if the participant is a Gong user.

Example234599484848423
direction
string Required

The direction of the call. Accepted values: Inbound (someone called the company), Outbound (a user called someone outside the company), Conference, Unknown.

Valid values[ "Inbound", "Outbound", "Conference", "Unknown" ]
disposition
string

The disposition of the call, such as "No answer" or "Left voicemail". Up to 255 characters.

Min length0
Max length255
ExampleNo Answer
context
Array of object (CallUploadContext)

The call's objects in external systems, such as the CRM account and opportunity.

object

An external system, such as a CRM, with the objects to link to the call or event.

system
string Required

The external system the objects are in. Accepted values: Salesforce, Generic.

Valid values[ "Salesforce", "HubSpot", "MicrosoftDynamic", "Generic" ]
ExampleSalesforce
objects
Array of object (ExternalCrmCallObject)

The objects in the external system. Don't send more than one opportunity from the same account.

object

An object in an external system to link to the call, such as a CRM account or opportunity.

objectType
string Required

The type of the object within the external system. Accepted values: Opportunity, Account, Lead, Contact, User.

Valid values[ "Opportunity", "Account", "Lead", "Contact", "User", "Opportunity,Account" ]
ExampleAccount
objectId
string Required

The ID of the object in the external system. For Salesforce, the 15-character and the 18-character ID are both accepted.

Example0013601230sV7grAAC
fields
Array of object (ContextField)

Reserved for future use.

object

A field of an object in an external system, with its value.

name
string

The name of the field.

Examplename
value
object

The value of the field.

ExampleGong Inc.
customData
string

Text you want to store with the call. Returned as customData in the call's metadata (GET /v2/calls, GET /v2/calls/{id}).

ExampleOptional data
speakersTimeline
object (SpeakersTimeline)

Who spoke when in the recording.

precise
boolean

Set to true to tell Gong that the speech segments match the recording to within 100 milliseconds. Otherwise, Gong refines them based on the recording.

Exampletrue
speechSegments
Array of object (SpeechSegment)

The speech segments: when each participant spoke.

object

A speech segment: when one participant spoke.

fromTime
integer (int32) Required

The start of the segment, in milliseconds from the start of the call.

Minimum0
Example5100
toTime
integer (int32) Required

The end of the segment, in milliseconds from the start of the call. Must be later than fromTime.

Minimum0
Example24000
partyIds
Array of string Required

The partyId values of the participants speaking in the segment. Each must match a partyId in parties. Segments can overlap: list several speakers in one segment, or send overlapping segments with one speaker each.

Example[ "1" ]
string

The speaking parties in the segment, each must have a correlating partyId within 'parties'. It is allowed to provide overlapping segments, i.e. you can either specify multiple speakers in a segment or send several overlapping segments each marked with one speaker.

Example["1"]
meetingUrl
string

The URL of the web conference the call was held in. Gong uses it to identify the conferencing system, so if you also provide callProviderCode, the two must match.

Examplehttps://www.conference.com/john.smith
callProviderCode
string

The code of the conferencing or telephony system the call was made in. Gong sets the codes. Contact Gong Support for the code of your system. Without it, the call's source shows as Upload API in Gong, unless Gong identifies the system from meetingUrl.

Exampleclearslide
downloadMediaUrl
string

The URL of the recording file, for Gong to download. Provide it, or upload the file afterwards with PUT /v2/calls/{id}/media. Don't use both. Must be unique in the company. Accepted formats: WAV, MP3, MP4, MKV, FLAC. The file can be up to 1.5GB. Its content type must start with audio or video, or be application/octet-stream or binary/octet-stream.

Examplehttps://upload-server.com/sample-call.mp3
workspaceId
string

The ID of the workspace to add the call to. If not provided, Gong adds the call to the home workspace of the user specified by primaryUser.

Example623457276584334
languageCode
string

The language spoken in the call, for transcription. Gong detects the language automatically. Provide it if you're sure of the language. Accepted values: af-ZA, am-ET, ar-AE, ar-BH, ar-DZ, ar-EG, ar-IL, ar-IQ, ar-JO, ar-KW, ar-LB, ar-MA, ar-MR, ar-OM, ar-PS, ar-QA, ar-SA, ar-TN, ar-YE, az-AZ, bg-BG, bn-BD, bn-IN, bs-BA, ca-ES, cs-CZ, da-DK, de-AT, de-CH, de-DE, el-GR, en-AB, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-PH, en-SG, en-US, en-WL, en-ZA, es-AR, es-BO, es-CL, es-CO, es-CR, es-DO, es-EC, es-ES, es-GT, es-HN, es-MX, es-NI, es-PA, es-PE, es-PR, es-PY, es-SV, es-US, es-UY, et-EE, eu-ES, fa-IR, fi-FI, fil-PH, fr-BE, fr-CA, fr-CH, fr-FR, gl-ES, gu-IN, he-IL, hi-IN, hr-HR, hu-HU, hy-AM, id-ID, is-IS, it-CH, it-IT, ja-JP, jv-ID, ka-GE, kk-KZ, km-KH, kn-IN, ko-KR, lo-LA, lt-LT, lv-LV, mk-MK, ml-IN, mn-MN, mr-IN, ms-MY, my-MM, ne-NP, nl-BE, nl-NL, no-NO, pa-Guru-IN, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, si-LK, sk-SK, sl-SI, sq-AL, sr-RS, su-ID, sv-SE, sw-KE, sw-TZ, ta-IN, ta-LK, ta-MY, ta-SG, te-IN, th-TH, tr-TR, uk-UA, ur-IN, ur-PK, uz-UZ, vi-VN, yue-Hant-HK, zh-CN, zh-TW, zu-ZA

flowContext
object (FlowContext)

The Engage task to link the call to.

taskId
string

The Gong ID of the task.

Example714366367493425
primaryUser
string Required

The Gong user ID of the call owner. The user must be active and have recording or telephony call import turned on.

Example234599484848423
Responses
200

Successful response

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
callId
string

The Gong ID of the new call. To upload its recording, send it as id to PUT /v2/calls/{id}/media.

Example7782342274025937895
400
  • The request body isn't valid JSON.
  • A required field is missing, or a value has the wrong type or format. The error message names the field.
  • primaryUser isn't the ID of a user in the company.
  • A call with the same clientUniqueId was already added.
  • A call with the same downloadMediaUrl was already added.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
401
  • The API key or access token is missing or isn't valid.
  • The integration uses OAuth, and its token doesn't have the scope this endpoint requires. The error message names the scope.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
409
  • The user in primaryUser isn't active.
  • Neither recording nor telephony call import is turned on for the user in primaryUser.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
415
  • downloadMediaUrl doesn't return a supported media type.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
429
  • 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
integer (int32)
The number of seconds to wait before you send the request again.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
500
  • 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.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string