---
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 — Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) config data.
  - `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/aliyun/apis/docker-engine-api.md) · [All operations](https://skmtc.net/aliyun/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aliyun/docker-engine-api/versions/04bb09da9ccb/schema)
