Endpoints

Batch

Verify a whole CSV of addresses asynchronously: submit, poll or get a webhook, download the results.

POST/v1/addresses/batch
GET/v1/addresses/batch
GET/v1/addresses/batch/{id}
GET/v1/addresses/batch/{id}/results

The flow: submit the URL of a CSV, wait for the job to finish (by polling or by webhook), then download the results as CSV. All four operations require the verify scope.

1. Submit a job

The file must be a CSV with a header row and the columns street, house_number, locality, county, postal_code (headers are read in lowercase).

street,house_number,locality,county,postal_code
Mihai Vitezu,12,cluj,CJ,
bd. 1 Decembrie 1918,255-T,Târgu Mureș,MS,540510
NameTypeRequiredDescription
file_urlstringyeshttps URL of a CSV on a public host (no userinfo, at most 2048 characters). Otherwise 400 invalid_parameter; missing: 400 missing_file_url.
options.callback_urlstringnoPublic https URL that receives the signed batch.completed / batch.failed callback. Private, loopback and link-local targets are rejected (400 invalid_callback_url). Omitted = your organisation default webhook URL (Settings > Webhooks), if set.
options.osmbooleannotrue/false: also match rows against OpenStreetMap, like options.osm on verify. Overrides the organisation setting for this job; omitted = the organisation setting. Each result row's source column says which data it matched.
Idempotency-Keyheaderno1-255 visible ASCII characters (e.g. a UUID). Makes retries safe; see below.

Example request

curl -X POST https://api.posty.ro/v1/addresses/batch \
  -H "Authorization: Bearer psk_live_xxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b9f3c1e-6c1a-4a53-9d0e-2f1d5b7a9c11" \
  -d '{
    "file_url": "https://files.example.ro/clienti-2026-11.csv",
    "options": { "callback_url": "https://example.ro/hooks/posty", "osm": false }
  }'

Example response (202)

{
  "id": "bat_550e8400e29b4123",
  "status": "queued",
  "row_count": null,
  "webhook": "queued",
  "created_at": "2026-11-14T09:58:12Z"
}

row_count is null until the file has been read. The webhook field says what will happen with the notification:

  • queued: A callback will be sent when the job finishes (to options.callback_url or, otherwise, the organisation default webhook URL).
  • none: No callback_url and no organisation default, or a plan without webhooks and no callback_url. Nothing is sent.
  • not_available_on_plan: You sent options.callback_url but the plan has no webhooks (Growth, Scale and Enterprise do). The job is accepted and runs, the URL is dropped and no callback is sent.

The notification payload, the X-Posty-Signature signature and the retry rules are described on the Webhooks page.

Idempotency-Key

  • Within 24 hours, the same key from the same organisation with the same file_url and options.callback_url returns the original job: 202 with the Idempotent-Replayed: true header, no new job and no second charge. It also repeats the original webhook value.
  • The same key with a different body: 422 idempotency_key_reused. A malformed key: 400 invalid_idempotency_key.
  • A replay is not blocked by the batch credit pre-check, but the quota and billing gates still apply: an over-quota or past-due organisation gets 402 on a replay too.
  • Without the header every call creates a new job. After a 504 request_timeout, retry only with an Idempotency-Key, otherwise you may create a duplicate.

Limits

  • At most 5 jobs queued or processing at once per organisation. A sixth submit gets 429 rate_limit_exceeded with Retry-After.
  • A CSV row is at most 64 KiB and each of the five address fields at most 256 characters. A file that breaks either fails the job with an invalid_csv_format error message.
  • A file server that sends nothing for 30 seconds fails the job with file_fetch_failed.
  • Request body: at most 64 KiB (413 payload_too_large).

2. Poll the status

curl https://api.posty.ro/v1/addresses/batch/bat_550e8400e29b4123 \
  -H "Authorization: Bearer psk_live_xxx"
{
  "id": "bat_550e8400e29b4123",
  "status": "processing",
  "row_count": 1000,
  "processed": 420,
  "created_at": "2026-11-14T09:58:12Z",
  "started_at": "2026-11-14T09:58:15Z",
  "finished_at": null,
  "error_message": null
}
  • queued: Accepted, not started yet.
  • processing: Running; processed grows up to row_count.
  • done: Finished; results can be downloaded.
  • failed: Failed; see error_message (e.g. file_fetch_failed, invalid_csv_format, processing_timeout if processing stalled, internal_error if it failed on our side).
  • expired: Results were deleted after the retention period. The status endpoint answers 200, the results endpoint 410 results_expired.

