---
title: "SalesforceExport: Create job"
method: POST
path: "/job/salesforce-export"
tags: ["Jobs"]
---

# SalesforceExport: Create job

`POST /job/salesforce-export`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/job/salesforce-export`
- Auth: API key in header `Authorization`

Create a SalesforceExport job

## Query parameters

- `account_id` string

## Request body `*/*`

- object
  - `auth_ids` string[]: Authorization IDs associated with the Job
  - `config` object, required: Job configuration, unique per-workflow
    - `extra_fields` object[]: Map all the extra fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination on the right
    - `field_changes` string[]: Select up to 75 user fields to trigger user change events. For any user in the exported audience, if any of the selected field values change, then the user will be updated in Salesforce.
    - `mappings` object[]: Map all the required fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination on the right. All fields in the Salesforce dropdown must be mapped
    - `match_field` string: Field in Salesforce to match records to avoid duplicates. Must be mapped in the fields below. If no match is found, the user will be omitted
    - `max_calls` integer: The maximum number of API calls the Lytics export can make on your behalf per day. See [our docs](https://learn.lytics.com/understanding/integrations/salesforce-integrations/salesforce) for tips on finding and estimating this.
    - `salesforce_object` string
    - `segment_ids` string[]: The Lytics audience(s) you'd like to send to Salesforce.
    - `segments_destination` string: Field in Salesforce to write Lytics audiences
  - `description` string: A user-defined description
  - `drop_events_during_quiet_window` boolean
  - `expires_at` string, date-time
  - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
  - `name` string, required: A user-defined name
  - `quiet_period` integer
  - `quiet_time_of_day` string
  - `quiet_timezone` string

## Response `201`

SalesforceExport Job

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `account_id` string: Lytics Account ID
    - `anomaly_rule` ModelsAnomalyRuleResp
      - `aid` integer
      - `checks` ModelsRuleCheckConfigReq[]
        - `allowable_violations` integer
        - `interval` string
        - `lookback_count` integer
        - `max_threshold` integer
        - `metric_type` string
        - `min_threshold` integer
        - `type` string
        - `variance_pct` number
      - `created` string
      - `id` string
      - `subject_id` string
      - `subject_type` string
      - `updated` string
    - `api_token_auth_id` string: this is set when work is create using access token
    - `auth_ids` string[]: Authorization IDs associated with the Job
    - `config` object, required: Job configuration, unique per-workflow
      - `extra_fields` object[]: Map all the extra fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination on the right
      - `field_changes` string[]: Select up to 75 user fields to trigger user change events. For any user in the exported audience, if any of the selected field values change, then the user will be updated in Salesforce.
      - `mappings` object[]: Map all the required fields from Lytics to Salesforce by selecting the Lytics field on the left, and its Salesforce destination on the right. All fields in the Salesforce dropdown must be mapped
      - `match_field` string: Field in Salesforce to match records to avoid duplicates. Must be mapped in the fields below. If no match is found, the user will be omitted
      - `max_calls` integer: The maximum number of API calls the Lytics export can make on your behalf per day. See [our docs](https://learn.lytics.com/understanding/integrations/salesforce-integrations/salesforce) for tips on finding and estimating this.
      - `salesforce_object` string
      - `segment_ids` string[]: The Lytics audience(s) you'd like to send to Salesforce.
      - `segments_destination` string: Field in Salesforce to write Lytics audiences
    - `created` string
    - `deleted` boolean: The Job has been deleted
    - `description` string: A user-defined description
    - `drop_events_during_quiet_window` boolean
    - `expires_at` string, date-time
    - `id` string: A Lytics-assigned, immutable unique ID for the Job
    - `meta` object: Extra meta data about the job
    - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
    - `name` string, required: A user-defined name
    - `quiet_period` integer
    - `quiet_time_of_day` string
    - `quiet_timezone` string
    - `sleep_until` string
    - `status` 'runnable' | 'sleeping' | 'paused' | 'completed' | 'fault' | 'failed' | 'killed' | 'deleted' | 'unknown': The status of the job
    - `updated` string
    - `user_id` string: The user ID that created or updated the job
    - `workflow` string: The workflow slug
    - `workflow_id` string: The workflow ID
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/job/salesforce-export/post.md)

---

[API](https://skmtc.dev/lytics/apis/lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/lytics-api/revisions/d8e975057aec?raw)
