{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customer-io/json-schema/customer-io-import-object-schema.json",
  "title": "import_object",
  "description": "Represents an import operation.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/customer-io-imports-api-openapi.yml#/components/schemas/import_object",
  "x-scalar-ignore": true,
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "This is the `import_id` you'll use if you want to [lookup your import operation](/integrations/api/app/tag/imports/getImport/)."
    },
    "created_at": {
      "$ref": "#/$defs/created"
    },
    "updated_at": {
      "$ref": "#/$defs/updated"
    },
    "name": {
      "$ref": "#/$defs/import_name"
    },
    "description": {
      "$ref": "#/$defs/import_description"
    },
    "rows_to_import": {
      "$ref": "#/$defs/rows_to_import"
    },
    "rows_imported": {
      "$ref": "#/$defs/rows_imported"
    },
    "state": {
      "$ref": "#/$defs/import_state"
    },
    "type": {
      "$ref": "#/$defs/import_type"
    },
    "identifier": {
      "type": "string",
      "description": "The type of identifier you used to identify people in your CSV. Not applicable for object imports.",
      "enum": [
        "id",
        "email"
      ]
    },
    "data_to_process": {
      "$ref": "#/$defs/data_to_process"
    },
    "people_to_process": {
      "type": "string",
      "description": "Returned for people and event imports, even if you imported using the field `data_to_process`. This field will be deprecated soon.\n",
      "enum": [
        "all",
        "only_new",
        "only_existing"
      ]
    },
    "object_type_id": {
      "type": "string",
      "description": "The object type an object belongs to—like \"Companies\" or \"Accounts\". Only applies to object imports."
    },
    "error": {
      "description": "If your import fails, this helps you understand why.",
      "type": "string"
    }
  },
  "$defs": {
    "created": {
      "x-scalar-ignore": true,
      "type": "integer",
      "format": "unix timestamp",
      "description": "The date time when the referenced ID was created.",
      "readOnly": true
    },
    "data_to_process": {
      "x-scalar-ignore": true,
      "type": "string",
      "description": "Controls whether your import adds and updates all rows, adds only new rows, or updates only existing rows. Defaults to `all`. Event imports support only `all` and `only_existing`. Formerly called `people_to_process`.",
      "enum": [
        "all",
        "only_new",
        "only_existing"
      ]
    },
    "import_description": {
      "x-scalar-ignore": true,
      "type": "string",
      "description": "A helpful description that can help you find and recognize your import operation."
    },
    "import_name": {
      "x-scalar-ignore": true,
      "type": "string",
      "description": "A friendly name for your import. This helps you identify your import."
    },
    "import_state": {
      "x-scalar-ignore": true,
      "type": "string",
      "description": "The state of the import—whether your import is being processed, fully completed (`imported`), or if it failed.",
      "enum": [
        "preprocessing",
        "preprocessed",
        "validating",
        "validated",
        "importing",
        "imported",
        "failed",
        "canceled"
      ]
    },
    "import_type": {
      "x-scalar-ignore": true,
      "type": "string",
      "description": "The type of import.",
      "enum": [
        "people",
        "event",
        "object",
        "relationship"
      ]
    },
    "rows_imported": {
      "x-scalar-ignore": true,
      "type": "integer",
      "description": "The number of rows we imported from the CSV."
    },
    "rows_to_import": {
      "x-scalar-ignore": true,
      "type": "integer",
      "description": "The total number of importable rows we found in the CSV."
    },
    "updated": {
      "x-scalar-ignore": true,
      "type": "integer",
      "format": "unix timestamp",
      "description": "The date time when the referenced ID was last updated.",
      "readOnly": true
    }
  }
}