---
schema_version: "1"
id: a20dfc903b80374177828e29bb80cbd813841a25275dd5a4e8262c49f6899c03
title: Spiff System Activity Log Export API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/sales-cloud/spiff/references/generated-api-specs/spiff-system-activity-log-export-api-reference.md
canonical_url: https://developer.salesforce.com/docs/sales/spiff/references/spiff-system-activity-log-export-api-reference
source_site: developer.salesforce.com
content_type: documentation
content_hash: 19f69816d7b5970ed8c3c47a67655d75c1b009dc77253460882235b4feed4c16
products:
  - Salesforce Spiff
  - Sales Cloud
---
Spiff System Activity Log Export API

# Spiff System Activity Log Export API

Create, query, download, and delete exports of Salesforce Spiff System Activity Log (SAL) data.

All endpoints in the Spiff System Activity Log Export API require OAuth 2.0 authentication with a bearer token scoped for System Activity Log export access. The integration user associated with the OAuth application must have the **System Activity Log: View** permission.

To create a token, a Spiff admin creates a Client ID and Client Secret in Spiff Settings. Then, you can pass the token in the authorization header in your API calls. See [Get Started with Salesforce Spiff System Activity Log Export API](/docs/sales/spiff/guide/system-activity-log-export-api-get-started.html) for more information.

**Version:** 1.0.0

## Servers

*   `https://{subdomain}.spiff.com/api/v1`

Default security: bearerAuth.

## Security

*   `bearerAuth` (http) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    *   HTTP scheme: bearer (JWT)

## Operations

### GET getListExports

`GET /sal/exports`

Operation ID: `getListExports`. Tags: Exports.

Returns a list of System Activity Log exports.

#### Parameters

*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful.
    
    Media type: `application/json`. Schema: `array of ExportRecord`.
    
    Array of `ExportRecord`.
    
    _Example_
    
    ```
    [
      {
        "id": "34ed8d23-63d1-426a-8ed7-075d05aed448",
        "filename": "sal_export_2026-01-01.csv",
        "filters": {},
        "created_at": "",
        "status": "successful",
        "checksum": "9ad8ed9be5096517216e7270fd0dc28f47051c5d050f75688a464d528763c835",
        "row_count": 1234000,
        "file_count": 1234
      },
      {
        "id": "4c3e386f-e758-4193-8ce1-abcbc96566ed",
        "filename": "sal_export_2026-02-01.csv",
        "filters": {},
        "created_at": "",
        "status": "pending",
        "checksum": null,
        "row_count": 0,
        "file_count": 0
      }
    ]
    ```
    
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, or the user isn't authorized to access System Activity Log data.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: invalidScope_
    
    ```
    {
      "message": "Authorization header is missing or does not contain the required scope."
    }
    ```
    
    _Example: unauthorizedUser_
    
    ```
    {
      "message": "User not authorized to manage system activity log data."
    }
    ```
    
*   **403** The request was unsuccessful because the company doesn't have SAL export API access enabled.
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### POST createExport

`POST /sal/exports`

Operation ID: `createExport`. Tags: Exports.

Initiates an asynchronous export job for System Activity Log data. Because this can be a long running task, this request doesn't immediately provide export files. Verify that the export job is complete and download the files using other SAL export endpoints.

#### Parameters

*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `CreateExportRequest`.

#### Responses

*   **202** The export has begun processing.
    
    Media type: `application/json`. Schema: `CreateExportResponse`.
    
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, or the user isn't authorized to access System Activity Log data.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: invalidScope_
    
    ```
    {
      "message": "Authorization header is missing or does not contain the required scope."
    }
    ```
    
    _Example: unauthorizedUser_
    
    ```
    {
      "message": "User not authorized to manage system activity log data."
    }
    ```
    
