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

# Aprobar verificación de teléfono con API: comprobación de código propia

> En Didit, marca una verificación de teléfono como verificada tras comprobar el código en tu backend, con el motivo registrado.

La API de Verificación de teléfono de Didit marca una verificación como verificada cuando tu backend comprueba el código que la API proporcionó al enviarlo. La verificación pasa a `verified` y se cuenta en Verificaciones, en las analíticas y en los eventos como cualquier otra. `reason` tiene como valor predeterminado `own_code_check`.

Una verificación que ya había finalizado devuelve `409 already_final`, y una cuyo plazo ya había vencido devuelve `410 expired`. Tu lista de bloqueo y tus reglas antifraude también se ejecutan al aprobar: si rechazan el número, la verificación termina como rechazada y la llamada devuelve `409 declined`. Solo se pueden modificar las verificaciones que tu aplicación inició con [enviar](https://docs.didit.me/es/standalone-apis/phone-send.md). Un paso de teléfono de una sesión de verificación alojada es de solo lectura aquí y devuelve `404 not_found`.


## OpenAPI

````yaml es/openapi-25.json POST /v3/phone/verifications/{verification_id}/approve/
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/verifications/{verification_id}/approve/:
    post:
      tags:
        - Phone
      summary: Mark a verification verified
      description: >-
        Mark a verification verified after your own code check. It counts in
        Verifications, Analytics and the events like any other verification, and
        `verified_by` is `api`. `reason` defaults to `own_code_check`. A
        verification that already ended returns `409 already_final`. Only
        verifications your application started with `POST /v3/phone/send/` can
        be changed here: a Phone step of a hosted verification session is
        read-only and returns `404 not_found`.
      operationId: postPhoneVerificationApprove
      parameters:
        - name: verification_id
          in: path
          required: true
          schema:
            type: string
            example: c9b18621-9f8f-4590-a3b4-f8ebea4baa7d
            format: uuid
          description: The verification.
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhoneVerificationApproveRequest'
            example:
              reason: own_code_check
        description: Why the verification is approved.
      responses:
        '200':
          description: The verification, verified.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneVerificationApproveResponse'
              example:
                verification_id: c9b18621-9f8f-4590-a3b4-f8ebea4baa7d
                status: verified
                verified_by: api
                verified_at: '2026-11-21T10:00:12Z'
        '400':
          description: '`invalid_reason`: `reason` is not `own_code_check`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneApproveReasonError'
              example:
                code: invalid_reason
                detail: reason is own_code_check.
        '401':
          description: 'The key is wrong, revoked or expired: `{"detail": ...}`.'
        '403':
          description: >-
            The `x-api-key` header is missing, or the key is scoped and does not
            carry write access to `sessions`: the answer is `{"detail": ...}`.
        '404':
          description: >-
            `not_found`: no verification with this id in your application, or a
            Phone step of a hosted verification session, which this endpoint
            cannot change.
        '409':
          description: >-
            `already_final`: the verification already ended (verified, blocked,
            cancelled or expired). `declined`: your blocklist or the fraud rules
            refused the number, so the verification ends declined instead of
            verified.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - detail
                properties:
                  code:
                    type: string
                    enum:
                      - already_final
                      - declined
                  detail:
                    type: string
              examples:
                already_final:
                  value:
                    code: already_final
                    detail: The verification already ended.
                declined:
                  value:
                    code: declined
                    detail: The fraud rules declined this verification.
        '410':
          description: >-
            `expired`: the window closed before you approved it. Start a new
            verification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneVerificationExpiredError'
              example:
                code: expired
                detail: The code expired.
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/phone/verifications/c9b18621-9f8f-4590-a3b4-f8ebea4baa7d/approve/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "reason": "own_code_check"
              }'
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:
    PhoneVerificationApproveRequest:
      type: object
      properties:
        reason:
          type: string
          description: >-
            own_code_check (default): your backend checked the code it sent with
            code.
          enum:
            - own_code_check
          default: own_code_check
          example: own_code_check
      description: Why the verification is approved.
      example:
        reason: own_code_check
    PhoneVerificationApproveResponse:
      type: object
      properties:
        verification_id:
          type: string
          description: The verification.
          example: c9b18621-9f8f-4590-a3b4-f8ebea4baa7d
          format: uuid
        status:
          type: string
          description: >-
            verified: it counts in Verifications, Analytics and the events like
            any other.
          enum:
            - verified
          example: verified
        verified_by:
          type: string
          description: 'api: your backend approved it.'
          enum:
            - api
          example: api
        verified_at:
          type: string
          description: When.
          format: date-time
          example: '2026-11-21T10:00:12Z'
    PhoneApproveReasonError:
      type: object
      description: The `reason` of an approval is not `own_code_check`.
      required:
        - code
        - detail
      properties:
        code:
          type: string
          enum:
            - invalid_reason
        detail:
          type: string
    PhoneVerificationExpiredError:
      type: object
      description: 'The verification''s window has closed: start a new verification.'
      required:
        - code
        - detail
      properties:
        code:
          type: string
          enum:
            - expired
        detail:
          type: string
    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.