> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargeapi.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Policy

Creates a policy for enforcement or suggestion workflows.

<RequestExample>
  ```bash cURL theme={null}
  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
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "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"
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="mode" type="string" required>
  The operational mode of the policy.

  Available options: `enforcement`, `suggestion`
</ParamField>

<ParamField body="name" type="string" required>
  A human-readable name for the policy.
</ParamField>

<ParamField body="rules" type="object" required>
  Rules that define how the policy behaves.

  <Expandable title="properties">
    <ParamField body="allowed_operators" type="array of string">
      A list of charging station operator IDs that are permitted.
    </ParamField>

    <ParamField body="denied_operators" type="array of string">
      A list of charging station operator IDs that are explicitly forbidden.
    </ParamField>

    <ParamField body="geofences" type="array of object">
      A list of geographic areas where charging is permitted.

      <Expandable title="properties">
        <ParamField body="center" type="object">
          No description available.

          <Expandable title="properties">
            <ParamField body="latitude" type="number">
              No description available.
            </ParamField>

            <ParamField body="longitude" type="number">
              No description available.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="name" type="string">
          A name for the geofenced area.
        </ParamField>

        <ParamField body="radius_meters" type="integer">
          The radius from the center point in meters.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="max_price_per_kwh" type="integer | null">
      The maximum allowable price per kilowatt-hour in the account's default currency, in the smallest currency unit.
    </ParamField>

    <ParamField body="time_windows" type="array of object">
      Defines when charging is permitted.

      <Expandable title="properties">
        <ParamField body="days_of_week" type="array of string">
          Days of the week this window applies to.

          Available options: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`
        </ParamField>

        <ParamField body="end_time" type="string">
          The end of the time window in 24-hour format.
        </ParamField>

        <ParamField body="start_time" type="string">
          The start of the time window in 24-hour format.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="status" type="string">
  The status of the policy.

  Available options: `active`, `inactive`
</ParamField>

## More parameters

<ParamField body="description" type="string | null">
  An optional description of the policy's purpose.
</ParamField>

<ParamField body="metadata" type="object">
  Set of key-value pairs that you can attach to an object.
</ParamField>

## Returns

Returns the created policy.
