> ## 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.

# Auth API 프로그래밍 방식 등록

> Auth API로 Didit 조직을 프로그래밍 방식으로 생성하세요. 브라우저 없이 에이전트에서 동작하며, 하위 계정 KYC 인프라를 구축하고 사용한 만큼만 지불하며 계약은 필요 없습니다.



프로그래밍 방식 등록 프롬프트
        프롬프트를 클립보드에 복사



      
      

\<pre>

\``Programmatically create a pending Didit account — step 1 of the two-step onboarding (no browser, no console).

Endpoint:
POST https://apx.didit.me/auth/v2/programmatic/register/

Authentication:
None. This is a public endpoint. (Don't confuse the Auth API host `apx.didit.me/auth/v2` with the verification host `verification.didit.me/v3`.)

Request body:
\- email (string, required) — Any real, deliverable email (personal, work, alias). The verification code is mailed synchronously, so reserved test domains (`@example.com`, `@example.org`, `@*.test`, `@*.example`, `@*.invalid`) get rejected by mail delivery and the call returns `500` — substitute the placeholder with an inbox you can read.
\- password (string, required) — Must satisfy ALL of: minimum 8 characters, ≥1 uppercase letter (A-Z), ≥1 lowercase letter (a-z), ≥1 digit (0-9), ≥1 special character from !@#$%^&*()_+-=[]{}|;:,.<>?. Rules are validated one at a time and the first failure short-circuits.

curl example (replace `you@yourdomain.com` with a real inbox):
curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \
-H "Content-Type: application/json" \
-d '{
"email": "you@yourdomain.com",
"password": "MyStr0ng!Pass"
}'

Response (201 Created):
\- message (string) — "Registration successful. Check your email for the verification code."
\- email (string) — echoed back.

What happens server-side:
\- A pending account is created (NOT usable yet).
\- A 6-character alphanumeric code (e.g. "A3K9F2") is emailed to the supplied address.
\- The code is valid for 15 minutes. After expiry the registration must be redone.

Failure modes (all 400 unless noted):
\- Field-level: { "email": ["Enter a valid email address."] } or { "password": ["Ensure this field has at least 8 characters."] }.
\- Password-strength failures CURRENTLY return as a BARE ARRAY (no field key), one rule at a time: ["Password must contain at least one uppercase letter."] / lowercase / digit / special character. Known server-side inconsistency — treat as { "password": [...] } client-side.
\- Duplicate email: { "detail": "An account with this email already exists." }
\- 429 — { "detail": "Too many registration attempts. Please try again later.", "wait": <seconds> } when more than 5 registrations from the same IP within an hour.
\- 500 — returned (with an HTML body, not JSON) when mail delivery to the supplied address fails synchronously. Most commonly triggered by reserved test domains; use a real inbox.

Rate limits:
5 registrations per IP per hour.

Next step:
After receiving the email, call POST https://apx.didit.me/auth/v2/programmatic/verify-email/ with { "email", "code" } to get your access_token and api_key — see /auth-api/verify-email.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.``

\</pre>



      
      

붙여넣을 곳



## OpenAPI

