API referenceProfile Imports
Change a profile import’s settings
Before it starts. Changing the mapping, options or consent declaration clears the check. 422 `profile_import_mapping_incomplete` with what’s missing.
PATCH
Before it starts. Changing the mapping, options or consent declaration clears the check. 422 profile_import_mapping_incomplete with what’s missing.
apiKey writeheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*stringFormat
uuididempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
Length
1 <= length <= 255application/json- body
mapping?array<>Items
items <= 500options?consent?|Needed to subscribe anyone: the proof each subscribe carries, declared by whoever sends it. Null withdraws it.
OK
application/json- response
id*stringFormat
uuidname*stringstatus*stringValue in
"uploading""ready""checking""importing""completed""failed""cancelled"format*|Value in
"csv""json"nulldelimiter*string|nullbytes*integer|nullcolumns*array<>previewRows*array<>mapping*array<>Items
items <= 500options*consent*|nullcheck*|nullcheckedAt*|Format
date-timecounts*|nullerror*|Value in
"unreadable""not_utf8""row_too_long""too_large""no_rows""too_many_columns""file_missing""timed_out""import_failed"nullcreatedBy*createdAt*stringFormat
date-timestartedAt*|Format
date-timecompletedAt*|Format
date-timecurl -X PATCH 'https://api.postforge.dev/v1/profile-imports/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "uploading", "format": "csv", "delimiter": "string", "bytes": 0, "columns": [ { "name": "string", "samples": [ "string" ], "suggested": { "kind": "email" }, "suggestedType": "text", "refusedByType": { "text": 0, "number": 0, "boolean": 0, "date": 0, "list": 0, "json": 0 }, "sampled": 0 } ], "previewRows": [ { "property1": "string", "property2": "string" } ], "mapping": [ { "column": "string", "target": { "kind": "email" } } ], "options": { "matchOn": "email", "mode": "create_and_update", "blanks": "keep", "startAutomations": true }, "consent": { "method": "string", "declaredBy": { "kind": "user", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "declaredAt": "2019-08-24T14:15:22Z" }, "check": { "rows": 0, "created": 0, "updated": 0, "unchanged": 0, "skipped": 0, "skipReasons": { "no_match_value": 0, "invalid_email": 0, "invalid_phone": 0, "invalid_external_id": 0, "not_found": 0, "exists": 0, "two_profiles": 0, "other_id": 0, "not_utf8": 0, "unreadable": 0 }, "refused": [ { "column": "string", "count": 0, "reason": "string" } ], "subscribed": 0, "unsubscribed": 0, "consentKept": { "unsubscribed": 0, "suppressed": 0, "no_declaration": 0, "no_email": 0, "invalid": 0, "invalid_date": 0 } }, "checkedAt": "2019-08-24T14:15:22Z", "counts": { "rows": 0, "created": 0, "updated": 0, "unchanged": 0, "skipped": 0, "skipReasons": { "no_match_value": 0, "invalid_email": 0, "invalid_phone": 0, "invalid_external_id": 0, "not_found": 0, "exists": 0, "two_profiles": 0, "other_id": 0, "not_utf8": 0, "unreadable": 0 }, "refused": [ { "column": "string", "count": 0, "reason": "string" } ], "subscribed": 0, "unsubscribed": 0, "consentKept": { "unsubscribed": 0, "suppressed": 0, "no_declaration": 0, "no_email": 0, "invalid": 0, "invalid_date": 0 } }, "error": "unreadable", "createdBy": { "user": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "apiKey": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } }, "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z"}