Upload target values

Prev Next
Post
/v2/targets/{targetId}/assignments

Adds or updates a target's values from a CSV file, so that the target values in Gong match the values in your own system. A business admin must create the target in Gong first. To find the target's ID, and the columns its file needs, use GET /v2/targets.

Each row in the file sets one target value: the goal for one user, one manager's team or one territory, in one period. If the target already has a value for the same user, team or territory and period, the row replaces its value. Gong adds the other rows as new target values. Target values that aren't in the file don't change.

Gong checks every row before it saves any of them. If any row has a problem, the response is 400 and Gong saves no rows. To check a file without saving it, set validateOnly to true.

The CSV file:

  • Separate the values with commas, and put the column names in the first row. Column names are case-sensitive.
  • The columns depend on the target's hierarchyType and type, from GET /v2/targets:
    • TEAM: Team member identifier, Is Team, Period, Value
    • TERRITORY: Territory identifier, Period, Value
    • CURRENCY targets also need a Currency column.
  • Team member identifier: the user's email address in Gong, or the user's 18-character CRM user ID.
  • Is Team: true for a manager's team target, false for the user's own target. Gong compares a team target with the combined results of the manager's direct reports. A manager who has both needs two rows.
  • Territory identifier: the 18-character CRM ID of a territory that Gong imported from Salesforce. Learn more about importing territories.
  • Period: a month, quarter or year of the company's fiscal calendar, written January FY2026, Q1 FY2026 or FY2026. Write month names in English, in full.
  • Value: a number, with no currency symbol or thousands separator.
  • Currency: a three-letter ISO 4217 currency code, such as USD. If the cell is empty, Gong uses the company's default currency. If the company hasn't turned on multiple currencies in Gong, the code must match the default currency.
  • Gong skips empty rows. Two rows can't set the same target value.

Required authorization scope: 'api:targets:write'.

Path parameters
targetId
integer (int64) Required

The Gong ID of the target to upload values to. Up to 20 digits. Use GET /v2/targets to look up target IDs.

Query parameters
workspaceId
integer (int64) Required

The ID of the workspace the target belongs to. Use the Workspaces API to look up workspace IDs.

validateOnly
boolean

Set to true to check the file without saving any target values.

Defaultfalse
Body parameters
object
file
string (binary) Required

The CSV file of target values. The file name must end in .csv. Up to 10,000 rows, not counting the column names, and up to 5 MB. The endpoint description lists the columns.

Responses
200

Every row passed the check. Unless validateOnly is true, Gong saved the target values.

object
requestId
string

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

Example4al018gzaztcr8nbukw
validateOnly
boolean

Indicates whether the request only checked the file. When true, Gong saved no target values.

processedRows
integer (int32)

The number of rows Gong checked, not counting the column names and empty rows. Unless validateOnly is true, Gong saved all of them.

Example42
400
  • The request doesn't include a workspace ID or a file.
  • A parameter has the wrong type or format. The error message names the parameter.
  • The file name doesn't end in .csv, or the file is larger than 5 MB.
  • The file has no data rows, or more than 10,000 rows.
  • A column is missing, or the file has a column that Gong doesn't accept for this target.
  • A row has a user or territory that Gong can't find, a period or value in the wrong format, or a currency code that isn't valid.
  • Two rows set the same target value.

When the file has problems, the response lists each problem with the rows where Gong found it. Gong saves no rows.

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
403

Access denied

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
404
  • No target in the workspace has the ID in the path.
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