Create a subscription Experimental

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developers.praxedo.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "public-rest-apis MCP server": {
    "url": "https://developers.praxedo.com/mcp"
  }
}

Close
POST /rest/ws/webhooks/v1/subscriptions

Creates a new webhook subscription for specified event types.

application/json

Body Required

Request payload to create a webhook subscription.

  • callback object Required
    Hide callback attributes Show callback attributes object
    • url string(uri) Required

      The callback endpoint to receive the webhook notifications.

      Maximum length is 2000.

    • secret string

      The secret that will be included in the callback to verify authenticity.

      Maximum length is 512.

    • headers array[object]

      Custom headers that will be included in the callback request.

      Hide headers attributes Show headers attributes object
      • name string Required

        The name of the custom header to send in the callback. Must follow the pattern 'x-pxo-{custom_name}'. It is required if a header object is present in the headers array. The header name must be unique in the list.

        Maximum length is 40. Format should match the following pattern: x-pxo-{custom_header_name}.

      • value string

        The value of the custom header to send with the callback.

        Maximum length is 512.

  • eventTypes array[object] Required

    List of event types the subscription should listen to.

    Hide eventTypes attribute Show eventTypes attribute object
    • name string Required

      The type of event to subscribe to. For example workorder.validation (sent when a work order is validated, which often triggers the invoicing process in the customer ERP/CRM).

      Values are workorder.validation, workorder.deletion, or asset.upsert.

Responses

  • 201 application/json

    Subscription successfully created

    Hide response attributes Show response attributes object
    • id string Required

      the id of the created subscription

    • eventTypes array[object] Required
      Hide eventTypes attribute Show eventTypes attribute object
      • name string Required

        The type of event to subscribe to. For example workorder.validation (sent when a work order is validated, which often triggers the invoicing process in the customer ERP/CRM).

        Values are workorder.validation, workorder.deletion, or asset.upsert.

  • 400 application/json

    The subscription creation request is not correctly formatted. Subscription not created.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 401 application/json

    Unauthorized - authentication issue.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 422 application/json

    Syntax is correct, but unable to create the given subscription. Subscription not created.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 429 application/json

    Too Many Requests.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 500 application/json

    Internal server error.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

POST /rest/ws/webhooks/v1/subscriptions
curl \
 --request POST 'https://ws-eu1.praxedo.com/rest/ws/webhooks/v1/subscriptions' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[
  {
    "callback": {
      "url": "https://callback.example.com/webhooks",
      "secret": "z0nstsmkmrvve4nzc26pu3ky80zsdorlh",
      "headers": [
        {
          "name": "x-pxo-custom_header_name_1",
          "value": "value of the custom header 1"
        },
        {
          "name": "x-pxo-custom_header_name_2",
          "value": "value of the custom header 2"
        }
      ]
    },
    "eventTypes": [
      {
        "name": "workorder.deletion"
      }
    ]
  }
]'
Request examples
[
  {
    "callback": {
      "url": "https://callback.example.com/webhooks",
      "secret": "z0nstsmkmrvve4nzc26pu3ky80zsdorlh",
      "headers": [
        {
          "name": "x-pxo-custom_header_name_1",
          "value": "value of the custom header 1"
        },
        {
          "name": "x-pxo-custom_header_name_2",
          "value": "value of the custom header 2"
        }
      ]
    },
    "eventTypes": [
      {
        "name": "workorder.deletion"
      }
    ]
  }
]
[
  {
    "callback": {
      "url": "https://callback.example.com/webhooks"
    },
    "eventTypes": [
      {
        "name": "workorder.deletion"
      }
    ]
  }
]
[
  {
    "callback": {
      "url": "https://callback.example.com/webhooks",
      "secret": "z0nstsmkmrvve4nzc26pu3ky80zsdorlh"
    },
    "eventTypes": [
      {
        "name": "workorder.deletion"
      }
    ]
  }
]
Response examples (201)
[
  {
    "id": "abcdefghijklmnopqrstuvwxyz",
    "eventTypes": [
      {
        "name": "workorder.deletion"
      }
    ]
  }
]
Response examples (400)
[
  {
    "errors": [
      {
        "code": "subscription.missing.body",
        "message": "The request body is mandatory."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.property.missing",
        "message": "The callback property is mandatory."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.property.missing",
        "message": "The callback.url property is mandatory."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.property.missing",
        "message": "The eventTypes property is mandatory."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.eventtypes.size",
        "message": "The eventTypes list cannot be empty."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.eventtypes.size",
        "message": "The eventTypes list cannot exceed 3 elements."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.eventtypes.invalid",
        "message": "The eventType 'DUMMY' is not valid."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The format of property callback.url is not valid. It should be a secure url."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The property callback.url should not exceed 2000 characters."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The property callback.secret should not exceed 512 characters."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The property callback.headers.name should not exceed 40 characters."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The property callback.headers.value should not exceed 512 characters."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The format of property callback.headers.name is invalid. It should be 'x-pxo-{custom_name}'"
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.property.missing",
        "message": "The name of property callback.headers.name is missing."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
[
  {
    "errors": [
      {
        "code": "subscription.callback.format",
        "message": "The property callback.headers has duplicate names."
      }
    ],
    "errorReference": "abcdefghijklmnopqrstuvwxyz0123456789"
  }
]
Response examples (401)
{
  "errors": [
    {
      "code": "unauthorized.nocredentials",
      "message": "No credentials."
    }
  ],
  "errorReference": "f939c6b8c15045c9a70f500fdb570555"
}
{
  "errors": [
    {
      "code": "unauthorized.badcredentials",
      "message": "Bad Credentials."
    }
  ],
  "errorReference": "f1028f99811b422eb21f5ff176664069"
}
Response examples (422)
[
  {
    "errors": [
      {
        "code": "subscription.max.size",
        "message": "Maximum of subscription reached."
      }
    ],
    "errorReference": "f1028f99811b422eb21f5ff176664069"
  }
]
Response examples (429)
{
  "errors": [
    {
      "code": "ratelimiter.toomanyrequest",
      "message": "Rejected because of the rate limit definition."
    }
  ],
  "errorReference": "973326230a3f44daba6cc34a5939b4fb"
}
Response examples (500)
{
  "errors": [
    {
      "code": "internal.server.error",
      "message": "Something went wrong."
    }
  ],
  "errorReference": "6377010431314bf6b0b95ec4d32ddae0"
}