curl -X POST https://api.chargeapi.co/v1/policies \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"mode": "enforcement",
"name": "Business Hours Policy",
"rules": {
"max_price_per_kwh": 25
}
}'
{
"id": "pol_NCq1tX7rpNAqDwGkXA6ygtiHMbPTHtkY",
"object": "policy",
"created": "2026-04-01T00:08:18.314Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy",
"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
Create a Policy
curl -X POST https://api.chargeapi.co/v1/policies \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"mode": "enforcement",
"name": "Business Hours Policy",
"rules": {
"max_price_per_kwh": 25
}
}'
{
"id": "pol_NCq1tX7rpNAqDwGkXA6ygtiHMbPTHtkY",
"object": "policy",
"created": "2026-04-01T00:08:18.314Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy",
"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"
}
Creates a policy for enforcement or suggestion workflows.
curl -X POST https://api.chargeapi.co/v1/policies \
-H "Authorization: Bearer ch_sk_test_..." \
--json '{
"mode": "enforcement",
"name": "Business Hours Policy",
"rules": {
"max_price_per_kwh": 25
}
}'
{
"id": "pol_NCq1tX7rpNAqDwGkXA6ygtiHMbPTHtkY",
"object": "policy",
"created": "2026-04-01T00:08:18.314Z",
"description": null,
"metadata": {},
"mode": "enforcement",
"name": "Example Policy",
"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
The operational mode of the policy.Available options:
enforcement, suggestionA human-readable name for 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.
The status of the policy.Available options:
active, inactiveMore parameters
An optional description of the policy’s purpose.
Set of key-value pairs that you can attach to an object.
Returns
Returns the created policy.⌘I