*   **403** The request was unsuccessful because the company doesn't have SAL export API access enabled.
*   **422**
    
    The request payload is invalid.
    
    This error can occur when:
    
    *   `start_date` and `end_date` are missing.
    *   `end_date` is earlier than `start_date`.
    *   The requested date range exceeds 93 days.
    *   One or more `user_ids` don't exist in the company.
    *   `start_date` or `end_date` uses an invalid date/time format or timezone offset.
    
    Media type: `application/json`. Schema: `ValidationError`.
    
    _Example: missingDates_
    
    When start\_date or end\_date is missing from the request.
    
    ```
    {
      "error": "start_date and end_date are required"
    }
    ```
    
    _Example: invalidDateOrder_
    
    When the given end\_date is not on or after the given start date.
    
    ```
    {
      "error": "end_date must be on or after start_date"
    }
    ```
    
    _Example: invalidDateRange_
    
    When the given date range is greater than 93 days.
    
    ```
    {
      "error": "Date range cannot exceed 93 days"
    }
    ```
    
    _Example: invalidUserIds_
    
    When any of the user external IDs don't map to a real user in the same company. Example input: \["valid-id", "non-valid-id"\].
    
    ```
    {
      "error": "Export request contains user_ids that are not found in the company: non-valid-id"
    }
    ```
    
    _Example: invalidDateFormat_
    
    When start\_date or end\_date is not in a supported format.
    
    ```
    {
      "message": "start_date and end_date must be in the format YYYY-MM-DD or YYYY-MM-DD HH:MM:SS"
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### GET getExport

`GET /sal/exports/{id}`

Operation ID: `getExport`. Tags: Exports.

Returns a single System Activity Log export by ID.

#### Parameters

*   `id` (path, string (uuid), required) The UUID of the export.
    
    _Example_
    
    ```
    fbd0f190-105f-4edc-8492-9adabdcfd7a5
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful.
    
    Media type: `application/json`. Schema: `ExportRecord`.
    
    _Example_
    
    ```
    {
      "id": "a42d8df6-5b36-43bd-8e62-f1651ef4c289",
      "filename": "sal_export_2026-05-26_154643",
      "filters": {
        "end_date": "2026-05-30",
        "by_user_id": null,
        "start_date": "2026-03-1"
      },
      "status": "successful",
      "checksum": "9ad8ed9be5096517216e7270fd0dc28f47051c5d050f75688a464d528763c835",
      "created_at": "2026-05-26T15:46:43.323-06:00",
      "row_count": 96,
      "file_count": 1
    }
    ```
    
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, or the user isn't authorized to access System Activity Log data.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Unauthorized"
    }
    ```
    
*   **404** The specified export ID doesn't exist.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export with id=<id>"
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### DELETE deleteExport

`DELETE /sal/exports/{id}`

Operation ID: `deleteExport`. Tags: Exports.

Deletes a System Activity Log export by ID. This permanently removes the generated export file, and that export ID can no longer be used. This request doesn't delete the underlying System Activity Log data.

#### Parameters

*   `id` (path, string (uuid), required) The UUID of the export.
    
    _Example_
    
    ```
    fbd0f190-105f-4edc-8492-9adabdcfd7a5
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The export was deleted successfully.
    
    Media type: `application/json`. Schema: `DeleteExportResponse`.
    
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, the user isn't authorized, or the export doesn't belong to the same company as the OAuth application company.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Unauthorized"
    }
    ```
    
*   **404** The specified export ID doesn't exist.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export with id=<id>"
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### GET getExportStatus

`GET /sal/exports/{id}/status`

Operation ID: `getExportStatus`. Tags: Exports.

Returns the current status of a System Activity Log export.

#### Parameters

*   `id` (path, string (uuid), required) The UUID of the export.
    
    _Example_
    
    ```
    fbd0f190-105f-4edc-8492-9adabdcfd7a5
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The request was successful.
    
    Media type: `application/json`. Schema: `ExportStatusResponse`.
    
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, the user isn't authorized, or the export doesn't belong to the same company as the OAuth application company.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Unauthorized"
    }
    ```
    
*   **404** The specified export ID doesn't exist.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export with id=<id>"
    }
    ```
    
