> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 설문지 업데이트 API: KYC 양식 수정

> Didit KYC 설문지를 수정하세요. 이름 변경, 순서가 있는 질문 교체, 다국어 라벨 갱신이 가능합니다. 프로그래밍 방식의 컴플라이언스 양식 관리, 호출당 과금.



Update Questionnaire API Prompt
        프롬프트를 클립보드에 복사



      
      

\<pre>

\`Update a simple Didit questionnaire through the Management API.

Endpoint:
PATCH https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/

Authentication:
Use the x-api-key header with my Didit API key.

Requirements:
\- Use PATCH and include only the fields I want to change.
\- To rename the questionnaire, send title or description only.
\- To change questions, send the full desired form_elements array. This replaces the existing question list.
\- Do not send graph, branches, next, required_if, or conditional logic.
\- Keep languages consistent with the questionnaire. Include en labels for every form element.
\- Capture the questionnaire_id returned by the response because published updates may return a new version id.

Example metadata update body:
\{
"title": "Updated Customer Onboarding"
}

Example full question replacement body:
\{
"form_elements": [
\{
  "id": "occupation",
  "element_type": "short_text",
  "label": { "en": "What is your occupation?" },
  "is_required": true
},
\{
  "id": "source_of_funds",
  "element_type": "multiple_choice",
  "label": { "en": "Source of funds" },
  "options": [
    \{ "value": "employment", "label": { "en": "Employment" } },
    \{ "value": "business", "label": { "en": "Business" } }
  ]
}
]
}

Build the API call, handle validation errors, and return the latest questionnaire_id from the response.`

\</pre>



      
      

붙여넣을 곳

`PATCH`를 사용해 부분 업데이트를 합니다. 설문지 이름을 바꾸려면 `title` 또는 `description`만 보내면 됩니다.```json theme={null}
{
  "title": "Updated Customer Onboarding"
}
```질문을 업데이트하려면 원하는 전체 `form_elements` 배열을 보내야 합니다. 이 배열은 기존 질문 목록을 대체합니다. 계속 표시하려는 기존 질문은 함께 포함하세요.```json theme={null}
{
  "form_elements": [
    {
      "id": "occupation",
      "element_type": "short_text",
      "label": { "en": "What is your occupation?" },
      "is_required": true
    },
    {
      "id": "source_of_funds",
      "element_type": "multiple_choice",
      "label": { "en": "Source of funds" },
      "options": [
        { "value": "employment", "label": { "en": "Employment" } },
        { "value": "business", "label": { "en": "Business" } }
      ]
    }
  ]
}
```v3 API는 단순한 선형 설문지만 지원합니다. `graph`, `branches`, `next`, 조건부 규칙이 포함된 요청은 거부됩니다.응답에는 `questionnaire_id`가 포함됩니다. `published` 상태의 설문지를 업데이트하면 API가 새 버전을 만들 수 있습니다. 반환된 `questionnaire_id`를 저장해 워크플로에서 사용하고, URL의 ID가 여전히 최신 버전이라고 가정하지 마세요.


## OpenAPI

