Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Accept: application/json

  • Content-Type: application/json

  • X-Api-Key: YOUR_API_KEY (replace YOUR_API_KEY with your actual API key)

...

Path parameters

  • id (required): The unique identifier for the request type.

Example

...

cURL API call

Code Block
languagejson
curl -X POST "https://test.onboarding.namirial.app/api/v2/requestType/YOUR_REQUEST_TYPE_ID/webhookConfigurations" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
  "url": "https://your.domain/webhook",
  "authentication": {
    "headers": {
      "Authorization": "Bearer yourlistening-server-token",
      "API-Key": "yourlistening-server-api-key",
      "additionalProp3": "string",
      "additionalProp4": "string"
    },
    "client_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIH/TCCBeWgAwIBAgIQaBYE3/M08XHYCnNVmcFBcjANBgkqhkiG9w0BAQsFADBy\n...",
    "client_cert": "-----BEGIN CERTIFICATE-----\nMIIH/TCCBeWgAwIBAgIQaBYE3/M08XHYCnNVmcFBcjANBgkqhkiG9w0BAQsFADBy\n..."
  }
}'

Responses

  • 200 OK

    • Description: The webhook settings created.

    • Example Response:

      Code Block
      languagejson
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "url": "https://your.domain/webhook",
        "createdAt": "2024-10-22T12:19:12.269594Z"
      }
  • 400 Bad Request

    • Description: Bad Request described following Problem Details (RFC 9457).

    • Example Response:

      Code Block
      languagejson
      {
        "type": "about:blank",
        "status": 400,
        "title": "Request validation error",
        "detail": "The has a malformed body property.",
        "instance": "urn:uuid:123e4567-e89b-12d3-a456-426614174000?ts=1729667463",
        "retryable": false,
        "errors": [
          {
            "detail": "Property 'dummyField' is not defined in the schema and the schema does not allow additional properties.",
            "pointer": "/parameters/dummyField",
            "field": "dummyField",
            "reason": "additionalProperties"
          }
        ]
      }