Create a new headless import
Authorizations
This backend API key is different than your frontend license key. Please use the "Backend" license key from your Dromo Dashboard.
Body
ID of a saved schema. Mutually exclusive with fields — provide schema_id or fields, not both. When provided alongside settings or hooks, those values are merged on top of the saved schema for this import only.
"94187d21-9820-420f-b08c-a80cbbf52604"
Inline schema field definitions. Required when schema_id is omitted; mutually exclusive with schema_id. Accepts the same field definitions as a saved schema.
[
{
"key": "first_name",
"type": "string",
"label": "First Name",
"validators": []
},
{
"key": "last_name",
"type": "string",
"label": "Last Name",
"validators": []
}
]Import settings. When used with schema_id, merged on top of the saved schema (provided keys overwrite; omitted keys are unchanged). When used without schema_id, defines settings for the inline schema.
{
"importIdentifier": "contacts-import",
"invalidDataBehavior": "BLOCK_SUBMIT"
}Import hooks. When used with schema_id, merged on top of the saved schema. When used without schema_id, defines hooks for the inline schema.
{
"rowHooks": [
"(record, mode) => { return { row: { first_name: { value: \"Updated from row hook\" } } }; }"
]
}Name of the file being imported (exclude if using initial_data)
"user.csv"
Complete JSON data to be imported, max size 15MB (exclude if using a file)
[
{
"first_name": "Zeph",
"last_name": "paul.zeph@gmail.com"
}
]{
"user": {
"id": "jeff_id",
"name": "Jeff",
"email": "jeff@dromo.io",
"companyName": "Dromo",
"companyId": "dromo_id"
}
}Response
Import successfully initialized
"94187d21-9820-420f-b08c-a80cbbf52604"
"94187d21-9820-420f-b08c-a80cbbf52604"
AWAITING_UPLOAD, RUNNING, SUCCESSFUL, FAILED, NEEDS_REVIEW "AWAITING_UPLOAD"
"user_data.csv"
"https://dromo-headless-imports-prod.s3.us-west-2.amazonaws.com/test-key-123?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20230227%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230227T160315Z&X-Amz-Expires=1800&X-Amz-SignedHeaders=host&X-Amz-Signature=example1234567890abcdef1234567890abcdef1234567890abcdef12345678"
"https://app.dromo.io/headless/94187d21-9820-420f-b08c-a80cbbf52604/"
null
null
