Example API: ping
POST /api/v1/{token}/example/ping
The Ping method echoes back the input you send. It is primarily used by our
development team to verify the round-trip communication of the integration.
You can also use this method for simple connectivity tests to ensure your
requests and responses are working correctly.
| Parameter | Type | Default | Description |
|---|---|---|---|
| value (required) | string | The string value to be echoed back by the endpoint. |
Example ping requests:
Standard usage: send a string value and receive the same value in the response.
curl -X POST --data '{"value":"Hello, world!"}' \
"https://api.eu-west.hqapi.com/api/v1/YourToken01/example/ping"
The response:
{
"value": "Hello, world!"
}
Alternative usage with GET: send a value and receive it echoed back.
curl "https://api.eu-west.hqapi.com/api/v1/YourToken01/example/ping?value=Hello%2C+world%21"
The response:
{
"value": "Hello, world!"
}
Error case: request missing required `value` field returns a 400 error with a descriptive message.
curl -X POST --data '{"foo":"bar"}' \
"https://api.eu-west.hqapi.com/api/v1/YourToken01/example/ping"
The response:
{
"code": 400,
"message": "Missing argument `value` in payload"
}