````yaml ko/openapi-25.json PATCH /v3/questionnaires/{questionnaire_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 신분증 인증 API입니다. x-api-key 헤더로 인증합니다.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/questionnaires/{questionnaire_uuid}/:
    patch:
      tags:
        - Questionnaires
      summary: 설문지 업데이트
      description: >-
        설문지를 업데이트합니다. 버전 관리는 전송하는 `status` 필드와 해당 버전의 현재 상태에 따라 달라집니다. (1)
        **게시된(published)** 버전에 `status` 없음 → 게시된 버전이 해당 위치에서 직접 업데이트됨(동일한
        `questionnaire_id`, 동일한 `version`); (2) **임시 저장(draft)** 버전에 `status` 없음
        → 임시 저장 버전이 업데이트되고 즉시 게시됨; (3) **게시된** 버전에 `status: "published"` 지정 →
        동일한 `questionnaire_group_id` 아래에 새로운 게시 버전이 생성되어(새 `questionnaire_id`,
        `version` + 1) 반환되며 그룹의 기존 임시 저장 버전은 삭제됨; (4) `status: "draft"`는 임시 저장
        상태를 유지하지만(자동 저장), 이미 게시된 버전에서는 400 오류와 함께 거부됨(`"Cannot revert a
        published version to draft."`).
      operationId: update_questionnaire
      parameters:
        - name: questionnaire_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 업데이트할 설문지의 버전별 UUID입니다.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleQuestionnaireUpdateRequest'
            examples:
              Rename:
                summary: 설문지 이름 바꾸기
                value:
                  title: Updated Customer Onboarding
              Replace questions:
                summary: 전체 선형 질문 목록 대체
                value:
                  form_elements:
                    - id: occupation
                      element_type: short_text
                      label:
                        en: What is your occupation?
                      is_required: true
                    - id: source_of_funds
                      element_type: multiple_choice
                      label:
                        en: Source of funds
                      options:
                        - value: employment
                          label:
                            en: Employment
                        - value: business
                          label:
                            en: Business
      responses:
        '200':
          description: >-
            설문지가 업데이트되었습니다. 본문은 결과 버전의 최신 상태입니다. 제자리에서 업데이트된 버전이거나, 게시된 행에
            `status: "published"`를 전송했을 때 새로 생성된 게시 버전입니다(이 경우
            `questionnaire_id` 및 `version`은 패치한 값과 다릅니다). 응답의
            `questionnaire_id`는 버전별 UUID입니다. 안정적인 그룹 식별자가 필요한 경우
            `questionnaire_group_id`를 사용하십시오.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionnaireDetail'
        '400':
          description: >-
            유효성 검사 오류 — 알 수 없는 `element_type`, 번역 누락, 지원되지 않는 분기/조건부 필드,
            `languages`에 `en` 누락, `default_language`가 `languages`에 없음, 레이블이 없는
            옵션, 원시 `graph` 전송, 또는 게시된 버전에 `status: "draft"` 설정(`"Cannot revert a
            published version to draft."`). 응답 본문은 필드 이름을 키로 하는 DRF 유효성 검사
            오류입니다.
        '403':
          description: API 키가 누락되었거나 유효하지 않습니다.
          content:
            application/json:
              examples:
                Invalid token:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: 인증된 애플리케이션에 이 `questionnaire_uuid`를 가진 설문지가 존재하지 않습니다.
        '415':
          description: '지원되지 않는 미디어 유형입니다. `Content-Type: application/json`으로 설정하십시오.'
        '429':
          description: 속도 제한을 초과했습니다. 지수 백오프로 재시도하세요.
        '500':
          description: 예기치 않은 서버 오류가 발생했습니다. 안전하게 재시도할 수 있습니다.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X PATCH
            'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"title": "Updated Customer Onboarding"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.questionnaires.update(
                "11111111-2222-3333-4444-555555555555",
                title="Updated Customer Onboarding",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.questionnaires.update("11111111-2222-3333-4444-555555555555",
            {
              title: "Updated Customer Onboarding",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SimpleQuestionnaireUpdateRequest{\n\tTitle: didit.String(\"Updated Customer Onboarding\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.SimpleQuestionnaireUpdateRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.questionnaires().update("11111111-2222-3333-4444-555555555555",
            SimpleQuestionnaireUpdateRequest.builder()
                    .title("Updated Customer Onboarding")
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->questionnaires->update('11111111-2222-3333-4444-555555555555',
            [
                'title' => 'Updated Customer Onboarding',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.questionnaires.update(
              "11111111-2222-3333-4444-555555555555",
              title: "Updated Customer Onboarding"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Questionnaires.UpdateAsync("11111111-2222-3333-4444-555555555555",
            new SimpleQuestionnaireUpdateRequest

            {
                Title = "Updated Customer Onboarding",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SimpleQuestionnaireUpdateRequest:
      type: object
      description: 설문지 메타데이터를 업데이트하거나 전체 선형 `form_elements` 목록을 대체합니다.
      properties:
        title:
          type: string
        description:
          type: string
          nullable: true
        languages:
          type: array
          items:
            type: string
        default_language:
          type: string
        is_active:
          type: boolean
        status:
          type: string
          enum:
            - draft
            - published
        form_elements:
          type: array
          minItems: 1
          description: 제공된 경우 전체 선형 질문 목록을 대체합니다.
          items:
            $ref: '#/components/schemas/SimpleQuestionnaireElement'
    QuestionnaireDetail:
      type: object
      description: GET, POST(생성) 및 PATCH(업데이트) endpoint에서 반환되는 설문지 전체 세부정보입니다.
      properties:
        questionnaire_id:
          type: string
          format: uuid
          description: 설문지의 고유 식별자입니다. 워크플로에서 설문지를 참조하거나 이후 업데이트/삭제 요청 시 이 id를 사용합니다.
        title:
          type: string
        description:
          type: string
          nullable: true
        languages:
          type: array
          items:
            type: string
        default_language:
          type: string
        is_active:
          type: boolean
        is_simple_questionnaire:
          type: boolean
        graph:
          type: object
          description: start_node 및 노드 맵이 포함된 그래프 구조입니다.
        sections:
          type: array
          description: 섹션별로 그룹화된 설문지 내용(그래프에서 파생됨).
          items:
            type: object
        questionnaire_group_id:
          type: string
          format: uuid
          description: 동일한 설문지의 모든 버전을 그룹화하는 고정 식별자입니다.
        version:
          type: integer
        status:
          type: string
          enum:
            - draft
            - published
        published_at:
          type: string
          format: date-time
          nullable: true
        is_editable:
          type: boolean
          description: 설문지를 직접 계속 편집할 수 있는 경우 true입니다(초안 버전).
    SimpleQuestionnaireElement:
      type: object
      required:
        - element_type
        - label
      properties:
        id:
          type: string
          description: >-
            선택 사항인 안정적인 질문 ID입니다. 생략하면 API가 `q1`, `q2` 등을 생성합니다. 가독성을 위해 소문자,
            숫자, 밑줄을 사용하세요.
          example: source_of_funds
        element_type:
          type: string
          description: 질문 유형입니다. API는 이러한 소문자 값 및 이에 해당하는 대문자 값을 허용합니다.
          enum:
            - short_text
            - long_text
            - dropdown
            - single_choice
            - multiple_choice
            - number
            - image
            - file_upload
            - time
            - email
            - address
            - phone
            - country
            - date_picker
            - consent
            - section_header
            - separator
            - heading
            - paragraph
        label:
          type: object
          description: '언어 코드별 질문 라벨(예: `{ "en": "Source of funds" }`).'
          additionalProperties:
            type: string
        description:
          type: object
          nullable: true
          additionalProperties:
            type: string
        placeholder:
          type: object
          nullable: true
          additionalProperties:
            type: string
        is_required:
          type: boolean
          default: false
        options:
          type: array
          description: >-
            `dropdown`, `single_choice`, `multiple_choice`에 사용합니다. `value`를 생략하면
            API가 옵션 레이블을 기반으로 값을 생성합니다.
          items:
            type: object
            required:
              - label
            properties:
              value:
                type: string
              label:
                type: object
                additionalProperties:
                  type: string
        max_files:
          type: integer
          minimum: 1
          maximum: 5
          description: '`file_upload` 또는 `image`와 함께 사용합니다.'
        validation:
          type: object
          nullable: true
          description: >-
            `short_text`, `long_text` 또는 `number`에 대한 선택적 형식 유효성 검사입니다. 사용자가 필드를
            채우는 동안 적용되며(통과할 때까지 계속 진행할 수 없음), 제출 시 API를 통해 다시 확인됩니다.
          properties:
            pattern:
              type: string
              description: >-
                값이 완전히 일치해야 하는 정규식(ECMA-262 하위 집합)입니다. `short_text` 및
                `long_text`용입니다. ^/$ 앵커를 추가하지 마십시오. 전체 값과 일치합니다.
            min_length:
              type: integer
              minimum: 0
              description: 최소 글자 수입니다. `short_text` 및 `long_text`에 사용됩니다.
            max_length:
              type: integer
              minimum: 0
              description: 최대 문자 수입니다. `short_text` 및 `long_text`에 사용됩니다.
            min:
              type: number
              description: 최소 숫자 값입니다. `number`에 사용됩니다.
            max:
              type: number
              description: 최대 숫자 값입니다. `number`에 사용됩니다.
            error_message:
              type: object
              description: 검증 실패 시 표시되는 번역된 메시지이며, 언어 코드로 키가 지정됩니다.
              additionalProperties:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Business Console의 Developers -> API keys에서 발급받은 귀하 애플리케이션의 API 키입니다. 기본
        키는 전체 접근 권한을 갖습니다. 이름이 지정된 키는 리소스별 none, read, write 범위로 권한을 제한할 수 있으며
        특정 워크플로나 승인된 세션, IP 주소 목록, 만료일 등으로 제한할 수도 있습니다. 401은 키가 잘못되었거나 폐기되었거나
        만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스나 작업에 대한 접근 권한이 없거나, 요청이 허용된
        IP 목록 외부 주소에서 발생했음을 의미합니다. 세션 경로에서의 404는 해당 세션이 키의 허용 워크플로 또는 상태 범위를
        벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 비디오, PDF URL을 null로 수신하며, 세션 write
        권한이 없는 키는 세션 링크와 token을 null로 수신합니다.
        https://docs.didit.me/console/api-keys 를 참고하십시오.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.