# Create a plugin


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`POST /plugins/create`



## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request POST \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  --header 'Content-Type: application/x-tar' \
  --data-binary @request-body \
  'http://localhost/v1.57/plugins/create?name=%3CNAME%3E'
```


Prepare request-body using the selected media type and schema.


## Parameters

### name

Location: query. Required: yes.

The name of the plugin. The `:latest` tag is optional, and is the
default if omitted.


```json
{
  "description": "The name of the plugin. The `:latest` tag is optional, and is the\ndefault if omitted.\n",
  "in": "query",
  "name": "name",
  "pointer": "/paths/~1plugins~1create/post/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Request  application/x-tar

Path to tar containing plugin rootfs and manifest


Schema:

```json
{
  "format": "binary",
  "type": "string"
}
```










### Response 204 

no error

No response content is declared.











### Response 500 application/json

server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "operationId": "PluginCreate",
  "parameters": [
    {
      "description": "The name of the plugin. The `:latest` tag is optional, and is the\ndefault if omitted.\n",
      "in": "query",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/x-tar": {
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "description": "Path to tar containing plugin rootfs and manifest",
    "x-codegen-request-body-name": "tarContext"
  },
  "responses": {
    "204": {
      "description": "no error"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "server error"
    }
  },
  "summary": "Create a plugin",
  "tags": [
    "Plugin"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)




