# Idempotent Requests

Writes keyed on your identifier are idempotent. Repeat requests update the existing record instead of
creating a duplicate. Quotes write nothing.

## Idempotent Writes

| Action | Call |
| --- | --- |
| Sync an organization | `PUT /v1/organizations/{externalId}` |
| Sync an invoice | `PUT /v1/invoices/{externalId}` |
| Set a payout account | `PUT /v1/organizations/{externalId}/payout-account` |
| Request an advance | `POST /v1/advances`. Idempotent per invoice. |
| Import invoices | `PUT /v1/invoices/imports/{externalId}`. Each row behaves like an invoice sync. |

`already_subscribed` means the endpoint is already subscribed. `already_imported` means the import
identifier was already used for a different file; re-sending the same file resumes the import.

Repeat invitations to the same address reissue the link. See [Vendor Onboarding](/onboarding).

## Retrying After a Timeout

Retry any write above.

## Webhook Subscriptions

`POST /v1/webhooks` is not safe to retry. If the first request succeeded but the response was lost, a
retry returns `409 already_subscribed`. The signing secret cannot be retrieved again, including from
[`GET /v1/webhooks`](/reference/webhooks#list-webhook-subscriptions).

To recover:

1. Get the subscription's `reference` from the list.
2. Delete it with [`DELETE /v1/webhooks/{reference}`](/reference/webhooks#delete-a-webhook-subscription).
3. Subscribe again and store the new secret.

## What's Next

- [Errors](/errors)
