---
title: "Create chunk"
method: POST
path: "/chunks"
tags: ["chunks"]
---

# Create chunk

`POST /chunks`

Create a chunk object

## Request body

- AddChunk
  - `ilaId` string
  - `token` string
  - `cid` string
  - `def` object
    - `domainId` string
    - `schemaUri` string
  - `payload` object
    - `firstName` string
    - `lastName` string
    - `email` string

## Response `200`

- AddChunkResponse
  - `data` object
    - `_id` string
    - `ilaId` string
    - `cid` string
    - `payload` object
      - `firstName` string
      - `lastName` string
      - `email` string
    - `def` object
      - `domainId` string
      - `schemaUri` string
    - `meta` object
    - `expireAt` string
    - `valid` boolean
  - `meta` object

## Other responses

- `400` — Payload does not contain cid, input does not match schema or schema is invalid!
- `401` — Service token not provided!
- `404` — DomainId or schemaUri not found!
- `405` — Either domainId with schemaUri or custom schema must be specified, but not both!
- `500` — Internal server error!

---

[API](https://skmtc.net/openintegrationhub/apis/integration-layer-service.md) · [All operations](https://skmtc.net/openintegrationhub/apis/integration-layer-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openintegrationhub/integration-layer-service/versions/e932fcaafbb9/schema)
