---
title: "Create or Update configuration metadata"
method: POST
path: "/v2/storage/components/{componentId}/configs/{configurationId}/metadata"
tags: ["Metadata"]
---

# Create or Update configuration metadata

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

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/components/{componentId}/configs/{configurationId}/metadata`
- 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/:configurationId/metadata/post.ts> (a function with typed inputs; its response is checked against the schema)

Sets multiple metadata with one call. If the given key and provider combination already exist
for the configuration, the data will be updated with the new value and timestamp. All metadata associated
with the configuration are returned in the response.

All requests must include the branch (`/branch/{branchId}`) in the URL. This is also true for default (production) branch. You can find out the id of your default branch by calling [List Branches](#tag/Development-Branches) and finding branch with attribute `isDefault` set to `true`.

## Path parameters

- `componentId` string, required
- `configurationId` string, required

## Request body

- object
  - `metadata` object[], required: Array of metadata objects.
    - `key` string, required: Metadata key; allowed characters `a-zA-Z0-9_.-`.
    - `value` string, required: Metadata value.

## Response `201`

All metadata of the configuration after the upsert.

- ConfigurationMetadataResponse[]
  - `id` string, required: Metadata entry id.
  - `key` string, required: Metadata key.
  - `value` string, required: Metadata value.
  - `timestamp` string, required: When the entry was last set, ISO 8601 with a `+hhmm` offset.

## Other responses

- `400`: Invalid metadata payload (`validation.failed`), including a `KBC.configuration.folderName` value longer than 400 characters after trimming.
- `403`: Token is not allowed to create configuration metadata.
- `404`: Component (`storage.component.notFound`) or configuration (`storage.configuration.notFound`) not found.
- `409`: Another request is mid-write on the configuration folder; retryable (`storage.components.configurations.versionConflict`).

---

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