apidata.one docs Get a key

Idempotency

Three requests save something for a consumer: POST /v1/favorites, POST /v1/saved-shapes and POST /v1/saved-searches. A fourth saves something for the account: POST /v1/webhook-endpoints (below). If the answer to one never arrives (a dropped connection, a timeout), sending it again could save twice. Send an Idempotency-Key header and the repeat is safe:

POST /v1/saved-shapes
Idempotency-Key: <a new random UUID for this action>

The rules

Other routes ignore the header. In the browser, Idempotency-Key may be sent and Idempotency-Replayed read (CORS allows both).

Webhook endpoints

POST /v1/webhook-endpoints accepts the header too. It acts for the account, not for a consumer, and two things differ:

Without a key

Both requests are already safe to repeat in the simple case: saving a listing the consumer has saved before returns the existing favorite with 200. A saved shape has no such natural identity, so a repeat without a key saves a second shape. Send the key.

This page as Markdown