> 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.

# Register a charger point

POST https://api.ocpplab.io/proxy/charger-points
Content-Type: application/json

Registers a charger on the OCPP gateway for the organization in the Bearer JWT. An optional ``basic_auth_password`` sets the charger's HTTP Basic credentials; it is never returned (see ``has_basic_auth``). 409 if the ``charge_point_id`` is already registered.

Reference: https://docs.ocpplab.io/api-reference/proxy/charger-points/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 a ChargerPointCreateRequest.

- `charge_point_id` (string, required) — Id the charger uses in its WebSocket path.
- `label` (string, optional, nullable)
- `vendor` (string, optional, nullable)
- `model` (string, optional, nullable)
- `serial_number` (string, optional, nullable)
- `firmware_version` (string, optional, nullable)
- `ocpp_version` (enum, optional, nullable)
  - Allowed values: `ocpp1.6`, `ocpp2.0.1`, `ocpp2.1`
- `enabled` (boolean, optional, default: true)
- `security_profile` (integer, optional, default: 0)
- `metadata` (map from string to any, optional)
- `basic_auth_password` (string, optional, nullable) — Write-only; responses expose only ``has_basic_auth``.

## Response

### 201

Successful Response

- `id` (string, required)
- `charge_point_id` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `label` (string, optional, nullable)
- `vendor` (string, optional, nullable)
- `model` (string, optional, nullable)
- `serial_number` (string, optional, nullable)
- `firmware_version` (string, optional, nullable)
- `ocpp_version` (enum, optional, nullable)
  - Allowed values: `ocpp1.6`, `ocpp2.0.1`, `ocpp2.1`
- `enabled` (boolean, optional, default: true)
- `security_profile` (integer, optional, default: 0)
- `metadata` (map from string to any, optional)
- `has_basic_auth` (boolean, optional, default: false)
- `last_seen_at` (datetime, optional, nullable)
- `revision` (integer, optional, default: 1) — Bumped on every update.

## Errors

### 401 Unauthorized Error

Missing or invalid Bearer token

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

### 409 Conflict Error

Already exists or not allowed in its current state

- `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.

### 429 Too Many Requests Error

Gateway rate limit reached; retry after the given seconds

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

### 502 Bad Gateway Error

Gateway unreachable, failing, or misconfigured

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

### 504 Gateway Timeout Error

Gateway timed out

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

## 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

**Request**

```json
{
  "charge_point_id": "CP-AMS-001",
  "label": "Amsterdam depot, bay 1",
  "vendor": "ABB",
  "model": "Terra AC W22",
  "ocpp_version": "ocpp2.0.1",
  "security_profile": 1,
  "metadata": {
    "site": "ams-depot"
  },
  "basic_auth_password": "s3cure-charger-password"
}
```

**Response**

```json
{
  "id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b",
  "charge_point_id": "CP-AMS-001",
  "created_at": "2026-09-30T10:00:00Z",
  "updated_at": "2026-09-30T10:00:00Z",
  "label": "Amsterdam depot, bay 1",
  "vendor": "ABB",
  "model": "Terra AC W22",
  "serial_number": "ABB-22-000123",
  "firmware_version": "1.8.2",
  "ocpp_version": "ocpp2.0.1",
  "enabled": true,
  "security_profile": 1,
  "metadata": {
    "site": "ams-depot"
  },
  "has_basic_auth": true,
  "last_seen_at": "2026-09-30T10:00:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.ocpplab.io/proxy/charger-points"

payload = {
    "charge_point_id": "CP-AMS-001",
    "label": "Amsterdam depot, bay 1",
    "vendor": "ABB",
    "model": "Terra AC W22",
    "ocpp_version": "ocpp2.0.1",
    "security_profile": 1,
    "metadata": { "site": "ams-depot" },
    "basic_auth_password": "s3cure-charger-password"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.ocpplab.io/proxy/charger-points';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"charge_point_id":"CP-AMS-001","label":"Amsterdam depot, bay 1","vendor":"ABB","model":"Terra AC W22","ocpp_version":"ocpp2.0.1","security_profile":1,"metadata":{"site":"ams-depot"},"basic_auth_password":"s3cure-charger-password"}'
};

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

```go
package main

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

func main() {

	url := "https://api.ocpplab.io/proxy/charger-points"

	payload := strings.NewReader("{\n  \"charge_point_id\": \"CP-AMS-001\",\n  \"label\": \"Amsterdam depot, bay 1\",\n  \"vendor\": \"ABB\",\n  \"model\": \"Terra AC W22\",\n  \"ocpp_version\": \"ocpp2.0.1\",\n  \"security_profile\": 1,\n  \"metadata\": {\n    \"site\": \"ams-depot\"\n  },\n  \"basic_auth_password\": \"s3cure-charger-password\"\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
require 'uri'
require 'net/http'

url = URI("https://api.ocpplab.io/proxy/charger-points")

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  \"charge_point_id\": \"CP-AMS-001\",\n  \"label\": \"Amsterdam depot, bay 1\",\n  \"vendor\": \"ABB\",\n  \"model\": \"Terra AC W22\",\n  \"ocpp_version\": \"ocpp2.0.1\",\n  \"security_profile\": 1,\n  \"metadata\": {\n    \"site\": \"ams-depot\"\n  },\n  \"basic_auth_password\": \"s3cure-charger-password\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.ocpplab.io/proxy/charger-points")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"charge_point_id\": \"CP-AMS-001\",\n  \"label\": \"Amsterdam depot, bay 1\",\n  \"vendor\": \"ABB\",\n  \"model\": \"Terra AC W22\",\n  \"ocpp_version\": \"ocpp2.0.1\",\n  \"security_profile\": 1,\n  \"metadata\": {\n    \"site\": \"ams-depot\"\n  },\n  \"basic_auth_password\": \"s3cure-charger-password\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.ocpplab.io/proxy/charger-points', [
  'body' => '{
  "charge_point_id": "CP-AMS-001",
  "label": "Amsterdam depot, bay 1",
  "vendor": "ABB",
  "model": "Terra AC W22",
  "ocpp_version": "ocpp2.0.1",
  "security_profile": 1,
  "metadata": {
    "site": "ams-depot"
  },
  "basic_auth_password": "s3cure-charger-password"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.ocpplab.io/proxy/charger-points");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"charge_point_id\": \"CP-AMS-001\",\n  \"label\": \"Amsterdam depot, bay 1\",\n  \"vendor\": \"ABB\",\n  \"model\": \"Terra AC W22\",\n  \"ocpp_version\": \"ocpp2.0.1\",\n  \"security_profile\": 1,\n  \"metadata\": {\n    \"site\": \"ams-depot\"\n  },\n  \"basic_auth_password\": \"s3cure-charger-password\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "charge_point_id": "CP-AMS-001",
  "label": "Amsterdam depot, bay 1",
  "vendor": "ABB",
  "model": "Terra AC W22",
  "ocpp_version": "ocpp2.0.1",
  "security_profile": 1,
  "metadata": ["site": "ams-depot"],
  "basic_auth_password": "s3cure-charger-password"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ocpplab.io/proxy/charger-points")! 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()
```