Change the column mapping, target lists and consent, the sheet, the delimiter or the header row
const url = 'https://api.replifier.com/v1/imports/imp_01hx0000000000000000000000';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mapping":{"columns":[{"index":1,"target":"example"}],"dateFormat":"iso","newFields":[]},"options":{"listIds":["example"],"updateExisting":true,"consent":{"mode":"declared","attested":true,"text":"example","textVersion":"example"}},"sheet":"example","delimiter":",","headerRow":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.replifier.com/v1/imports/imp_01hx0000000000000000000000 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mapping": { "columns": [ { "index": 1, "target": "example" } ], "dateFormat": "iso", "newFields": [] }, "options": { "listIds": [ "example" ], "updateExisting": true, "consent": { "mode": "declared", "attested": true, "text": "example", "textVersion": "example" } }, "sheet": "example", "delimiter": ",", "headerRow": 1 }'Only in uploaded or analyzed. Any change discards a previous analysis: analyze again before confirming. Changing the sheet, the delimiter or the header re-reads the file and resets the suggested mapping.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
imp_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Each file column (by index, starting at 0) maps to a field: email, first_name, last_name, locale, timezone, tags, signup_date, consent_ip, country (ISO 3166-1 code or country name; if not recognized, the contact is imported without a country with the warning country_unrecognized), referrer, notes, field:<key> (a custom field, existing or from newFields) or ignore.
object
object
object
consent.mode = declared: the importer declares (attested: true) that these people already consented and that they hold the evidence; it is stored as legacy evidence (legacy:<source>). double_opt_in: contacts are imported as pending and nobody is subscribed until they confirm.
Responses
Section titled “Responses”Import
object
object
object
object
object
object
object
object
object
object
object
Skip reasons and warnings of the current phase (analysis before confirming; apply afterwards), with their text in the Accept-Language language.
object
Up to 5 rows per reason of the current phase.
object
object
First 20 data records (only before analysis).
Plan limits that affect this import (only before confirming).
object
object
Example
{ "source": "csv", "status": "uploaded", "progress": { "phase": "analysis" }, "reasons": [ { "outcome": "skipped" } ], "examples": [ { "outcome": "skipped" } ], "plan": { "plan": "free" }, "nextStep": "map"}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}Service temporarily unavailable
object
object
Example
{ "error": { "code": "not_found" }}