Idempotency
Import and export job creation endpoints accept idempotency keys so you can survive network retries without queueing duplicate work.
3 min read
Use idempotency for async job creation
Asynchronous job creation endpoints accept an Idempotency-Key header so callers can retry safely after network failures.
When the same key is replayed with the same request body, Mailrith returns the original successful job response.
Apply an Idempotency-Key when creating subscriber import or export jobs if your network path can retry after a timeout.
Mailrith will return the original successful job response when the same key and request body are replayed.
/v1/jobs/subscriber-exports Create a subscriber export job
Queues an asynchronous subscriber export for the authenticated workspace.
View schema /v1/jobs/subscriber-exports/{job_id} Get a subscriber export job
Returns the current state of a previously created export job.
View schema /v1/jobs/subscriber-imports Create a subscriber import job
Queues an asynchronous subscriber import from CSV text.
View schema /v1/jobs/subscriber-imports/{job_id} Get a subscriber import job
Returns the current state of a previously created import job.
View schemaKeep retries safe
- Generate one idempotency key per logical job submission.
- Reuse that key only when you are retrying the exact same request payload.
- Create a new key when the CSV content or export selection changes.
curl -X POST https://api.mailrith.com/v1/jobs/subscriber-imports \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Idempotency-Key: import-2026-04-11-website-signups" \
-H "Content-Type: application/json" \
-d '{
"csv_text": "Email,Name\nada@example.com,Ada Lovelace",
"mappings": [
{
"csv_column": "Email",
"field": { "type": "email" }
},
{
"csv_column": "Name",
"field": { "type": "name" }
}
]
}' Need help shipping an integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.
Related guides
Create async subscriber import and export jobs and poll them to completion.
Handle stable error envelopes and status codes without depending on internal implementation details.
Run the local worker, generate a workspace key, exercise the endpoints, and execute automated integration coverage.