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

# Telefonverifizierung Sandbox-Testnummern API

> Eigene Telefon-Testnummern in einer Didit-Sandbox-Anwendung registrieren: fester Code mit 4 bis 8 Ziffern, Ergebnis je Versand. Nie abgerechnet.

Didit's Phone Sandbox Test Numbers API definiert eine Testnummer in einer Sandbox-Anwendung: das Ergebnis, das sie ausgibt, wenn Sie [einen Code an sie senden](https://docs.didit.me/de/standalone-apis/phone-send.md), und den festen Code, den [Check Phone Code](https://docs.didit.me/de/standalone-apis/phone-check.md) akzeptiert. Ein Code hat 4 bis 8 Ziffern.

| Ergebnis | Antwort beim Senden | Antwort bei der Prüfung |
| - | - | - |
| `verified` | `Success` | `Approved` mit dem festen Code (jeder korrekt formatierte Code, wenn Sie keinen festlegen); bei einem falschen Code `Failed` und beim letzten Versuch `Declined` |
| `silent_fallback` | `Success` | Wie `verified`: der Code, auf den die stille Prüfung zurückgefallen ist |
| `silent_match` | `Success`, bereits genehmigt | `Approved` |
| `silent_mismatch` | `Success`, bereits abgelehnt | `Declined` |
| `not_delivered` | `Success`, bereits abgelehnt | `Declined` |
| `blocked` | `Blocked` | `Declined` |
| `expired` | `Success` | `Expired or Not Found` |

Nur eine hier registrierte Nummer erzeugt ein festgelegtes Ergebnis. Jede andere Nummer erhält eine simulierte Antwort zum Testen des Ablaufs Ihrer Integration. Verwenden Sie daher eine registrierte Testnummer, wenn Sie ein bestimmtes, wiederholbares Ergebnis benötigen.

Testnummern funktionieren nur in Sandbox-Anwendungen und werden niemals abgerechnet. Eine Live-Anwendung antwortet mit `403 sandbox_only`, und eine bereits registrierte Nummer antwortet mit `409 number_exists`.


## OpenAPI

````yaml de/openapi-25.json POST /v3/phone/sandbox/numbers/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags:
  - name: Bank Data
    description: >-
      Bank Link, connections, accounts, balances, transactions, institutions and
      coverage. One-time reads of real banks are open to live applications.
      Ongoing access with real banks is not open yet for live applications: it
      is available for sandbox applications with the Didit Test Bank, and opens
      country by country. Nothing is charged in sandbox. A call made with an API
      key needs a key that can reach Bank data: a full-access key can, and a
      scoped key needs `bank-data` in its scopes (read for reads, write for
      operations that change something). A scoped key without it is refused, and
      the call answers `403 bank_data_access_denied`. The account check is the
      exception: it needs write access to sessions, or full access, and not the
      Bank data scope. Raw bank data (accounts, balances, transactions and the
      change feed) also refuses a request that carries no API key.


      Every refusal under `/v3/bank/` except the account check's has the same
      JSON body (`code`, `message`, `request_id`, `field`, `next_action`,
      `retry_after`). A path that is not an operation, an id that is not a UUID
      or an unknown sub-resource answers `404 not_found` for every method, and
      any unexpected error answers `500 internal_error` with a `request_id`.
      Where Bank data is not available, every operation answers the platform's
      standard `404`, exactly as an unknown route does.
