---
title: "Create a config"
method: POST
path: "/configs/create"
tags: ["Config"]
---

# Create a config

`POST /configs/create`

## Request body

- object
  - `Name` string — User-defined name of the config.
  - `Labels` object — User-defined key/value metadata.
  - `Data` string — Data is the data to store as a config, formatted as a Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize).
  - `Templating` Driver — Driver represents a driver (network, logging, secrets).
    - `Name` string, required — Name of the driver.
    - `Options` object — Key/value map of driver-specific options.

## Response `201`

no error

- IDResponse — Response to an API call that returns just an Id
  - `Id` string, required — The id of the newly created object.

## Other responses

- `409` — name conflicts with an existing object
- `500` — server error
- `503` — node is not part of a swarm

---

[API](https://skmtc.net/chapar-rest/apis/docker-engine-api.md) · [All operations](https://skmtc.net/chapar-rest/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chapar-rest/docker-engine-api/revisions/3a78a994dd0d/schema)
