---
title: "Work Create"
method: POST
path: "/api/work"
tags: ["Work"]
---

# Work Create

`POST /api/work`

## Request

- Base URL: `https://api.lytics.io`
- URL: `https://api.lytics.io/api/work`
- Auth: API key in header `Authorization`

There are a list of available work-types in the workflow api.

To create a work unit, there is a *config* block with the work configuration
settings, with the fields listed in the workflow.

```sh

curl -s -H "Authorization: $LIOKEY" \
  -XPOST "https://api.lytics.io/api/work" -d '
{
    "workflow_id":"eventscopy"
    , "name":"Ecommerce Demo Copy"
    , "config":{
        "destination_aid": "2223"
    }
}
' | jq '.'

```

## Query parameters

- `account_id` string

## Request body

- object
  - `config` object
    - `delimiter` unknown
    - `email_to` string
    - `fields` unknown[]
      - unknown
    - `limit` unknown
    - `segment_id` string
    - `table` string
    - `write_headers` boolean
  - `workflow_id` string

## Response `201`

Created

- WorkModel
  - `data` object
    - `account_id` string
    - `aid` number
    - `config` object
      - `delimiter` unknown
      - `email_to` string
      - `fields` unknown[]
        - unknown
      - `limit` unknown
      - `segment_id` string
      - `table` string
      - `write_headers` boolean
    - `state` object
    - `statuscode` string
    - `hidden` boolean
    - `id` string
    - `created` string
    - `updated` string
    - `runtime` string
    - `deleted` boolean
    - `tag` string
    - `user_id` string
    - `work_state_version` number
    - `workflow` string
    - `workflow_id` string

---

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