---
title: "Load custom setting options"
method: POST
path: "/api/v3/datasources/{datasource_name}/custom_setting_options/"
tags: ["Extraction templates"]
---

# Load custom setting options

`POST /api/v3/datasources/{datasource_name}/custom_setting_options/`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3/datasources/{datasource_name}/custom_setting_options/`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3/datasources/:datasource_name/custom_setting_options/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns selectable options for a custom extraction setting that is backed by source entities. Use this endpoint when an extraction template exposes a `select` custom setting with dynamic `source` metadata and the UI needs to populate its choices for one or more accounts.
Account IDs in the request are remote account IDs from the source platform (the same string IDs used by extraction template preview), scoped by the provided `connection_id`. Search and pagination are applied over the loaded option list by Improvado, so source APIs do not need to support filtering or paging.

## Path parameters

- `datasource_name` string, required

## Request body

- CustomSettingOptionsRequest: Request payload for loading dynamic custom setting options.
  - `template_id` integer, required: Extraction template ID whose custom setting is being resolved.
  - `connection_id` integer, required: Connection ID used to resolve credentials and scope accounts.
  - `account_ids` string[], required: Remote account IDs from the source platform, scoped by `connection_id`. These are the same string account IDs used by extraction template preview.
  - `custom_setting_name` string, required: Custom setting name from the extraction template.
  - `search_query` string: Optional case-insensitive search query applied to loaded options.
  - `page` integer: Page number for paginated options.
  - `page_size` integer: Number of options to return per account.

## Response `200`

Custom setting options grouped by account.

- CustomSettingOptionsResponse: Response containing dynamic custom setting options per account.
  - `custom_setting_name` string: Custom setting name from the request.
  - `results` CustomSettingOptionsAccountResult[]
    - `account_id` string: Remote account ID from the request.
    - `count` integer: Total number of options after the search filter is applied.
    - `next` string, nullable: Next page number as a string, or null if this is the last page.
    - `previous` string, nullable: Previous page number as a string, or null if this is the first page.
    - `results` CustomSettingOption[]: Page of selectable options for this account.
      - `value` string: Value that should be submitted as the custom setting value.
      - `label` string: Human-readable option label.
      - `description` string, nullable: Optional extra text that can be shown in the UI.
    - `search_applied` boolean: Whether a non-empty search query was applied.

## Other responses

- `400`: Bad request
- `403`: Forbidden
- `408`: Request timeout

---

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