*   **500** The request was interrupted because an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Something went wrong. Please try again."
    }
    ```
    

### GET downloadExport

`GET /sal/exports/{id}/download`

Operation ID: `downloadExport`. Tags: Exports.

Downloads a zip compressed export for System Activity Logs.

If the export isn't in `successful` status, this endpoint returns status-specific errors.

Example:

```curl
curl -L "https://{subdomain}.spiff.com/api/v1/sal/exports/{id}/download" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -o export_data.zip
```

#### Parameters

*   `id` (path, string (uuid), required) The UUID of the export.
    
    _Example_
    
    ```
    fbd0f190-105f-4edc-8492-9adabdcfd7a5
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The export file was downloaded successfully.
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, the user isn't authorized, or the export doesn't belong to the same company as the OAuth application company.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Unauthorized"
    }
    ```
    
*   **404** The specified export or file wasn't found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: exportNotFound_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export with id=<id>"
    }
    ```
    
    _Example: fileNotFound_
    
    ```
    {
      "message": "Export file not found"
    }
    ```
    
*   **409** The export is still processing.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export is still processing. Please try again later."
    }
    ```
    
*   **410** The export failed and can't be downloaded.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export failed. Please try creating a new export."
    }
    ```
    
*   **500** The export status isn't successful or an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export status is not successful."
    }
    ```
    

### GET downloadExportFile

`GET /sal/exports/{id}/download/{file_number}`

Operation ID: `downloadExportFile`. Tags: Exports.

Downloads an individual gzipped export file by file number. The number of files in a given export can be found on the [getExport](/docs/sales/spiff/references/spiff-system-activity-log-export-api-reference?meta=getExport) or [getListExports](/docs/sales/spiff/references/spiff-system-activity-log-export-api-reference?meta=getListExports) endpoint. For example, if your export has 36 files, the file number used on this endpoint would be 1-36.

#### Parameters

*   `id` (path, string (uuid), required) The UUID of the export.
    
    _Example_
    
    ```
    fbd0f190-105f-4edc-8492-9adabdcfd7a5
    ```
    
*   `file_number` (path, integer, required)
    
    The number of CSV files in the export.
    
    This value must be a positive integer. You can get the total file count from either the [getExport](/docs/sales/spiff/references/spiff-system-activity-log-export-api-reference?meta=getExport) or [getListExports](/docs/sales/spiff/references/spiff-system-activity-log-export-api-reference?meta=getListExports) endpoints.
    
      
    Minimum: 1.
    
    _Example_
    
    ```
    36
    ```
    
*   `Authorization` (header, string, required) A bearer token that you obtain by using the OAuth 2.0 client credentials flow with `client_id`, `client_secret`, `audience`, `grant_type=client_credentials`, and `scope=salApi.SystemActivityLogExport` values specified.
    
    _Example_
    
    ```
    Bearer {YOUR_BEARER_TOKEN}
    ```
    
*   `subdomain` (path, string, required)
    
    The subdomain for your SalesforceSpiff environment.
    
    *   If you're in the US, use `us1`.
    *   If you're in the EU, use `eu1`.
    
    _Example_
    
    ```
    us1
    ```
    

#### Responses

*   **200** The individual export file was downloaded successfully.
*   **401** The request was unsuccessful because the authorization header is missing, the token scope is incorrect, the user isn't authorized, or the export doesn't belong to the same company as the OAuth application company.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Unauthorized"
    }
    ```
    
*   **404** The specified export file or attachment wasn't found.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example: exportNotFound_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export with id=<id>"
    }
    ```
    
    _Example: fileNumberNotFound_
    
    ```
    {
      "message": "Couldn't find System Activity Log Export File with file_number=<file_number> for export_id=<id>"
    }
    ```
    
    _Example: attachmentNotFound_
    
    ```
    {
      "message": "No attachment found for export_id=<id> and file_number=<file_number>"
    }
    ```
    
    _Example: resourceExpired_
    
    ```
    {
      "message": "This resource is no longer available to download. Please ensure the file ID exists and the export request was created within the last week."
    }
    ```
    
*   **409** The export is still processing.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export is still processing. Please try again later."
    }
    ```
    
