Overview

Custom Sources API Developer Guide

Overview

The Custom Sources API lets you define your own data sources in Demandbase, map their fields to Demandbase fields, and import Account and Person records under that source.

Use it to bring in data from external systems such as ETL pipelines, data warehouses, enrichment services, or internal business systems. Every record you import keeps its source, so you can see where each value came from.


Key Concepts

Custom Source

A data source that you define, such as "Snowflake Revenue Feed" or "Internal CRM Export". Each source has these fields:

FieldDescription
idID assigned by Demandbase. Use it in later calls.
nameUnique name for the source. Import jobs refer to the source by this name.
descriptionDescription of the source.
priorityMerge priority. See below.
sourceGroupAlways custom for sources created with this API.

Source Attribution

Imported data is tagged with the custom source it came from. You can see the source on profiles, in reporting, during merges, and in data lineage.


Merge Priority

When several sources supply a value for the same field, priority decides which value wins. A lower number means a higher priority.

PriorityMeaning
50Highest priority allowed for a custom source
99Lowest priority allowed for a custom source
0No preference. The default priority for the source type is used.

For example, if a CRM source has priority 55 and an enrichment feed has priority 70, the CRM value wins.

When a Salesforce source is connected, Salesforce values take precedence over custom sources during merges.


Supported Objects

Objectobject_type value
Accountaccount
Personperson

Base URL

All endpoints in this guide are relative to this base URL:

https://uapi.demandbase.com

Authentication

All Demandbase API endpoints require a JWT Bearer token in the authorization header.

Authorization: Bearer YOUR_BEARER_TOKEN
📘 For instructions of generating API tokens, see the Generate A JWT Bearer Token section.

Generate Your Token

Before making authenticated requests, you must exchange your API credentials for a JWT Bearer token. Reference Generate an access token for exact payload specifications.

curl --request POST \ --url https://uapi.demandbase.com/auth/v1/token \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "grantType": "client_credentials", "clientId": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET" }'
🚧 Authentication Errors
HTTP STATUS CODEDescription
401Indicates the provided JWT Bearer Token is either invalid or expired
403Indicates the provided JWT Bearer Token lacks sufficient privilege to perform the requested action
Authorization: Bearer <access-token>
Content-Type: application/json

Custom Sources must be enabled for your tenant. If you get authorization errors on a tenant that should have access, contact your Demandbase account team.


API Workflow

Setting up a source takes three steps, in this order:

  1. Create the custom source.
  2. Define field mappings for each object you will import (required).
  3. Import data, with the import job's source set to the custom source's name.
MethodPathPurposeSuccess
POST/integration/v1/custom-sourcesCreate a source201 + source
GET/integration/v1/custom-sourcesList sources200 + list
GET/integration/v1/custom-sources/{id}Get one source200 + source
PUT/integration/v1/custom-sources/{id}Update a source200 + source
DELETE/integration/v1/custom-sources/{id}Delete a source204, no body

Step 1 — Create a Custom Source

Endpoint

POST /integration/v1/custom-sources

Request Fields

FieldTypeRequiredDescription
nameStringYesUnique source name. See Validation Rules below.
descriptionStringYesDescription of the source. Cannot be blank.
priorityIntegerYes0 (no preference), or 50 to 99 inclusive.

Request Body

{
  "name": "Snowflake Revenue Feed",
  "description": "Revenue enrichment pipeline",
  "priority": 55
}

Example Response

201 Created

{
  "id": 12345,
  "name": "Snowflake Revenue Feed",
  "description": "Revenue enrichment pipeline",
  "sourceGroup": "custom",
  "priority": 55
}

Retrieve Custom Sources

Endpoint

GET /integration/v1/custom-sources?group=custom&perPage=25&page=1

Query Parameters

ParameterTypeRequiredDescription
groupStringNocustom, standard, or all. Defaults to all.
perPageIntegerNoNumber of items per page.
pageIntegerNoPage number, starting at 1.

Example Response

200 OK