paths:
  /v3/phone/sandbox/numbers/:
    post:
      tags:
        - Standalone APIs
      summary: Add your own test number, its code and outcome
      description: >-
        Define a test number in the sandbox: what it answers when a code is sent
        to it, and what it accepts. `outcome` plays the result: `verified`,
        `not_delivered`, `blocked`, `expired`, `silent_match`, `silent_mismatch`
        or `silent_fallback`. To set a fixed code for `/v3/phone/check/`, send
        `code` as a string of 4 to 8 digits. An invalid format returns `400` at
        registration.


        A test number behaves this way in the sandbox only and is never billed.
        Set `real_device` to `true` to identify your own handset.


        **Errors.** `403 sandbox_only`: the key belongs to a Live application,
        where a test number could approve a real one for free. `409
        number_exists`: this number already has a test outcome.


        A scoped API key needs `phone: write`.
      operationId: create_phone_sandbox_number
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneSandboxNumberRequest'
            examples:
              Silent match:
                summary: A number whose silent check always matches
                value:
                  phone_number: '+34600000099'
                  outcome: silent_match
                  code: '000000'
              Own handset:
                summary: Register your own handset as a test number
                value:
                  phone_number: '+34600000123'
                  outcome: silent_match
                  real_device: true
      responses:
        '201':
          description: The test number is registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneSandboxNumberResponse'
              examples:
                Created:
                  summary: A number that plays a matching silent check
                  value:
                    number_id: 87c2ad92-1279-4f14-bdc4-33f74b945aef
                    outcome: silent_match
        '400':
          description: >-
            A required field is missing or a value is invalid. A supplied test
            code must contain 4 to 8 digits.
        '401':
          description: The supplied API key is wrong, revoked or expired.
        '403':
          description: >-
            The `x-api-key` header is missing, or the key has custom access:
            this operation needs the `phone` resource, which no custom key can
            carry, so only a key with full access reaches it, or the request
            came from outside the key's allowed IP addresses. `403
            sandbox_only`: the application is Live, so it cannot register test
            numbers.
        '409':
          description: >-
            `409 number_exists`: this test number exists. A registered test
            number keeps its outcome, so register a different test number to
            play another outcome.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/phone/sandbox/numbers/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                  "phone_number": "+34600000099",
                  "outcome": "silent_match",
                  "code": "000000"
                }'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional retry-safety key you choose for one operation, up to 255
        characters (a UUID works). A request repeated with the same key,
        endpoint, query and body is answered with the first response, same
        status and same body, and runs and bills nothing a second time. The same
        key with another endpoint, query or body returns `409`
        `idempotency_key_reused`, and while the first request is still running,
        `409` `idempotency_key_in_progress` with `Retry-After`. A failed request
        (any `4xx` or `5xx`) is not stored, so you can send it again with the
        same key. Keys belong to your application, whether you call with an API
        key or an access token. See [Retries and
        idempotency](/integration/api-errors#retries-and-idempotency).
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    PhoneSandboxNumberRequest:
      type: object
      required:
        - phone_number
        - outcome
      properties:
        phone_number:
          type: string
          maxLength: 20
          description: A fictional number, or your own handset with `real_device`.
          example: '+34600000099'
        outcome:
          type: string
          enum:
            - verified
            - not_delivered
            - blocked
            - expired
            - silent_match
            - silent_mismatch
            - silent_fallback
          description: >-
            What the number answers in the sandbox: a correct code, no delivery,
            a blocked number, an expired code, a silent check that matches, one
            that does not, or one that falls back to a code.
          example: silent_match
        code:
          type: string
          minLength: 4
          maxLength: 8
          pattern: ^[0-9]{4,8}$
          description: >-
            Fixed code accepted by `/v3/phone/check/` for this test number. Send
            4 to 8 digits as a string to preserve leading zeros.
          example: '000000'
        real_device:
          type: boolean
          description: Set to `true` to mark the test number as your own handset.
          example: false
    PhoneSandboxNumberResponse:
      type: object
      required:
        - number_id
        - outcome
      properties:
        number_id:
          type: string
          format: uuid
          description: The UUID of the registered sandbox number.
          example: 87c2ad92-1279-4f14-bdc4-33f74b945aef
        outcome:
          type: string
          description: What it plays.
          example: silent_match
    RateLimitBudgetError:
      type: object
      description: >-
        Returned only for a rate-limit middleware budget refusal. Other 429
        errors, including idempotency conflicts and endpoint-specific caps, do
        not promise these metadata fields.
      required:
        - detail
        - reference
        - limit
        - remaining
        - reset
        - window_seconds
      properties:
        detail:
          type: string
          description: Existing human-readable budget refusal message.
        reference:
          type: string
          pattern: ^RL-[0-9a-f]{32}$
          description: >-
            Opaque support reference: RL- followed by 32 lowercase UUID
            hexadecimal characters.
        limit:
          type: integer
          description: Budget for the exceeded scope; equals X-RateLimit-Limit.
        remaining:
          type: integer
          minimum: 0
          description: Remaining budget, clamped to zero; equals X-RateLimit-Remaining.
        reset:
          type: integer
          format: int64
          description: Window reset time in Unix seconds; equals X-RateLimit-Reset.
        window_seconds:
          type: integer
          description: >-
            Fixed-window duration in seconds, not the remaining wait. Honor
            Retry-After before retrying.
      example:
        detail: >-
          Write request rate limit exceeded. You can make up to 300 requests per
          minute.
        reference: RL-00000000000040008000000000000001
        limit: 300
        remaining: 0
        reset: 1794358860
        window_seconds: 60
  responses:
    RateLimitedWrite:
      description: >-
        The shared write limit of 300 requests per minute per API key was
        exceeded. Honor `Retry-After` before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitBudgetError'
          example:
            detail: >-
              Write request rate limit exceeded. You can make up to 300 requests
              per minute.
            reference: RL-00000000000040008000000000000001
            limit: 300
            remaining: 0
            reset: 1794358860
            window_seconds: 60
      headers:
        Retry-After:
          $ref: '#/components/headers/BudgetRetryAfter'
        X-RateLimit-Scope:
          $ref: '#/components/headers/BudgetXRateLimitScope'
        X-RateLimit-Limit:
          $ref: '#/components/headers/BudgetXRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/BudgetXRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/BudgetXRateLimitReset'
  headers:
    BudgetRetryAfter:
      description: >-
        Seconds to wait, rounded up to the next window. Present on middleware
        budget refusals.
      schema:
        type: integer
    BudgetXRateLimitScope:
      description: >-
        The scope whose budget was exceeded. Present on middleware budget
        refusals.
      schema:
        type: string
    BudgetXRateLimitLimit:
      description: >-
        Budget for the exceeded scope; equals body limit. Present on middleware
        budget refusals.
      schema:
        type: integer
    BudgetXRateLimitRemaining:
      description: >-
        Remaining budget, clamped to zero; equals body remaining. Present on
        middleware budget refusals.
      schema:
        type: integer
    BudgetXRateLimitReset:
      description: >-
        Reset time in Unix seconds; equals body reset. Present on middleware
        budget refusals.
      schema:
        type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your application's API key, from Developers -> API keys in the Business
        Console. The primary key has full access. A named key can be scoped:
        none, read or write per resource, limited to some workflows or to
        approved sessions, to a list of IP addresses, and to an expiry date. 401
        means the key is wrong, revoked or expired; 403 means no key was sent,
        the key has no access to this resource or action, or the request came
        from an address outside its IP list; 404 on a session route means the
        session is outside the key's workflows or statuses. A key without media
        access receives image, video and PDF URLs as null, and a key without
        sessions write receives session links and tokens as null. See
        https://docs.didit.me/console/api-keys.

````

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