Make Your First Request

Learn how to create an import job, submit data to it, and check the job status in the Demandbase Import API.

Importing Data

Prerequisites

Before you begin, make sure you have:

This guide walks through a complete Activity CSV import: create an import job, upload the CSV, and check the job status until it reaches completed or failed.

Create Import Job

Create Import Job

Create an import job before uploading data. The response includes the jobId used by the next two requests.

Request

Method: POST
URL: https://uapi.demandbase.com/import/v1/job

Headers:

Accept: application/json
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

JSON body:

{
  "dataImportName": "DataImportTest",
  "entityType": "ACTIVITY",
  "source": "CSV",
  "activityTypeId": 1110
}
ParameterRequiredDescription
dataImportNameYesName for this import job.
entityTypeYesType of data to import. This example uses ACTIVITY.
sourceNoData source. Use CSV for this workflow.
activityTypeIdFor activity importsID of the activity type to associate with the imported records.

cURL:

curl --request POST 'https://uapi.demandbase.com/import/v1/job' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_JWT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "dataImportName": "DataImportTest",
    "entityType": "ACTIVITY",
    "source": "CSV",
    "activityTypeId": 1110
  }'

Example 200 response:

{
  "id": "00000000-0000-0000-0000-000000000000",
  "dataImportName": "DataImportTest",
  "entityType": "ACTIVITY",
  "state": "created",
  "updatedAt": "2024-01-01T00:00:00Z",
  "createdAt": "2024-01-01T00:00:00Z",
  "source": "CSV",
  "activityTypeId": 1110
}

Use the returned id as the jobId when submitting the file and checking the job status.

Submit Data To The Import Job

Submit Data To The Import Job

Upload the CSV file to the import job created in the previous step. Use the jobId returned by the Create Import Job response.

Request

Method: PUT
URL: https://uapi.demandbase.com/import/v1/job/{jobId}/data?listAction=replace

The listAction parameter controls how imported rows affect the associated account list:

  • replace (default): remove existing members and add the members in this file.
  • insert: add members from this file; create an account list if none is associated with the job.
  • delete: remove existing members that match rows in this file.
  • noop: process and import the data without changing account-list membership.

Headers:

Accept: application/json
Content-Type: application/octet-stream
Authorization: Bearer YOUR_JWT_TOKEN

Request body

Send the CSV file as binary data. Do not send JSON or wrap the file contents in a JSON string.

cURL

Replace {jobId}, the token placeholder, and the filename with your values:

curl --request PUT \
  --url 'https://uapi.demandbase.com/import/v1/job/{jobId}/data?listAction=replace' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_JWT_TOKEN' \
  --header 'Content-Type: application/octet-stream' \
  --data-binary '@dataImportTEST.csv'

Example 200 response:

{
  "id": 11416,
  "dataImportName": "DataImportTest",
  "entityType": "Activity",
  "state": "processing",
  "createdAt": "2026-02-03T14:55:13.526Z",
  "updatedAt": "2026-02-03T14:56:29.123Z",
  "source": "CSV",
  "activityTypeId": 1110
}

This response shows that the job is processing. Use the Check Import Job Status request to check for later state updates. The response schema is the same as the Create Import Job endpoint.


Field NameData TypeNotes
idintJob Id - used to submit data and check job status
dataImportNamestringSupplied name
entityTypestringSupplied entityType
statestringOne of: new, processing, completed, failed
updatedAtstring<dateTime>ISO-formatted UTC datetime
createdAtstring<dateTime>ISO-formatted UTC datetime
sourcestringSupplied source
activityTypeIdintSupplied activityTypeId Only returned if entityType = Activity

Check Import Job Status

Check Import Job Status

After submitting the file, check the import job for its current state. Replace {jobId} with the id returned when you created the job.

Request

Method: GET
URL: https://uapi.demandbase.com/import/v1/job/{jobId}

Headers:

Accept: application/json
Authorization: Bearer YOUR_JWT_TOKEN

cURL:

curl --request GET 'https://uapi.demandbase.com/import/v1/job/YOUR_JOB_ID' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_JWT_TOKEN'

Example 200 response

A job that is still running can have a state such as processing.

{
  "id": "00000000-0000-0000-0000-000000000000",
  "dataImportName": "DataImportTest",
  "entityType": "ACTIVITY",
  "state": "processing",
  "updatedAt": "2024-01-01T00:05:00Z",
  "createdAt": "2024-01-01T00:00:00Z",
  "source": "CSV",
  "activityTypeId": 1110
}

Repeat this request while state is processing. The job reaches a terminal state of completed or failed; completed means the import finished successfully. If the state is failed, review the request and CSV, correct the issue, and submit a new import job.

The response follows the DataImportJobResponse schema.

Troubleshooting

  • 400 Bad Request: Check that the job ID and request are valid.
  • 401 Unauthorized or 403 Forbidden: Check that your access token is valid and authorized.
  • Unexpected job state: Confirm that the file upload completed successfully, then check the job again.

Next steps

After the job reaches completed, the import is finished. For related API guidance, see the Demandbase API overview.


Did this page help you?