{
  "totalCount": 2,
  "data": [
    {
      "id": 12345,
      "name": "Snowflake Revenue Feed",
      "description": "Revenue enrichment pipeline",
      "sourceGroup": "custom",
      "priority": 55
    },
    {
      "id": 12346,
      "name": "ERP Sync",
      "description": "ERP account sync",
      "sourceGroup": "custom",
      "priority": 70
    }
  ]
}

Retrieve a Specific Custom Source

GET /integration/v1/custom-sources/12345

Returns 200 OK with the source in the same shape as the create response. An unknown id returns 404 with code 404-001.


Update a Custom Source

PUT /integration/v1/custom-sources/12345

Send all three fields. The same rules apply as for create.

{
  "name": "Snowflake Revenue Feed",
  "description": "Updated revenue enrichment feed",
  "priority": 60
}

Returns 200 OK with the updated source.


Delete a Custom Source

DELETE /integration/v1/custom-sources/12345

Returns 204 No Content. Only custom sources can be deleted.


Field Mapping

You must create field mappings for each object type before you import data into a custom source. If an object type has no mappings, imports for it fail.

A mapping links a column in your data (sourceFieldLabel) to a Demandbase field (demandbaseFieldName). The mappings must include External Account ID mapped to crmId___e. This field is how Demandbase matches your records to existing accounts.

Create or Replace Field Mappings

Endpoint

PUT /integration/v1/custom-sources/{source_id}/field-mappings/{object_type}

object_type is account or person. Each request replaces all existing mappings for that source and object type. Include every mapping you want to keep, not only new ones.

Request Fields

FieldTypeRequiredDescription
fieldMappingsArrayYesAt least one mapping.
fieldMappings[].sourceFieldLabelStringYesColumn header exactly as it appears in your import file.
fieldMappings[].demandbaseFieldNameStringYesDemandbase field to map to.
fieldMappings[].dataTypeStringYesData type, for example String, Number, Boolean, or Date.

Request Body

{
  "fieldMappings": [
    {
      "sourceFieldLabel": "External Account ID",
      "demandbaseFieldName": "crmId___e",
      "dataType": "String"
    },
    {
      "sourceFieldLabel": "Account Name",
      "demandbaseFieldName": "name",
      "dataType": "String"
    },
    {
      "sourceFieldLabel": "Account Domain",
      "demandbaseFieldName": "website",
      "dataType": "String"
    }
  ]
}

Returns 201 Created with no body.


Retrieve Field Mappings

GET /integration/v1/custom-sources/{source_id}/field-mappings/{object_type}

Returns 200 OK with the mappings in the same shape as the request body.

If no mappings exist yet for that object type, the request returns 404. Create the mappings first, then import. Use this endpoint to check that a source is set up before you start an import.


Suggested Field Mappings

Column in your datademandbaseFieldNamedataType
External Account IDcrmId___eString
Account NamenameString
Account DomainwebsiteString
First NamefirstNameString
Last NamelastNameString
Email AddressemailString

Columns Without a Mapping

If a column header in an import file has no mapping, Demandbase creates a new field for it. The field name is the header in lowercase, with spaces replaced by underscores. For example, Annual Revenue becomes annual_revenue.

For production pipelines, map every column explicitly. Explicit mappings keep schemas predictable and avoid duplicate fields.


Data Import

Import records with the standard Data Import API. To attribute records to your custom source, set the import job's source field to the source's name. If you leave source out, it defaults to CSV, and the records are attributed to the CSV source, not your custom source.

1. Check That the Source Is Available for Import

GET /import/v1/{objectType}/sources

Example: GET /import/v1/account/sources

{
  "data": [
    "CSV",
    "Snowflake Revenue Feed"
  ]
}

2. Create an Import Job for the Source

POST /import/v1/job
{
  "dataImportName": "snowflake-revenue-2026-11-16",
  "source": "Snowflake Revenue Feed"
}

The job imports Accounts by default. To import People, set entityType as described in the Data Import API reference.


3. Upload the File

Upload the CSV to the job created in step 2:

