> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ocpplab.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ocpplab.io/_mcp/server.

# Create charger deployment

POST https://api.ocpplab.io/evcharger/deployment
Content-Type: application/json

Provision one virtual charger deployment for the authenticated organization.

Reference: https://docs.ocpplab.io/api-reference/evcharger/deployment/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an OcppVirtualDeploymentRequest.

- `identity` (string, required) — Unique charge point identity.
- `model` (string, required)
- `ws_url` (string, required) — OCPP WebSocket URL.
- `ocpp_version` (string, required)
- `charger_name` (string, required)
- `location_id` (string, optional, nullable)
- `security_profile` (integer, optional, nullable)
- `authorization_key` (string, optional, nullable)
- `connector_type` (string, optional, nullable)
- `power_kwh` (double, optional, nullable)

## Response

### 201

Charger deployment created

- `id` (string, required)
- `deployment_id` (string, required)
- `identity` (string, required)
- `ocpp_version` (string, required)
- `provisioning_state` (string, required)

## Errors

### 401 Unauthorized Error

Missing or invalid Bearer token

- `detail` (string, required) — Human-readable error message returned by the API.

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional) — One entry per invalid field.

## Types

### ValidationError

Why one field is invalid.

- `loc` (list of ValidationErrorLocItems, required) — Where the field is: ``body`` / ``query`` / ``path`` / ``header``, then its name.
- `msg` (string, required) — What is wrong, in English.
- `type` (string, required) — Machine-readable error code, e.g. ``missing``.
- `input` (any, optional) — The value that was sent.
- `ctx` (ValidationErrorCtx, optional) — Details of the rule that failed, e.g. `{"le": 200}`.

### ValidationErrorLocItems

### ValidationErrorCtx

Details of the rule that failed, e.g. `{"le": 200}`.

## Examples

### evcharger_deployment_create_example

**Response**

```json
{
  "id": "9167af9e-5157-4c45-9694-ae8ede085fae",
  "deployment_id": "vd-cp-zzz-test-001-1713411e-a568-402a-a5fe-22b8ce2d59e3",
  "identity": "CP-ZZZ-TEST-001",
  "ocpp_version": "ocpp1.6",
  "provisioning_state": "READY"
}
```

**SDK Code**

```python evcharger_deployment_create_example
import requests

url = "https://api.ocpplab.io/evcharger/deployment"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript evcharger_deployment_create_example
const url = 'https://api.ocpplab.io/evcharger/deployment';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go evcharger_deployment_create_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ocpplab.io/evcharger/deployment"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby evcharger_deployment_create_example
require 'uri'
require 'net/http'

url = URI("https://api.ocpplab.io/evcharger/deployment")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java evcharger_deployment_create_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.ocpplab.io/evcharger/deployment")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php evcharger_deployment_create_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.ocpplab.io/evcharger/deployment', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp evcharger_deployment_create_example
using RestSharp;

var client = new RestClient("https://api.ocpplab.io/evcharger/deployment");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift evcharger_deployment_create_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ocpplab.io/evcharger/deployment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create an OCPP 1.6 charger deployment

**Request**

```json
{
  "identity": "CP-TEST-001",
  "model": "wallbox-pulsar-plus",
  "ws_url": "wss://evcharger.example.com",
  "ocpp_version": "OCPP1.6",
  "charger_name": "Bay A01"
}
```

**Response**

```json
{
  "id": "9167af9e-5157-4c45-9694-ae8ede085fae",
  "deployment_id": "vd-cp-zzz-test-001-1713411e-a568-402a-a5fe-22b8ce2d59e3",
  "identity": "CP-ZZZ-TEST-001",
  "ocpp_version": "ocpp1.6",
  "provisioning_state": "READY"
}
```

**SDK Code**

```python Create an OCPP 1.6 charger deployment
import requests

url = "https://api.ocpplab.io/evcharger/deployment"

payload = {
    "identity": "CP-TEST-001",
    "model": "wallbox-pulsar-plus",
    "ws_url": "wss://evcharger.example.com",
    "ocpp_version": "OCPP1.6",
    "charger_name": "Bay A01"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create an OCPP 1.6 charger deployment
const url = 'https://api.ocpplab.io/evcharger/deployment';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"identity":"CP-TEST-001","model":"wallbox-pulsar-plus","ws_url":"wss://evcharger.example.com","ocpp_version":"OCPP1.6","charger_name":"Bay A01"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create an OCPP 1.6 charger deployment
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ocpplab.io/evcharger/deployment"

	payload := strings.NewReader("{\n  \"identity\": \"CP-TEST-001\",\n  \"model\": \"wallbox-pulsar-plus\",\n  \"ws_url\": \"wss://evcharger.example.com\",\n  \"ocpp_version\": \"OCPP1.6\",\n  \"charger_name\": \"Bay A01\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create an OCPP 1.6 charger deployment
require 'uri'
require 'net/http'

url = URI("https://api.ocpplab.io/evcharger/deployment")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"identity\": \"CP-TEST-001\",\n  \"model\": \"wallbox-pulsar-plus\",\n  \"ws_url\": \"wss://evcharger.example.com\",\n  \"ocpp_version\": \"OCPP1.6\",\n  \"charger_name\": \"Bay A01\"\n}"

response = http.request(request)
puts response.read_body
```

```java Create an OCPP 1.6 charger deployment
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.ocpplab.io/evcharger/deployment")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"identity\": \"CP-TEST-001\",\n  \"model\": \"wallbox-pulsar-plus\",\n  \"ws_url\": \"wss://evcharger.example.com\",\n  \"ocpp_version\": \"OCPP1.6\",\n  \"charger_name\": \"Bay A01\"\n}")
  .asString();
```

```php Create an OCPP 1.6 charger deployment
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.ocpplab.io/evcharger/deployment', [
  'body' => '{
  "identity": "CP-TEST-001",
  "model": "wallbox-pulsar-plus",
  "ws_url": "wss://evcharger.example.com",
  "ocpp_version": "OCPP1.6",
  "charger_name": "Bay A01"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create an OCPP 1.6 charger deployment
using RestSharp;

var client = new RestClient("https://api.ocpplab.io/evcharger/deployment");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"identity\": \"CP-TEST-001\",\n  \"model\": \"wallbox-pulsar-plus\",\n  \"ws_url\": \"wss://evcharger.example.com\",\n  \"ocpp_version\": \"OCPP1.6\",\n  \"charger_name\": \"Bay A01\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create an OCPP 1.6 charger deployment
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "identity": "CP-TEST-001",
  "model": "wallbox-pulsar-plus",
  "ws_url": "wss://evcharger.example.com",
  "ocpp_version": "OCPP1.6",
  "charger_name": "Bay A01"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ocpplab.io/evcharger/deployment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```