An unknown id is 404 not_found and another organisation's job is 403 forbidden. Status reads and listing are management reads: they do not count toward quota and are not blocked by the quota or billing gates. If you use a webhook you do not need to poll.

3. Download the results

curl https://api.posty.ro/v1/addresses/batch/bat_550e8400e29b4123/results \
  -H "Authorization: Bearer psk_live_xxx" \
  -o results.csv

The response is text/csv with a Content-Disposition header. Columns:

street, house_number, locality, county, postal_code, verdict, confidence, normalized_street, normalized_house_number, normalized_locality, normalized_county, normalized_postal_code, corrections_json, source
street,house_number,locality,county,postal_code,verdict,confidence,normalized_street,normalized_house_number,normalized_locality,normalized_county,normalized_postal_code,corrections_json,source
Mihai Vitezu,12,cluj,CJ,,partial,0.54,Piață Mihai Viteazu,12,Cluj-Napoca,CJ,400151,"[{""field"":""locality"",""from"":""cluj"",""to"":""Cluj-Napoca"",""reason"":""typo""}]",gov
  • source is gov or osm; it is empty for quota_exceeded rows and for jobs finished before the column existed.
  • When the monthly quota runs out on a plan without overage, the file ends with a single quota_exceeded row for the first address that was not verified; later input rows are not included.
  • Retention: results are kept for 30 days after completion (default); after that the status becomes expired and the download answers 410 results_expired.
  • If the job has not finished, the download answers 409 job_not_complete.

List jobs

Your organisation's jobs, newest first (created_at descending, ties by id). Cursor pagination: the response carries data and next_cursor (null on the last page). Pass next_cursor back unchanged as cursor to get the next page; repeat until next_cursor is null.

NameTypeRequiredDescription
limitintegernoJobs per page (1-200). Defaults to 50. Out of range → 400 invalid_parameter.
cursorstringnoOpaque value from the previous response's next_cursor. Pass it back unchanged. A malformed cursor → 400 invalid_parameter.
curl "https://api.posty.ro/v1/addresses/batch?limit=2" \
  -H "Authorization: Bearer psk_live_xxx"
{
  "data": [
    {
      "id": "bat_550e8400e29b4123",
      "status": "done",
      "row_count": 1000,
      "processed": 1000,
      "created_at": "2026-11-14T09:58:12Z",
      "started_at": "2026-11-14T09:58:15Z",
      "finished_at": "2026-11-14T10:00:00Z",
      "error_message": null
    },
    {
      "id": "bat_1a2b3c4d5e6f7a8b",
      "status": "failed",
      "row_count": 0,
      "processed": 0,
      "created_at": "2026-11-13T16:20:01Z",
      "started_at": "2026-11-13T16:20:03Z",
      "finished_at": "2026-11-13T16:20:34Z",
      "error_message": "file_fetch_failed"
    }
  ],
  "next_cursor": "eyJjIjoiMjAyNi0xMS0xM1QxNjoyMDowMVoiLCJpIjoiYmF0XzFhMmIifQ"
}
curl "https://api.posty.ro/v1/addresses/batch?limit=2&cursor=eyJjIjoiMjAyNi0xMS0xM1QxNjoyMDowMVoiLCJpIjoiYmF0XzFhMmIifQ" \
  -H "Authorization: Bearer psk_live_xxx"

Common errors

  • 402 quota_exceeded / spend_cap_reached / payment_required: on submit only.
  • 403 insufficient_scope: the key lacks the verify scope.
  • 409 job_not_complete, 410 results_expired: on results download.
  • 429 rate_limit_exceeded: too many requests or 5 active jobs; honour Retry-After.

Errors

© 2026 posty.ro. Posty is operated by Gurulabs SRL, Str. Emile Zola nr. 1, et. III, ap. 6, 400112 Cluj-Napoca, Cluj county, Romania. Trade Register no. J2017005457128, tax ID RO38156938, EUID ROONRC.J2017005457128. Contact: support@posty.ro. Terms of Service · Privacy Policy · Cookies