---
title: "Create extract"
method: POST
path: "/api/v3.1/extracts/"
tags: ["Extracts"]
---

# Create extract

`POST /api/v3.1/extracts/`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3.1/extracts/`
- 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.1/extracts/post.ts> (a function with typed inputs; its response is checked against the schema)

Request to this endpoint setups a new extracts. New extract creation request is composed of Connection, Account and Extract Template data.

## Request body

- object
  - `data_table_title` string: Data Table Title
  - `template_id` integer: Template ID
  - `template_settings` object: Template settings
    - `fields` string[]
    - `additional_params` object
    - `sync_historical_data` string: Parameter defining start date for historical data backfill (date in ISO format like "2024-01-01")
    - `scheduling` Scheduling[], nullable: Omit or use null to inherit the template schedules. Global templates require explicit schedules. Effective hourly schedules, including inherited ones, require hourly scheduling to be enabled for the agency. Omitted lookback_window defaults to {name: default}.
      - `days` integer: Day offset within the interval, starting from 0. The valid range depends on `interval`: - `hour`, `day` — must be 0 - `week` — 0–6 (day of week) - `month` — 0–30 (day of month)
      - `hours` integer: Hour at which the run will start (0–23)
      - `minutes` integer: Minute of hour at which the run will start (0–59)
      - `interval` 'hour' | 'day' | 'week' | 'month': Frequency at which the run will be performed: - `hour` — every hour - `day` — once per day - `week` — once per week - `month` — once per month
      - `timezone` string: IANA timezone name (e.g. `UTC`, `America/New_York`) the schedule is interpreted in.
      - `recurrence` integer: How often the schedule repeats within the interval. Defaults to 1.
      - `lookback_window` object: Defines the period data will be extracted for. Applies to extract schedules only — ignored for load schedules.
        - `name` 'default' | 'live' | 'max': Lookback window preset: - `default` — past 30 days from the day of extract - `live` — past 1 day from the day of extract - `max` — past 60 days from the day of extract
    - `dynamic_fields` string[], nullable: Dynamic-field names, validated against the source and persisted on creation.
  - `accounts` integer[]

## Response `201`

Create an Extract

- object
  - `created_orders` object[]
    - `id` integer
    - `account` object
      - `id` integer
      - `name` string
    - `extraction_order_template_name` string
    - `data_table_id` integer
  - `conflicted_orders` object[]
    - `id` integer
    - `account` object
      - `id` integer
      - `name` string
    - `extraction_order_template_name` string
    - `data_table_id` integer

## Other responses

- `401`: Forbidden

---

[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)
