Update Survey Template ====================== +-----------------------------------------------------------------------+-------------------+-----------------+ | URL | Required Values | HTTP Methods | +=======================================================================+===================+=================+ | https://app.tingting.io/api/v1/survey-templates// | Template ID | PATCH | +-----------------------------------------------------------------------+-------------------+-----------------+ Partially updates a survey template. Only provided fields are changed. Supports both ``multipart/form-data`` and ``application/json``. Replace ```` with the template ID. Scenario A — Update name only ------------------------------ Sample Input: .. code-block:: json { "name": "Updated Survey Name" } Sample Response (200 OK): .. code-block:: json { "id": 3, "name": "Updated Survey Name", "voice": { "id": 5, "voice_display_name": "Rijan", "voice_internal_name": "np_rijan", "is_premium": false, "is_beta": false }, "length_factor": "1.00", "content": [ { "order": 0, "content_type": "say", "response_type": "dtmf", "input_name": "rating", "audio_file": null } ], "created_at": "2026-06-02T12:00:00Z" } Scenario B — Replace all steps and upload new audio ----------------------------------------------------- Sample Request (multipart/form-data): .. code-block:: text PATCH /api/v1/survey-templates/3/ Content-Type: multipart/form-data content=[{"order":0,"content_type":"play","response_type":"raw_record","input_name":"q1"},{"order":1,"content_type":"say","response_type":"dtmf","input_name":"q2"}] step_0_audio_file= step_1_audio_file= Scenario C — Change voice -------------------------- Sample Input: .. code-block:: json { "voice": { "voice_internal_name": "np_anita" } } .. note:: Voice language must match the user's account language. Sending a voice from a different language returns 400. **Error Response — Voice language mismatch (400 Bad Request):** .. code-block:: json { "voice": "This voice belongs to the 'si' language but your account language is 'np'. Please select a voice that matches your language." }