Skip to content

Apply a refinement suggestion to the codebook

POST
/v2/refinement/apply
curl --request POST \
--url https://api.surveycoder.io/v2/refinement/apply \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "question_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "suggestion": {} }'

Applies a full suggestion object (typically one returned by POST /v2/refinement/suggestions). The suggestion payload carries both the action and any overrides — override_name/override_definition/ override_sentiment/override_category_id for create_new, plus an optional dismiss_reason. Non-UUID values for override_category_id are coerced to undefined server-side.

Media type application/json
object
project_id
required
string format: uuid
question_id
required
string format: uuid
suggestion
required

Full suggestion payload (action + optional overrides).

object
Example generated
{
"project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"question_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"suggestion": {}
}

Refinement applied