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

> أبلغ عبر Didit عمّا إذا حوّل المستلم بعد الرسالة ومتى. تتبّع التحويل حسب القناة والقالب، بما في ذلك الرسائل التي لا يوجد لها إيصال تسليم.

واجهة Didit's Message Feedback API تسجّل ما إذا كان المستلم قد أجرى تحويلاً بعد الرسالة، ومتى حدث ذلك. أرسل `converted` أو `not_converted` لتتبّع النتائج حسب القناة والقالب في التحليلات. يقيس الرد الزمن المنقضي حتى الإجراء، ويُحسب من وقت التسليم، أو من وقت الإرسال عندما لا يتوفر إيصال تسليم.

تقبل الرسالة نتيجة واحدة فقط، وأي طلب ثانٍ لها يُرد عليه بالاستجابة `409 feedback_exists`. لتسجيل نتيجة التحقق من رقم الهاتف بدلاً من ذلك، راجع [مرجع API للتحقق من رقم الهاتف](https://docs.didit.me/ar/standalone-apis/phone-verification.md).


## OpenAPI

````yaml ar/openapi-25.json POST /v3/messages/{message_id}/feedback/
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/messages/{message_id}/feedback/:
    post:
      tags:
        - Messages
      summary: Report what the recipient did after a message
      description: >-
        Record what the recipient did after a message: `converted` or
        `not_converted`, and when. Analytics groups outcomes by channel and
        template. It measures time to the action from delivery, or from send
        time when there is no delivery receipt. One outcome per message: a
        second one answers `409 feedback_exists`.


        An `occurred_at` more than five minutes in the future returns `400` with
        an error on that field. If the application has no message with this ID,
        the API returns `404` with a `detail` message.


        A scoped API key needs `messages: write`.
      operationId: create_message_feedback
      parameters:
        - name: message_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The message's id, or the id of any of its attempts.
          example: 3f6c9a52-8d1e-4b7a-9c20-5e1f7a3b8d44
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageFeedbackRequest'
            examples:
              Converted:
                summary: The recipient acted four minutes after delivery
                value:
                  outcome: converted
                  occurred_at: '2026-11-21T10:04:00Z'
      responses:
        '202':
          description: The outcome is recorded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageFeedbackResponse'
              examples:
                Recorded:
                  summary: A conversion, four minutes after delivery
                  value:
                    message_id: 3f6c9a52-8d1e-4b7a-9c20-5e1f7a3b8d44
                    outcome: converted
                    conversion_seconds: 240
        '400':
          description: >-
            A feedback field failed validation. An `occurred_at` more than five
            minutes ahead of the service clock returns an error on
            `occurred_at`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  occurred_at:
                    type: array
                    items:
                      type: string
                additionalProperties:
                  type: array
                  items:
                    type: string
              example:
                occurred_at:
                  - occurred_at cannot be in the future.
        '401':
          description: The supplied API key is wrong, revoked or expired.
        '403':
          description: >-
            The `x-api-key` header is missing, the key is scoped and does not
            carry write access to `messages`, or the request came from outside
            the key's allowed IP addresses.
        '404':
          description: The application has no message with this ID.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    type: string
                    description: A message explaining that the message could not be found.
              example:
                detail: Not found.
        '409':
          description: '`409 feedback_exists`: this message already has an outcome.'
        '429':
          $ref: '#/components/responses/RateLimitedWrite'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/messages/3f6c9a52-8d1e-4b7a-9c20-5e1f7a3b8d44/feedback/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                  "outcome": "converted",
                  "occurred_at": "2026-11-21T10:04:00Z"
                }'
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:
    MessageFeedbackRequest:
      type: object
      required:
        - outcome
      properties:
        outcome:
          type: string
          enum:
            - converted
            - not_converted
          description: What the recipient did after the message.
          example: converted
        occurred_at:
          type: string
          format: date-time
          description: >-
            When the recipient acted. The timestamp can be up to five minutes
            ahead of the service clock. Omit it to use the time of the request.
          example: '2026-11-21T10:04:00Z'
    MessageFeedbackResponse:
      type: object
      required:
        - message_id
        - outcome
        - conversion_seconds
      properties:
        message_id:
          type: string
          format: uuid
          description: The message.
          example: 3f6c9a52-8d1e-4b7a-9c20-5e1f7a3b8d44
        outcome:
          type: string
          enum:
            - converted
            - not_converted
          description: As sent.
          example: converted
        conversion_seconds:
          type: integer
          description: >-
            Whole seconds from delivery to the action. If there is no delivery
            receipt, the interval starts at send time. An earlier action returns
            `0`. A message with neither timestamp, such as a scheduled message
            awaiting send, returns `null`.
          example: 240
          nullable: true
    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.