*   **410** The export failed and can't be downloaded.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export failed. Please try creating a new export."
    }
    ```
    
*   **500** The export status isn't successful or an internal server error occurred.
    
    Media type: `application/json`. Schema: `Error`.
    
    _Example_
    
    ```
    {
      "message": "Export status is not successful."
    }
    ```
    

## Schemas

### ExportRecord

*   `id` (_string (uuid)_) The export ID.  
    Example: `fbd0f190-105f-4edc-8492-9adabdcfd7a5`.
*   `filename` (_string_) The export filename.  
    Example: `sal_export_2026-02-25_101314`.
*   `filters` (_object_) Export filter values used to generate this export.
    
    _Example_
    
    ```
    {
      "start_date": "2025-12-01",
      "end_date": "2026-02-27",
      "by_user_id": null
    }
    ```
    
*   `status` (_string_) The export lifecycle status.  
    Allowed values: `pending`, `running`, `successful`, `failed`. Example: `successful`.
*   `checksum` (_string_, nullable) Checksum value returned for the export.
*   `created_at` (_string (date-time)_) Timestamp when the export request was created.  
    Example: `2026-02-25T10:13:14.942-07:00`.
*   `row_count` (_integer_) Number of rows in the export.  
    Example: `4000021`.
*   `file_count` (_integer_) Number of export files generated.  
    Example: `1234`.

### Error

*   `message` (_string_)

### CreateExportRequest

*   `start_date` (_string_, required)
    
    Start date/time for the export window.
    
    Accepted formats:
    
    *   `YYYY-MM-DD`
    *   `YYYY-MM-DD HH:MM:SS`
    *   `YYYY-MM-DD HH:MM:SSZ`
    *   `YYYY-MM-DD HH:MM:SS+HH:MM`
    *   `YYYY-MM-DD HH:MM:SS-HH:MM`
    
    Timezone behavior:
    
    *   If no timezone is provided, the value is interpreted in the company timezone configured in Company Settings.
    *   If `Z` or an explicit offset is provided, the value is interpreted using that timezone.
    
      
    Example: `2026-01-01 00:00:00`.
*   `end_date` (_string_, required)
    
    End date/time for the export window.
    
    Accepted formats:
    
    *   `YYYY-MM-DD`
    *   `YYYY-MM-DD HH:MM:SS`
    *   `YYYY-MM-DD HH:MM:SSZ`
    *   `YYYY-MM-DD HH:MM:SS+HH:MM`
    *   `YYYY-MM-DD HH:MM:SS-HH:MM`
    
    Timezone behavior:
    
    *   If no timezone is provided, the value is interpreted in the company timezone configured in Company Settings.
        
    *   If `Z` or an explicit offset is provided, the value is interpreted using that timezone.
        
    *   Must be on or after `start_date`
        
    *   Must be within 93 days of `start_date`
        
    
      
    Example: `2026-03-20 23:59:59`.
*   `user_ids` (_array of string_) Optional. List of user external IDs to filter export results. If omitted, the export includes all users.
    
    _Example_
    
    ```
    [
      "ex_id_1",
      "ex_id_2",
      "ex_id_3"
    ]
    ```
    

### CreateExportResponse

*   `message` (_string_)  
    Example: `System Activity Log export request accepted.`.
*   `export_id` (_string (uuid)_)  
    Example: `4c3e386f-e758-4193-8ce1-abcbc96566ed`.

### ValidationError

*   `error` (_string_)

### DeleteExportResponse

*   `message` (_string_)  
    Example: `Export deleted with id=ae2f4d4a-8b20-43e2-9c7f-2a2584f64f4e`.

### ExportStatusResponse

*   `export_status` (_string_) The status of the export.  
    Allowed values: `pending`, `running`, `successful`, `failed`. Example: `# <status> is one of "pending", "running", "successful", or "failed" <status>`.