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:
| Field | Description |
|---|---|
id | ID assigned by Demandbase. Use it in later calls. |
name | Unique name for the source. Import jobs refer to the source by this name. |
description | Description of the source. |
priority | Merge priority. See below. |
sourceGroup | Always 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.
| Priority | Meaning |
|---|---|
50 | Highest priority allowed for a custom source |
99 | Lowest priority allowed for a custom source |
0 | No 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
| Object | object_type value |
|---|---|
| Account | account |
| Person | person |
Base URL
All endpoints in this guide are relative to this base URL:
https://uapi.demandbase.comAuthentication
All Demandbase API endpoints require a JWT Bearer token in the authorization header.
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.
| HTTP STATUS CODE | Description |
|---|---|
| 401 | Indicates the provided JWT Bearer Token is either invalid or expired |
| 403 | Indicates the provided JWT Bearer Token lacks sufficient privilege to perform the requested action |
Authorization: Bearer <access-token>
Content-Type: application/jsonCustom 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:
- Create the custom source.
- Define field mappings for each object you will import (required).
- Import data, with the import job's
sourceset to the custom source's name.
| Method | Path | Purpose | Success |
|---|---|---|---|
| POST | /integration/v1/custom-sources | Create a source | 201 + source |
| GET | /integration/v1/custom-sources | List sources | 200 + list |
| GET | /integration/v1/custom-sources/{id} | Get one source | 200 + source |
| PUT | /integration/v1/custom-sources/{id} | Update a source | 200 + source |
| DELETE | /integration/v1/custom-sources/{id} | Delete a source | 204, no body |
Step 1 — Create a Custom Source
Endpoint
POST /integration/v1/custom-sourcesRequest Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Unique source name. See Validation Rules below. |
description | String | Yes | Description of the source. Cannot be blank. |
priority | Integer | Yes | 0 (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=1Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
group | String | No | custom, standard, or all. Defaults to all. |
perPage | Integer | No | Number of items per page. |
page | Integer | No | Page 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/12345Returns 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/12345Send 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/12345Returns 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
| Field | Type | Required | Description |
|---|---|---|---|
fieldMappings | Array | Yes | At least one mapping. |
fieldMappings[].sourceFieldLabel | String | Yes | Column header exactly as it appears in your import file. |
fieldMappings[].demandbaseFieldName | String | Yes | Demandbase field to map to. |
fieldMappings[].dataType | String | Yes | Data 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 data | demandbaseFieldName | dataType |
|---|---|---|
| External Account ID | crmId___e | String |
| Account Name | name | String |
| Account Domain | website | String |
| First Name | firstName | String |
| Last Name | lastName | String |
| Email Address | email | String |
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}/sourcesExample: 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}/dataThe 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:
- Go to Data Import.
- Select the object type.
- Choose your custom source.
- Upload a CSV file and run the import.
Validation Rules
| Rule | name | description |
|---|---|---|
| Required | Yes, cannot be blank | Yes, cannot be blank |
| Maximum length | 100 characters | 300 characters |
| Cannot contain | < or > | < or > |
| Cannot start with | =, +, -, @, tab, or carriage return | = or @ |
| Must be unique in the tenant | Yes | No |
| Cannot match a built-in integration name, such as Salesforce | Yes | No |
Other limits:
| Rule | Value |
|---|---|
priority | 0, or 50 to 99 inclusive |
| Custom sources per tenant | 50 maximum |
| Field mappings per request | At least 1. Every field is required. |
object_type | account 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"
}
}code | HTTP status | Meaning |
|---|---|---|
400-000 | 400 | Bad request |
400-001 | 400 | Invalid field type, or the JSON could not be parsed |
400-005 | 400 | Validation failed: a missing field, priority out of range, a name or description rule, or an invalid field mapping |
400-006 | 400 | Invalid input, for example an ID that is not a number |
409-001 | 400 | A custom source with this name already exists |
429-001 | 400 | The tenant already has 50 custom sources. Delete one before you create another. |
404-000 | 404 | Not found, for example no field mappings exist for this object type |
404-001 | 404 | Custom source not found |
404-002 | 404 | Unsupported object_type |
500-001 | 500 | Unexpected 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:
| Priority | Source Type |
|---|---|
| 50–59 | CRM systems |
| 60–69 | Internal operational systems |
| 70–79 | Enrichment providers |
| 80–99 | Experimental 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,874. 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}/data5. Verify Attribution
Check the job with GET /import/v1/job/{id}. The imported records show partner_intent_feed as their source.
Updated 7 days ago