> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partners.inra.co.th/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a test callback

> Queue a signed `webhook.ping` to the configured URL (or `url`, whose
host must be registered). Check the outcome with `GET /v1/webhook`.



## OpenAPI

````yaml /openapi.json post /v1/webhook/test
openapi: 3.1.0
info:
  title: INRA Partners API
  description: >
    The INRA Partners API lets authorised partners search Thai companies and

    retrieve INRA database reports and offline investigations.


    Resource responses default to XML. Send `Accept: application/json` or

    `format=json` for JSON. `POST /oauth/token` is always JSON. Field names are

    `snake_case` in both formats. XML uses the namespace

    `https://partners.inra.co.th/schema/v1`.


    ## Environments


    | Environment | Base URL | Data |

    | --- | --- | --- |

    | Production | `https://partners.inra.co.th` | Live Thai-company data.
    Orders are real and may be billed. |

    | Sandbox | `https://partners-sandbox.inra.co.th` | Masked sample companies
    and reports. Nothing you do here creates an HQ order or a charge. |


    Credentials are not interchangeable between environments. In production,

    `company_id` is INRA's nine-digit `public_id`. The sandbox uses its own

    sample identifiers (for example `100001`).


    ## Getting started


    1. Request a `client_id` and `client_secret` from
    [inraasth@inra.co.th](mailto:inraasth@inra.co.th).
       They are issued out of band, not from this page.
    2. Call `POST /oauth/token` with HTTP Basic (`client_id` as the username,
       `client_secret` as the password) and `grant_type=client_credentials`.
    3. Send the access token as `Authorization: Bearer <token>` on `/v1` routes.
       The token is an RS256 JWT, is valid for 15 minutes, and has no refresh
       token. Verify it with `GET /.well-known/jwks.json`.
    4. Search with `GET /v1/companies`, then look up a company or order a
    report.


    Prefer the sandbox while you are integrating. A production

    `POST /v1/database-reports` or `POST /v1/offline-reports` can create a

    billable order.


    Human-written guides live at
    [docs.partners.inra.co.th](https://docs.partners.inra.co.th).
  version: 1.0.0
servers:
  - url: https://partners.inra.co.th
    description: Production
  - url: https://partners-sandbox.inra.co.th
    description: Sandbox
security: []
tags:
  - name: Authentication
    description: Issue and verify access tokens.
  - name: Companies
    description: Search Thai companies and read a company profile.
  - name: Reports
    description: Order a database report or an offline investigation.
  - name: Orders
    description: List orders, check status, and download a completed report.
  - name: Callbacks
    description: >-
      Inspect the callback INRA registered for your client, and send a test
      ping.
  - name: Dictionaries
    description: Reference lists used by coded report fields.
paths:
  /v1/webhook/test:
    post:
      tags:
        - Callbacks
      summary: Send a test callback
      description: |-
        Queue a signed `webhook.ping` to the configured URL (or `url`, whose
        host must be registered). Check the outcome with `GET /v1/webhook`.
      operationId: test_webhook_v1_webhook_test_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTestRequest'
        required: false
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTestResult'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Not Found
        '406':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Not Acceptable
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Too Many Requests
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          description: Service Unavailable
      security:
        - BearerAuth: []
        - OAuth2: []
components:
  schemas:
    WebhookTestRequest:
      additionalProperties: false
      properties:
        url:
          anyOf:
            - maxLength: 2048
              pattern: ^https://
              type: string
            - type: 'null'
          default: null
          title: Url
      title: WebhookTestRequest
      type: object
    WebhookTestResult:
      properties:
        event_id:
          type: string
          title: Event Id
        event_type:
          type: string
          title: Event Type
        status:
          type: string
          title: Status
        url:
          type: string
          title: Url
      additionalProperties: false
      type: object
      required:
        - event_id
        - event_type
        - status
        - url
      title: WebhookTestResult
    ErrorBody:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      additionalProperties: false
      type: object
      required:
        - error
      title: ErrorBody
      description: >-
        JSON envelope. XML renders ErrorDetail directly so the root element is
        error.
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        request_id:
          type: string
          title: Request Id
      additionalProperties: false
      type: object
      required:
        - code
        - message
        - request_id
      title: ErrorDetail
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        RS256 access token from `POST /oauth/token`. Send `Authorization: Bearer
        <token>`.
    OAuth2:
      type: oauth2
      description: OAuth 2.0 client credentials. The token is valid for 15 minutes.
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            companies:search: Search companies
            companies:read: Read a company profile
            reports:database: Order a database report
            reports:offline: Order an offline investigation
            orders:read: List and read orders, and download reports

````

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