POST
/
v0
/
imports
cURL
curl --request POST \
  --url https://api.exa.ai/websets/v0/imports \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "size": 123,
  "count": 123,
  "title": "<string>",
  "format": "csv",
  "metadata": {},
  "entity": {
    "type": "company"
  },
  "csv": {
    "identifier": 1
  }
}'
{
  "id": "<string>",
  "object": "import",
  "status": "pending",
  "format": "csv",
  "entity": {
    "type": "company"
  },
  "title": "<string>",
  "count": 123,
  "metadata": {},
  "failedReason": "invalid_format",
  "failedAt": "2023-11-07T05:31:56Z",
  "failedMessage": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "uploadUrl": "<string>",
  "uploadValidUntil": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Exa API key

Body

application/json
size
number
required

The size of the file in megabytes. Maximum size is 50 MB.

Required range: x <= 50000000
count
number
required

The number of records to import

format
enum<string>
required

When the import is in CSV format, we expect a column containing the key identifier for the entity - for now URL. If not provided, import will fail to be processed.

Available options:
csv
entity
object
required

What type of entity the import contains (e.g. People, Companies, etc.), and thus should be attempted to be resolved as.

title
string

The title of the import

metadata
object

Set of key-value pairs you want to associate with this object.

csv
object

When format is csv, these are the specific import parameters.

Response

201 - application/json

Import created successfully

The response to a successful import. Includes the upload URL and the upload valid until date.

id
string
required

The unique identifier for the Import

object
enum<string>
required

The type of object

Available options:
import
status
enum<string>
required

The status of the Import

Available options:
pending,
processing,
completed,
failed
format
enum<string>
required

The format of the import.

Available options:
csv,
webset
entity
object
required

The type of entity the import contains.

title
string
required

The title of the import

count
number
required

The number of entities in the import

metadata
object
required

Set of key-value pairs you want to associate with this object.

failedReason
enum<string> | null
required

The reason the import failed

Available options:
invalid_format,
invalid_file_content,
missing_identifier
failedAt
string<date-time> | null
required

When the import failed

failedMessage
string | null
required

A human readable message of the import failure

createdAt
string<date-time>
required

When the import was created

updatedAt
string<date-time>
required

When the import was last updated

uploadUrl
string
required

The URL to upload the file to

uploadValidUntil
string
required

The date and time until the upload URL is valid. The upload URL will be valid for 1 hour.