curl -X POST https://api.chargeapi.co/v1/policies/pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"name": "Example Policy v2"
}'
{
"id": "pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP",
"object": "policy",
"created": "2026-04-01T00:09:07.493Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy v2",
"rules": {
"allowed_operators": ["example_operator"],
"denied_operators": [],
"geofences": [
{
"center": {
"latitude": 48.8698,
"longitude": 2.3319
},
"name": "Example Zone",
"radius_meters": 1500
}
],
"max_price_per_kwh": 25,
"time_windows": [
{
"days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"end_time": "18:00",
"start_time": "09:00"
}
]
},
"status": "active"
}
Policies
Update a Policy
curl -X POST https://api.chargeapi.co/v1/policies/pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"name": "Example Policy v2"
}'
{
"id": "pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP",
"object": "policy",
"created": "2026-04-01T00:09:07.493Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy v2",
"rules": {
"allowed_operators": ["example_operator"],
"denied_operators": [],
"geofences": [
{
"center": {
"latitude": 48.8698,
"longitude": 2.3319
},
"name": "Example Zone",
"radius_meters": 1500
}
],
"max_price_per_kwh": 25,
"time_windows": [
{
"days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"end_time": "18:00",
"start_time": "09:00"
}
]
},
"status": "active"
}
Updates a policy. Parameters you omit keep their current values.
curl -X POST https://api.chargeapi.co/v1/policies/pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"name": "Example Policy v2"
}'
{
"id": "pol_dMBjATAAVcbAKtSNnjlfbmnwviSXr8yP",
"object": "policy",
"created": "2026-04-01T00:09:07.493Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy v2",
"rules": {
"allowed_operators": ["example_operator"],
"denied_operators": [],
"geofences": [
{
"center": {
"latitude": 48.8698,
"longitude": 2.3319
},
"name": "Example Zone",
"radius_meters": 1500
}
],
"max_price_per_kwh": 25,
"time_windows": [
{
"days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"end_time": "18:00",
"start_time": "09:00"
}
]
},
"status": "active"
}
Parameters
Updated operational mode of the policy.Available options:
enforcement, suggestionUpdated display name of the policy.
Rules that define how the policy behaves.
Show properties
Show properties
A list of charging station operator IDs that are permitted.
A list of charging station operator IDs that are explicitly forbidden.
A list of geographic areas where charging is permitted.
The maximum allowable price per kilowatt-hour in the account’s default currency, in the smallest currency unit.
Defines when charging is permitted.
Updated status of the policy.Available options:
active, inactiveMore parameters
Updated description of the policy’s purpose.
Set of key-value pairs that you can attach to an object.
Returns
Returns the updated policy.⌘I

