---
updatedAt: 2026-08-19T12:19:54.000Z
agentTools:
  projectIndex: https://docs.delivr.ai/llms.txt
---

# Get CRM field mappings

Returns the CRM field mappings, object settings, and task mapping for a Salesforce or HubSpot integration, in the clean public shape.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Integrations",
    "description": "Manage the integrations your exports deliver to: create an Amazon S3 or DelivrDSP destination, list and inspect your integrations, rotate credentials or rename them, and delete one.\n\nCredentials are write-only: you send them on create or update, and they are never returned. Responses carry a `has_credentials` flag instead.\n\nCreate supports `s3` and `delivrdsp`, which authenticate with credentials. Email (configured with recipients) and Slack / CRM (Salesforce, HubSpot) (which connect over OAuth) are set up in the dashboard. List and get return integrations of any type.\n\n**Authentication:** organization API key (`X-Api-Key` + `X-Api-Secret`).\n\n**Base URL:** `https://api.delivr.ai`\n",
    "version": "1.0",
    "contact": {
      "name": "Delivr.ai Support",
      "url": "https://delivr.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.delivr.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": [],
      "ApiSecretAuth": []
    }
  ],
  "tags": [
    {
      "name": "Integrations",
      "description": "Create, read, update, and delete the destinations your exports deliver to."
    }
  ],
  "paths": {
    "/api/v1/integrations/{id}/crm-config": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The integration id (UUID). Must be a `salesforce` or `hubspot` integration.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "getIntegrationCrmConfig",
        "tags": [
          "Integrations"
        ],
        "summary": "Get CRM field mappings",
        "description": "Returns the CRM field mappings, object settings, and task mapping for a Salesforce or HubSpot integration, in the clean public shape.",
        "responses": {
          "200": {
            "description": "The integration's CRM config.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CrmDestinationConfig"
                }
              }
            }
          },
          "400": {
            "description": "The integration is not a `salesforce` or `hubspot` integration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key / secret."
          },
          "404": {
            "description": "No integration with this id in the key's organization."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Organization API key (`dlvr_` prefixed), created in the dashboard at `https://app.delivr.ai/{org_id}/settings/api-keys`. Must be paired with the `X-Api-Secret` header."
      },
      "ApiSecretAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Secret",
        "description": "Secret half of the organization API key, paired with `X-Api-Key`. Both headers are required on every request."
      }
    },
    "schemas": {
      "CrmDestinationConfig": {
        "type": "object",
        "description": "CRM field mappings for a Salesforce or HubSpot integration. The clean public shape: `update_option` and `array_transform` are symbolic.",
        "properties": {
          "field_mappings": {
            "type": "object",
            "description": "Field mappings keyed by CRM object name (e.g. `Account`, `Contact`, `Lead`, `Task`). Each value is the ordered list of mappings for that object.",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CrmFieldMapping"
              }
            }
          },
          "object_settings": {
            "type": "object",
            "description": "Per-object write settings keyed by CRM object name.",
            "additionalProperties": {
              "$ref": "#/components/schemas/CrmObjectSetting"
            }
          },
          "task_mapping": {
            "$ref": "#/components/schemas/CrmTaskMapping"
          }
        }
      },
      "CrmFieldMapping": {
        "type": "object",
        "description": "Maps one CRM field. Provide at least one of `internal_field`, `default_value`, or `sources` (`internal_field` and `sources` are mutually exclusive; a constant uses `default_value` alone).",
        "required": [
          "external_field"
        ],
        "properties": {
          "external_field": {
            "type": "string",
            "minLength": 1,
            "description": "CRM field API name the value is written to, e.g. `Email`, `FirstName`."
          },
          "internal_field": {
            "type": "string",
            "description": "Source data field name, e.g. `business_email`. Omitted when `sources` is set."
          },
          "update_option": {
            "type": "string",
            "description": "How the value is applied on update.",
            "enum": [
              "complete_if_missing",
              "overwrite",
              "write_to_another",
              "none",
              "append"
            ]
          },
          "default_value": {
            "type": "string",
            "description": "Constant when `internal_field` is empty; fallback when the source value is missing."
          },
          "array_transform": {
            "type": "string",
            "description": "How a multi-value source renders. Defaults to `first`.",
            "enum": [
              "first",
              "json",
              "comma",
              "pipe",
              "semicolon",
              "count"
            ]
          },
          "sources": {
            "type": "array",
            "description": "Computed mapping: ordered source fields combined into one CRM field (used with `delimiter` / `array_transform` instead of `internal_field`).",
            "items": {
              "$ref": "#/components/schemas/CrmFieldSource"
            }
          },
          "delimiter": {
            "type": "string",
            "description": "Join delimiter when combining `sources` or rendering a multi-value field."
          },
          "required": {
            "type": "boolean",
            "description": "When true, a record is dropped from the export if this value is empty after defaults."
          }
        }
      },
      "CrmFieldSource": {
        "type": "object",
        "required": [
          "field"
        ],
        "properties": {
          "field": {
            "type": "string",
            "minLength": 1,
            "description": "Source data field name contributing to a computed mapping."
          },
          "transform": {
            "type": "string",
            "description": "Optional per-source transform applied before combining."
          }
        }
      },
      "CrmObjectSetting": {
        "type": "object",
        "properties": {
          "operation": {
            "type": "string",
            "description": "Write operation for this object (provider-specific)."
          },
          "external_id_field": {
            "type": "string",
            "description": "Delivr-owned external id field used as the idempotent match key, e.g. `Contact.Delivr_Profile_Id__c`."
          },
          "default_values": {
            "type": "object",
            "description": "Constant field values applied to every record of this object, keyed by CRM field API name.",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "CrmTaskMapping": {
        "type": "object",
        "description": "Routes Delivr activity/timeline events to CRM Task type/subtype (Salesforce activity timeline).",
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CrmTaskMappingRule"
            }
          },
          "subtype_field": {
            "type": "string",
            "description": "Task field the subtype is written to (default `TaskSubtype`)."
          },
          "subject_template": {
            "type": "string",
            "description": "Optional override of the auto-generated Task Subject."
          },
          "description_template": {
            "type": "string",
            "description": "Optional override of the auto-generated Task Description."
          }
        }
      },
      "CrmTaskMappingRule": {
        "type": "object",
        "required": [
          "source",
          "event_type",
          "task_type"
        ],
        "properties": {
          "source": {
            "type": "string",
            "description": "Delivr event source, e.g. `website`, `dsp`, `audience`."
          },
          "event_type": {
            "type": "string",
            "description": "Delivr event type, e.g. `pageview`, `click`, `impression`."
          },
          "task_type": {
            "type": "string",
            "description": "CRM Task.Type value to write."
          },
          "task_subtype": {
            "type": "string",
            "description": "Optional CRM Task subtype value."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message."
          }
        }
      }
    }
  }
}
```