← Back to documentation

HTTP Methods and Payload Formats

Select a method and payload format that the sender can use.

3 min read

Use this guide to match sender requests to the acceptance rules of an endpoint.

Purpose#

This guide explains:

  • The methods that an endpoint accepts.
  • How PayloadRelay handles each payload format.
  • The feature limits for the no-body mode and the text payload mode.

Before you start#

  • Access to the endpoint create page and the endpoint edit page.
  • Knowledge of the method and the content type of the sender.

Procedure#

1. Choose accepted HTTP method#

Available values:

  • ANY
  • GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE

Use these rules:

  • New webhook endpoints use POST and JSON by default.
  • Use one specific method. Use ANY only if the endpoint must accept more than one method. ANY also accepts methods such as GET and HEAD. Each accepted request can create a delivery and consume quota.
  • Use OPTIONS, HEAD, and TRACE only if the sender needs them. PayloadRelay handles a browser CORS preflight request separately. That request does not need an OPTIONS endpoint configuration.

2. Choose expected payload format#

For body-capable methods (POST, PUT, PATCH, DELETE, OPTIONS, TRACE):

  • JSON (application/json)
  • XML (application/xml or text/xml)
  • FORM (application/x-www-form-urlencoded)
  • text/plain
  • None (ignore body): PayloadRelay ignores the request body
  • Query Parameters: PayloadRelay parses every URL query parameter as a key-value pair
  • Query Parameters (Base64 JSON): one query parameter contains a Base64-encoded JSON payload

For GET/HEAD:

  • None (ignore body) (default)
  • Query Parameters
  • Query Parameters (Base64 JSON)

3. Understand feature interactions#

  • PayloadRelay disables the field validation for the text/plain format and the None format.
  • Field validation is available with Query Parameters and Query Parameters (Base64 JSON), including on GET and HEAD, because PayloadRelay parses these formats to JSON.
  • A captcha needs a body-capable method and a JSON, FORM, or XML payload.
  • A method mismatch logs METHOD_NOT_ALLOWED.
  • A content-type mismatch returns an unsupported media type error.
  • The None format and the query parameter formats accept every Content-Type header.

4. Using query parameter formats#

For more details, see the Query Parameters guide.

5. Use sample traffic#

  1. Send representative requests from the sender.
  2. Make sure that Activity shows the expected outcomes.
  3. If the behavior of the sender is different, adjust the endpoint configuration.

Expected result#

  • Incoming requests match the configured method and content type.
  • Activity shows each rejection with an outcome and an error.

Common issues and fixes#

  • The sender sends POST and the endpoint accepts GET: change one side.
  • Wrong content-type header: correct the Content-Type of the sender.
  • The validation is not available: examine the method and the payload format.