> ## 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 statistiques vérification du téléphone : conversion, délais et dépenses

> Via l'API Didit, obtenez conversion, succès silencieux, délais de livraison et dépenses de vérification du téléphone par pays, canal ou jour.

L'API Phone Stats de Didit indique les dépenses en USD et l'activité des vérifications, messages ou recherches sur une plage de dates. Choisissez un regroupement pris en charge par le produit.

| Produit | Valeurs `group_by` autorisées | Métriques disponibles avec les dépenses |
| - | - | - |
| `verification` | `country`, `channel`, `network`, `line_type`, `day` | Conversion, succès silencieux, part sans code et centiles du délai de livraison |
| `messages` | `country`, `channel`, `day` | Conversion, taux de lecture et de réponse, et centiles du délai de livraison |
| `lookups` | `country`, `network`, `line_type`, `day` | Dépenses uniquement. Tous les taux et centiles du délai de livraison sont égaux à zéro. |

Un taux ou un centile pour un groupe sans événement vaut `0`, jamais `null`. Une date `to` à laquelle aucune fenêtre ne peut se terminer, par exemple `9999-12-31`, est refusée avec un `400` qui mentionne `to`. Pour voir ce que vous pouvez dépenser, consultez la [Phone Balance API](https://docs.didit.me/fr/standalone-apis/phone-balance.md).


## OpenAPI

````yaml fr/openapi-25.json GET /v3/phone/stats/
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/stats/:
    get:
      tags:
        - Standalone APIs
      summary: Conversion, delivery time and spend, grouped
      description: >-
        Read conversion, delivery times and spend in USD for the requested
        product and date range. Each entry in `rows` identifies its group in
        `key`. Choose a grouping supported by that product in `group_by`.


        For `verification`, read and reply rates are always `0`. For `messages`,
        silent success and code-free share are always `0`. For `lookups`, only
        spend applies, so all rates and delivery percentiles are `0`. A rate or
        percentile a group has no events for is `0`, never `null`.


        **Errors.** `400 invalid_product`: not a product this endpoint groups.
        `400 invalid_group`: not a grouping this product supports. `400
        stats_window_too_wide`: the range is longer than a year. `400` naming
        `to`: `to` is a date no window can end on, such as `9999-12-31`, the
        last date there is; the body is `{"to": ["to must be a date a window can
        end on, before 9999-12-31."]}`.


        A scoped API key needs `phone: read`.
      operationId: retrieve_phone_stats
      parameters:
        - name: product
          in: query
          required: false
          schema:
            type: string
            enum:
              - verification
              - messages
              - lookups
          description: The product to report on.
          example: verification
        - name: group_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - country
              - channel
              - network
              - line_type
              - day
          description: >-
            For `verification`, use `country`, `channel`, `network`, `line_type`
            or `day`. For `messages`, use `country`, `channel` or `day`. For
            `lookups`, use `country`, `network`, `line_type` or `day`. Defaults
            to `day`.
          example: network
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date
          description: The first day, as YYYY-MM-DD.
          example: '2026-10-22'
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date
          description: The last day, as YYYY-MM-DD, before `9999-12-31`.
          example: '2026-11-20'
      responses:
        '200':
          description: One entry per group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneStatsResponse'
              examples:
                Grouped by network:
                  summary: Two networks over a month
                  value:
                    rows:
                      - key: Mobile network A
                        conversion_rate: 0.94
                        silent_success_rate: 0.3572
                        code_free_share: 0.38
                        delivery_seconds:
                          p50: 2.1
                          p90: 6.4
                          p99: 12.8
                        read_rate: 0
                        reply_rate: 0
                        spend: '412.20'
                      - key: Mobile network B
                        conversion_rate: 0.88
                        silent_success_rate: 0.2728
                        code_free_share: 0.31
                        delivery_seconds:
                          p50: 3.4
                          p90: 8.1
                          p99: 15.2
                        read_rate: 0
                        reply_rate: 0
                        spend: '298.40'
        '400':
          description: >-
            `400 invalid_product`: not a product this endpoint groups. `400
            invalid_group`: not a grouping this product supports. `400
            stats_window_too_wide`: the range is longer than a year. `400`
            naming `to`: `to` is a date no window can end on, such as
            `9999-12-31`, the last date there is; the body is `{"to": ["to must
            be a date a window can end on, before 9999-12-31."]}`.
        '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.
        '429':
          $ref: '#/components/responses/RateLimitedRead'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/phone/stats/?product=verification&group_by=network&from=2026-10-22&to=2026-11-20'
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  schemas:
    PhoneStatsResponse:
      type: object
      required:
        - rows
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/PhoneStatsRow'
          description: One entry per group, in the requested grouping.
    PhoneStatsRow:
      type: object
      required:
        - key
        - conversion_rate
        - silent_success_rate
        - code_free_share
        - delivery_seconds
        - read_rate
        - reply_rate
        - spend
      description: One group of the filtered figures.
      properties:
        key:
          type: string
          description: 'The group: a country, channel, network, line type or day.'
          example: Mobile network A
        conversion_rate:
          type: number
          description: >-
            Approved verifications per verification started, or converted
            messages per delivered message. Zero for lookups.
          example: 0.94
        silent_success_rate:
          type: number
          description: >-
            Verifications approved without a code per verification started. Zero
            for messages and lookups.
          example: 0.3572
        code_free_share:
          type: number
          description: >-
            Share of approved verifications that needed no code. Zero for
            messages and lookups.
          example: 0.38
        delivery_seconds:
          $ref: '#/components/schemas/PhoneDeliverySeconds'
        read_rate:
          type: number
          description: >-
            Read messages per delivered message. Zero for verifications and
            lookups.
          example: 0
        reply_rate:
          type: number
          description: >-
            Inbound replies per delivered message in the same group and date
            range. Zero for verifications and lookups.
          example: 0
        spend:
          type: string
          description: Spend in USD.
          example: '412.20'
    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
    PhoneDeliverySeconds:
      type: object
      required:
        - p50
        - p90
        - p99
      description: Time from send to delivery, in seconds.
      properties:
        p50:
          type: number
          description: Median.
          example: 2.1
        p90:
          type: number
          description: 90th percentile.
          example: 6.4
        p99:
          type: number
          description: 99th percentile.
          example: 12.8
  responses:
    RateLimitedRead:
      description: Middleware read budget exceeded. Honor Retry-After before retrying.
      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'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitBudgetError'
          example:
            detail: >-
              GET request rate limit exceeded. You can make up to 600 requests
              per minute.
            reference: RL-00000000000040008000000000000001
            limit: 600
            remaining: 0
            reset: 1794358860
            window_seconds: 60
  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.