PUT /import/v1/job/{id}/data

The column headers must match the sourceFieldLabel values in your field mappings. New records must include External Account ID.


4. Check the Job

GET /import/v1/job/{id}

The job shows whether rows were imported or rejected. If rows are rejected, check that field mappings exist for the object type and that every row has an External Account ID.


Import via UI

You can also import into a custom source from the UI:

  1. Go to Data Import.
  2. Select the object type.
  3. Choose your custom source.
  4. Upload a CSV file and run the import.

Validation Rules

Rulenamedescription
RequiredYes, cannot be blankYes, cannot be blank
Maximum length100 characters300 characters
Cannot contain< or >< or >
Cannot start with=, +, -, @, tab, or carriage return= or @
Must be unique in the tenantYesNo
Cannot match a built-in integration name, such as SalesforceYesNo

Other limits:

RuleValue
priority0, or 50 to 99 inclusive
Custom sources per tenant50 maximum
Field mappings per requestAt least 1. Every field is required.
object_typeaccount or person

Error Handling

Errors return this body. Use code to tell errors apart. Several different errors share the same HTTP status. If you contact support, include diagnosticCode.

{
  "error": {
    "code": "400-005",
    "message": "Missing required field 'description'.",
    "diagnosticCode": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
codeHTTP statusMeaning
400-000400Bad request
400-001400Invalid field type, or the JSON could not be parsed
400-005400Validation failed: a missing field, priority out of range, a name or description rule, or an invalid field mapping
400-006400Invalid input, for example an ID that is not a number
409-001400A custom source with this name already exists
429-001400The tenant already has 50 custom sources. Delete one before you create another.
404-000404Not found, for example no field mappings exist for this object type
404-001404Custom source not found
404-002404Unsupported object_type
500-001500Unexpected error. Contact support with the diagnosticCode.

409-001 and 429-001 currently return HTTP status 400. Read the code value instead of relying on the status. A 429-001 is a hard limit, not rate limiting, so retrying will not succeed.


Best Practices

Use Stable Source Names

Import jobs refer to the source by name, so renaming a source breaks existing pipelines. Example names: salesforce_sync, snowflake_enrichment, partner_intent_feed.


Establish a Clear Priority Strategy

Plan priorities before you add sources. One way to group them:

PrioritySource Type
50–59CRM systems
60–69Internal operational systems
70–79Enrichment providers
80–99Experimental or low-confidence sources

Define Explicit Field Mappings

Map every column before your first import. Then confirm the mappings with GET /integration/v1/custom-sources/{source_id}/field-mappings/{object_type}.


Example End-to-End Workflow

1. Create Source

POST /integration/v1/custom-sources
{
  "name": "partner_intent_feed",
  "description": "Third-party intent provider",
  "priority": 70
}

The response contains the new source's id, for example 12347.


2. Map the Account Fields

PUT /integration/v1/custom-sources/12347/field-mappings/account
{
  "fieldMappings": [
    { "sourceFieldLabel": "External Account ID", "demandbaseFieldName": "crmId___e", "dataType": "String" },
    { "sourceFieldLabel": "Account Name", "demandbaseFieldName": "name", "dataType": "String" },
    { "sourceFieldLabel": "Account Domain", "demandbaseFieldName": "website", "dataType": "String" },
    { "sourceFieldLabel": "Intent Score", "demandbaseFieldName": "intent_score", "dataType": "Number" }
  ]
}

3. Prepare CSV

The headers must match the sourceFieldLabel values:

External Account ID,Account Name,Account Domain,Intent Score
0015g00000ABC123,Acme Inc,acme.com,92
0015g00000DEF456,Globex,globex.com,87

4. Import Data

Create an import job that names the source, then upload the file:

POST /import/v1/job
{
  "dataImportName": "partner-intent-2026-11-16",
  "source": "partner_intent_feed"
}
PUT /import/v1/job/{id}/data

5. Verify Attribution

Check the job with GET /import/v1/job/{id}. The imported records show partner_intent_feed as their source.


Did this page help you?