---
title: "Create Configuration"
method: POST
path: "/v2/storage/components/{componentId}/configs"
tags: ["Components and Configurations"]
---

# Create Configuration

`POST /v2/storage/components/{componentId}/configs`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/components/{componentId}/configs`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/components/:componentId/configs/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new component configuration for [Development Branch](#tag/Development-Branches).

The variant without `branch/{branchId}` in the URL is deprecated, use the branch endpoint and set `branch/default`.

## Path parameters

- `componentId` string, required

## Request body

- CreateConfigurationRequest
  - `name` string, required: Configuration name.
  - `configurationId` string, nullable: Configuration id, must be unique within the component (max 100 characters). Auto-generated when omitted.
  - `description` string, nullable: Configuration description.
  - `configuration` object, nullable: Configuration data; the maximum allowed size is 4MB.
  - `state` object, nullable: State data; the maximum allowed size is 4MB.
  - `changeDescription` string, nullable: Description of the configuration modification.
  - `isDisabled` boolean, nullable: Disabled flag. Accepts booleanish values.
  - `folder` string, nullable: Folder to put the configuration in, at most 400 characters after trimming. Surrounding whitespace is trimmed; omitted, `null` or an empty string means no folder.

## Response `201`

Configuration created.

- ConfigurationPartialResponse: Component configuration as returned by create, restore and the components list. `configuration`, `state`, `rowsSortOrder` and `rows` are present only when the endpoint includes them: create includes `configuration` and `state`; restore includes none; the components list follows its `include`.
  - `id` string, required: Configuration id, unique within the component.
  - `name` string, required: Configuration name.
  - `description` string, required: Configuration description.
  - `created` string, required: When the configuration was created, ISO 8601 with a `+hhmm` offset; `""` when none was recorded.
  - `creatorToken` object, required
    - `id` integer, required: Id of the token that created the configuration.
    - `description` string, required: Description of the token (typically the user e-mail).
  - `actor` ActorResponse, required: Who performed the action and through which credential.
    - `type` 'token' | 'session' | 'pat' | 'system', required: Credential the action came through: a Storage token, a programmatic session, a personal access token, or system work.
    - `id` string, required: Token id as a string, session or personal access token UUID, or the system subject.
    - `name` string, required: Token description, the admin email for a session or personal access token, or the system label, as it was when the action happened.
    - `adminId` integer, nullable, required: Admin behind the credential; null for a token without an admin, for system work, and when the admin was not recorded (an object whose creator is known only from its token columns, including rows backfilled from them).
  - `version` integer, required: Current version number. Use it as the `If-Match` precondition for update, delete and purge.
  - `changeDescription` string, nullable, required: Change description of the current version.
  - `isDisabled` boolean, required: Whether the configuration is disabled.
  - `isDeleted` boolean, required: Whether the configuration is in the trash.
  - `folder` string, nullable, required: Folder the configuration is grouped under; `null` when it is in none.
  - `folderUpdated` string, nullable, required: When the folder was last written (set, cleared, copied to a branch or merged), ISO 8601 with a `+hhmm` offset; `null` when the configuration has no folder. Read-only.
  - `configuration` union: Configuration data, arbitrary object defined by the component. `""` when the stored JSON is invalid, `null` or a boolean; a legacy value stored as a JSON array or string is returned as is.
    - object
    - unknown[]
      - unknown
    - string
  - `rowsSortOrder` string[]: Row ids in the desired order; empty when the default order (by id) applies.
  - `rows` ConfigurationRowInConfigurationResponse[]: Configuration rows (not deleted ones).
    - `id` string, required: Row id.
    - `name` string, required: Row name.
    - `description` string, required: Row description.
    - `isDisabled` boolean, required: Whether the row is disabled.
    - `version` integer, required: Current row version number.
    - `created` string, required: When the row was created, ISO 8601 with a `+hhmm` offset; `""` when none was recorded.
    - `creatorToken` ConfigurationCreatorTokenResponse, required
      - `id` integer, required: Id of the token that created the object or version.
      - `description` string, nullable, required: Description of the token (typically the user e-mail).
    - `actor` ActorResponse, required: Who performed the action and through which credential.
      - `type` 'token' | 'session' | 'pat' | 'system', required: Credential the action came through: a Storage token, a programmatic session, a personal access token, or system work.
      - `id` string, required: Token id as a string, session or personal access token UUID, or the system subject.
      - `name` string, required: Token description, the admin email for a session or personal access token, or the system label, as it was when the action happened.
      - `adminId` integer, nullable, required: Admin behind the credential; null for a token without an admin, for system work, and when the admin was not recorded (an object whose creator is known only from its token columns, including rows backfilled from them).
    - `changeDescription` string, nullable, required: Change description of the current row version.
    - `versionIdentifier` string, nullable, required: ULID uniquely identifying the current row version.
    - `state` union: Row state data. Present only when `state` is included. `""` when the stored JSON is invalid, `null` or a boolean; a legacy value stored as a JSON array or string is returned as is.
      - object
      - unknown[]
        - unknown
      - string
    - `configuration` union: Row configuration data. Present only when `configuration` is included. `""` when the stored JSON is invalid, `null` or a boolean; a legacy value stored as a JSON array or string is returned as is.
      - object
      - unknown[]
        - unknown
      - string
  - `state` union: Configuration state data, arbitrary object. `""` when the stored JSON is invalid, `null` or a boolean; a legacy value stored as a JSON array or string is returned as is.
    - object
    - unknown[]
      - unknown
    - string
  - `currentVersion` ConfigurationCurrentVersionResponse, required: Metadata of the current (head) version of the configuration.
    - `created` string, required: When the current version was created, ISO 8601 with a `+hhmm` offset; `""` when none was recorded.
    - `creatorToken` ConfigurationCreatorTokenResponse, required
      - `id` integer, required: Id of the token that created the object or version.
      - `description` string, nullable, required: Description of the token (typically the user e-mail).
    - `actor` ActorResponse, required: Who performed the action and through which credential.
      - `type` 'token' | 'session' | 'pat' | 'system', required: Credential the action came through: a Storage token, a programmatic session, a personal access token, or system work.
      - `id` string, required: Token id as a string, session or personal access token UUID, or the system subject.
      - `name` string, required: Token description, the admin email for a session or personal access token, or the system label, as it was when the action happened.
      - `adminId` integer, nullable, required: Admin behind the credential; null for a token without an admin, for system work, and when the admin was not recorded (an object whose creator is known only from its token columns, including rows backfilled from them).
    - `changeDescription` string, nullable, required: Change description of the current version.
    - `versionIdentifier` string, nullable, required: ULID uniquely identifying the current version across branches.

## Other responses

- `400`: Invalid request body (`storage.components.validation`, `validation.invalidConfigurationFormat`, `validation.invalidStateFormat`).
- `403`: Token is not allowed to manage the component, or orchestrator creation is disabled for the project (`orchestrator.creationDisabled`).
- `404`: Component not found (`storage.component.notFound`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