````yaml ko/openapi-auth.json POST /programmatic/register/
openapi: 3.0.0
info:
  version: 1.0.0
  title: Didit Auth API
  description: >-
    개발자와 AI 에이전트를 위한 프로그래밍 방식 등록 및 인증 API입니다. 브라우저 없이 API 호출 2번만으로 등록할 수 있습니다.
    에이전트 친화성이 가장 뛰어난 신원 인증 플랫폼입니다.


    ## 기본 URL


    이 사양의 모든 endpoint는 `https://apx.didit.me/auth/v2`에서 호스팅됩니다. 이는 인증
    API(`https://verification.didit.me/v3`)와는 다른 호스트입니다. 혼동하지 않도록 유의하십시오. 이 인증
    호스트는 **JWT 액세스 토큰**을 발급하며 **조직** 및 **애플리케이션**을 나열하고 관리할 수 있도록 합니다. 인증 호스트는 이
    API가 반환한 **`api_key`**로 인증하여 세션, 워크플로, AML 등을 호출하는 곳입니다.


    ## 인증 흐름 작동 방식


    1. `POST /programmatic/register/` — 이메일 + 비밀번호 제출.

    2. 이메일로 6자리 영숫자 코드 수신.

    3. `POST /programmatic/verify-email/` — 코드 제출. JWT `access_token`,
    `refresh_token`, 조직, 그리고 `client_id` + `api_key`가 포함된 기본 애플리케이션을 반환받습니다.

    4. `api_key`를 저장합니다. `https://verification.didit.me/v3/...`에 대한 모든 호출에
    `x-api-key`로 사용하십시오.

    5. 향후 다른 머신에서 `POST /programmatic/login/`으로 이메일 + 비밀번호를 새 JWT로 교환한 다음, `GET
    /organizations/me/` 및 애플리케이션 endpoint를 호출하여 자격 증명을 복구하거나 교체할 수 있습니다.


    JWT는 이 사양의 **계정 관리** endpoint에만 필요합니다. 인증 API 트래픽은 JWT가 아닌 장기 유효 `api_key`를
    사용합니다.


    ## 규칙


    - 모든 요청 및 응답 본문은 JSON(`Content-Type: application/json`)입니다.

    - **`POST /programmatic/register/`를 테스트할 때는 실제로 수신 가능한 이메일 주소를 사용하십시오.**
    endpoint가 인증 코드를 동기식으로 전송하므로 예약된 테스트 도메인(`@example.com`, `@example.org`,
    `@*.test`, `@*.example`, `@*.invalid`)의 주소는 메일 발송이 거부되어 요청에서 `500`이 반환됩니다.
    샘플의 `you@yourdomain.com` 플레이스홀더를 실제로 확인할 수 있는 수신함 주소로 대체하십시오.

    - 유효성 검사 오류는 두 가지 엔벨로프 형식 중 하나와 함께 HTTP `400`을 반환합니다. 필드 수준 문제의 경우
    `{"field": ["message", ...]}` 형식이고, 비즈니스 규칙 오류의 경우 `{"detail": "message"}`
    형식입니다. 소수의 검증기(등록 시 비밀번호 강도, 이메일 인증 시 코드 만료)는 현재 필드 키 형식 대신 기본 배열
    `["message"]`로 응답합니다. 이는 서버 측의 알려진 불일치 사항이므로 클라이언트 코드가 두 형태를 모두 수용하도록 작성해야
    합니다.

    - 인증 오류는 HTTP `401`(유효하지 않은 Bearer 토큰) 또는 `403`(Bearer 토큰 누락 / 권한 부족)과 함께
    `{"detail": "..."}` 형태로 반환됩니다.

    - 속도 제한 응답에는 대기 시간을 초 단위로 나타내는 `wait` 필드가 포함됩니다.
servers:
  - url: https://apx.didit.me/auth/v2
    description: 프로덕션 인증 서버
security: []
tags:
  - name: Programmatic Auth
    description: >-
      이메일 및 비밀번호 계정 라이프사이클: 가입, 인증, 로그인. 계정 관리 endpoint에 사용할 JWT `access_token`과
      (인증 완료 시) 첫 번째 애플리케이션의 `client_id` 및 `api_key`를 반환합니다.
  - name: Account Management
    description: >-
      조직 목록을 조회하고 애플리케이션을 생성, 조회 또는 업데이트하는 인증된 endpoint(JWT bearer)입니다. 검증 API
      호출에 인증하는 데 사용하는 `api_key`를 복구하거나 교체할 때 사용하십시오.
