Skip to main content
PATCH
Edit Assignment Values
← Custom KPI Submit or update KPI values for a specific campaign-assignment. The current user must either be the data owner or hold the custom_kpi::manage_config permission. Values can be edited until the campaign is locked, even after its deadline. A locked campaign returns 409 CAMPAIGN_LOCKED.
A number_breakdown KPI you change must be resent with all its amounts, not only the edited one. The newest submission of a KPI is its whole answer, so a category left out of the edit is a category you cleared.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
UUID of the parent dataset
string
required
UUID of the campaign
string
required
UUID of the campaign-assignment

Body Parameters

array[object]
required
KPI values to submit (max 1000). One entry per KPI, except a number_breakdown KPI: one entry per category it answers. Two entries with the same kpi_id and option_id are rejected. Each entry:Only send the value field matching the KPI’s value_type (plus option_id for a number_breakdown amount).
array[string]
UUIDs of evidence files to attach. Replaces the current attachment pool — omit to leave attachments unchanged, send [] to clear them.

Response

Returns an array of saved KPI value objects (HTTP 200).
string
Value UUID.
string
Assignment UUID this value belongs to.
string | null
Response set UUID (for public form submissions). null for admin edits.
string
KPI UUID this value answers.
number | null
Numeric value (for number/percentage KPIs, or one category’s amount of a number_breakdown KPI).
string | null
Text value (for text KPIs).
string | null
Date value (for date KPIs, ISO 8601 date).
string | null
The chosen option of a select KPI, or the category this amount belongs to in a number_breakdown KPI.
string
When this value was submitted (ISO 8601).
string
Email of the user who submitted the value.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

422 Validation Error

Cause: Two entries for the same KPI (or the same category of a number_breakdown KPI)
Cause: Two entries with different option_ids for a KPI that is not a number_breakdown
Cause: option_id sent for a KPI without options
Cause: No values or attachments provided

Get Values

View submission history

Campaign Values

View all values across recipients