paths:
  /programmatic/register/:
    post:
      tags:
        - Programmatic Auth
      summary: 계정 등록
      description: >-
        프로그래밍 방식 온보딩의 1단계입니다. 대기 중인 계정을 생성하고 6자리 코드를 이메일로 발송합니다(TTL 10분). 계정이
        생성되기 전에 주소를 확인하며, 코드를 받을 수 없는 주소는 400 `email_undeliverable`을 반환합니다. 속도
        제한: IP당 시간당 5회, 네트워크별 시간당 공유 한도(IPv4의 경우 /24, IPv6의 경우 /64).
      operationId: programmatic_register
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
            examples:
              Gmail:
                summary: 개인 Gmail로 등록
                value:
                  email: you@yourdomain.com
                  password: MyStr0ng!Pass
              Work:
                summary: 회사 이메일로 등록
                value:
                  email: you@yourcompany.com
                  password: C0mplex#Pass1
      responses:
        '201':
          description: >-
            등록이 완료되었습니다. 제공된 주소로 6자 영숫자 인증 코드(예: `A3K9F2`)가 이메일로 전송되었으며 10분 동안
            유효합니다. 다음으로 `POST /programmatic/verify-email/`을 호출하십시오.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
              examples:
                Success:
                  value:
                    message: >-
                      Registration successful. Check your email for the
                      verification code.
                    email: you@yourdomain.com
        '400':
          description: >-
            유효성 검사 오류입니다. 의도된 봉투 형식은 필드 수준 오류의 경우 `{"field": ["..."]}`이고 비즈니스 규칙
            오류(예: 중복된 이메일)의 경우 `{"detail": "..."}`입니다. 비밀번호 강도 규칙은 현재 한 번에 하나의
            규칙씩 단순 배열 `["..."]`로 응답합니다. 이는 알려진 서버 측 불일치 문제이며 수정될 때까지
            `{"password": ["..."]}`로 처리하십시오. 해당 주소로 코드를 수신할 수 없는 경우(일회용, 예약됨 또는
            테스트 도메인, 메일 서버 없음, 오타 가능성, 또는 이전에 반송된 주소) 본문은 `code:
            "email_undeliverable"`을 포함하는 `EmailUndeliverableError`이며 계정이 생성되거나
            변경되지 않습니다.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/EmailUndeliverableError'
              examples:
                MissingFields:
                  summary: 빈 본문
                  value:
                    email:
                      - This field is required.
                    password:
                      - This field is required.
                InvalidEmail:
                  summary: 잘못된 형식의 이메일
                  value:
                    email:
                      - Enter a valid email address.
                PasswordTooShort:
                  summary: 8자 미만의 비밀번호
                  value:
                    password:
                      - Ensure this field has at least 8 characters.
                PasswordMissingUppercase:
                  summary: 비밀번호에 대문자가 누락됨
                  value:
                    - Password must contain at least one uppercase letter.
                PasswordMissingLowercase:
                  summary: 비밀번호에 소문자가 누락됨
                  value:
                    - Password must contain at least one lowercase letter.
                PasswordMissingDigit:
                  summary: 비밀번호에 숫자가 누락됨
                  value:
                    - Password must contain at least one digit.
                PasswordMissingSpecial:
                  summary: 비밀번호에 특수문자가 누락됨
                  value:
                    - >-
                      Password must contain at least one special character
                      (!@#$%^&*()_+-=[]{}|;:,.<>?).
                Duplicate:
                  summary: 이미 계정이 존재하는 이메일입니다
                  value:
                    detail: An account with this email already exists.
                EmailUndeliverable:
                  summary: 이메일을 수신할 수 없는 주소(일회용 도메인)
                  value:
                    detail: >-
                      This email can't receive messages. Please use a different
                      email address.
                    code: email_undeliverable
                    reason: disposable_domain
                EmailLikelyTypo:
                  summary: 도메인에 오타가 있을 가능성이 높음
                  value:
                    detail: >-
                      This email can't receive messages. Please use a different
                      email address.
                    code: email_undeliverable
                    reason: possible_typo
                    suggestion: gmail.com
        '429':
          description: >-
            속도 제한이 적용되었습니다. 지난 1시간 동안 동일한 IP에서 5회를 초과하는 등록 시도가 발생했거나 호출자의
            네트워크(IPv4의 경우 /24, IPv6의 경우 /64, 등록 및 코드 재전송이 공유)에 대한 시간당 한도가
            소진되었습니다. 두 경우 모두 `Retry-After: 3600`이 전달됩니다. 또한 서비스가 한 번에 확인할 수 있는
            최대 수량의 비밀번호나 코드를 일시적으로 확인하는 중일 때 `Retry-After: 5` 헤더와 함께 반환됩니다. 지정된
            초 수가 지난 후 재시도하세요.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
              examples:
                RateLimited:
                  value:
                    detail: Too many registration attempts. Please try again later.
                PasswordChecksBusy:
                  summary: 진행 중인 비밀번호 확인이 너무 많습니다
                  value:
                    detail: >-
                      Too many sign-in attempts are being processed right now.
                      Please try again in a few seconds.
      security:
        - {}
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \
              -H "Content-Type: application/json" \
              -d '{
                "email": "you@yourdomain.com",
                "password": "MyStr0ng!Pass"
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # This call needs no API key.
            client = Didit()

            result = client.account.register(
                email="you@yourdomain.com",
                password="MyStr0ng!Pass",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // This call needs no API key.
            const didit = new Didit();

            const result = await didit.account.register({
              email: "you@yourdomain.com",
              password: "MyStr0ng!Pass",
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Account.Register(ctx, didit.RegisterRequest{\n\tEmail:    \"you@yourdomain.com\",\n\tPassword: \"MyStr0ng!Pass\",\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.RegisterRequest;

            // This call needs no API key.
            Didit client = new Didit();

            var result = client.account().register(RegisterRequest.builder()
                    .email("you@yourdomain.com")
                    .password("MyStr0ng!Pass")
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // This call needs no API key.
            $didit = new DiditClient();

            $result = $didit->account->register([
                'email' => 'you@yourdomain.com',
                'password' => 'MyStr0ng!Pass',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # This call needs no API key.
            didit = Didit::Client.new

            result = didit.account.register(
              email: "you@yourdomain.com",
              password: "MyStr0ng!Pass"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // This call needs no API key.
            using var client = new DiditClient();

            var result = await client.Account.RegisterAsync(new RegisterRequest
            {
                Email = "you@yourdomain.com",
                Password = "MyStr0ng!Pass",
            });
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    RegisterRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          type: string
          format: email
          description: 유효한 이메일 주소(개인용, 업무용, 별칭 등)입니다. 고유한 계정 식별자로 사용됩니다.
          example: you@yourdomain.com
        password:
          type: string
          minLength: 8
          description: >-
            최소 8자입니다. 대문자(`A-Z`), 소문자(`a-z`), 숫자(`0-9`), 특수
            문자(`!@#$%^&*()_+-=[]{}|;:,.<>?`)를 각각 최소 하나 이상 포함해야 합니다. 유효성 검사는 실패한
            규칙을 한 번에 하나씩 보고합니다.
          example: MyStr0ng!Pass
    RegisterResponse:
      type: object
      properties:
        message:
          type: string
          description: 인증 코드가 전송되었음을 사람이 읽을 수 있는 형식으로 확인하는 메시지입니다.
          example: Registration successful. Check your email for the verification code.
        email:
          type: string
          format: email
          description: 인증 코드가 전송된 이메일 주소입니다.
          example: you@yourdomain.com
    ValidationError:
      description: >-
        검증 오류 본문. 의도된 엔벨로프는 필드 수준 오류의 경우 `{field: ["message", ...]}` 맵이거나 비즈니스
        규칙 오류의 경우 `{detail: "..."}` 단일 키 엔벨로프입니다. 소수의 검증기(회원가입 시 비밀번호 강도,
        verify-email 시 코드 유효성)는 현재 단순 배열 `["message"]`로 응답합니다(알려진 서버 측 불일치). 아래
        스키마는 이 사양에서 생성된 클라이언트 코드가 현재 응답을 역직렬화할 수 있도록 해당 단순 배열 분기를 유지하지만, 새로운
        클라이언트 코드는 이를 관련 필드 키 형식(`{password: [...]}` 또는 `{code: [...]}`)으로 처리해야
        하며 향후 서버 규약도 해당 형태로 통일될 예정입니다.
      oneOf:
        - type: object
          additionalProperties:
            type: array
            items:
              type: string
          example:
            email:
              - Enter a valid email address.
        - type: object
          properties:
            detail:
              type: string
          example:
            detail: An account with this email already exists.
        - type: array
          items:
            type: string
          example:
            - Invalid or expired verification code.
    EmailUndeliverableError:
      type: object
      description: >-
        주소에서 인증 코드를 받을 수 없을 때 `POST /programmatic/register/`에 의해 반환됩니다. 계정이
        생성되거나 변경되기 전에 확인이 실행되므로 아무것도 남지 않습니다.
      required:
        - detail
        - code
        - reason
      properties:
        detail:
          type: string
          description: 사람이 읽기 쉬운 메시지입니다.
          example: >-
            This email can't receive messages. Please use a different email
            address.
        code:
          type: string
          enum:
            - email_undeliverable
          description: 항상 `email_undeliverable`입니다.
        reason:
          type: string
          enum:
            - invalid_address
            - reserved_domain
            - no_mail_records
            - disposable_domain
            - possible_typo
            - suppressed
          description: >-
            주소가 거부된 이유: `invalid_address`(유효하지 않은 주소),
            `reserved_domain`(`example.com`과 같은 예약된 도메인 또는 테스트 도메인),
            `no_mail_records`(도메인에 메일 서버가 없음), `disposable_domain`(일회용 메일 서비스
            제공업체), `possible_typo`(일반적인 제공업체의 철자 오류 가능성, `suggestion` 참조),
            `suppressed`(이전에 반송되었거나 불만이 제기된 주소).
        suggestion:
          type: string
          description: >-
            도메인에 오타가 있는 것으로 보일 때만 표시되는 의도했을 가능성이 높은 도메인입니다(예: `gmial.com`에 대한
            `gmail.com`). API는 확인을 허용하지 않으므로 수정된 주소로 다시 등록하십시오.
          example: gmail.com
    RateLimitError:
      type: object
      description: 속도 제한 또는 점진적 잠금 응답입니다. `wait`는 초 단위의 대기 시간입니다.
      properties:
        detail:
          type: string
          example: >-
            Too many login attempts from this IP address. Please wait before
            trying again.

````

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