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

# Metadata

Metadata lets you attach custom key-value pairs to supported Charge resources. Use it for IDs, tags, and notes from your own system that do not belong in the main object fields.

<Panel>
  <RequestExample>
    ```bash cURL theme={null}
    curl -X POST https://api.chargeapi.co/v1/vehicles/veh_mK8xDq0RbTw4uNZ7hPLcVfJeQ3sY1nAa \
      -H "Authorization: Bearer ch_sk_test_..." \
      --json '{
        "metadata": {
          "invoice_group": "paris-monthly"
        }
      }'
    ```
  </RequestExample>

  <ResponseExample>
    ```json Response theme={null}
    {
        "id": "veh_mK8xDq0RbTw4uNZ7hPLcVfJeQ3sY1nAa",
        "object": "vehicle",
        "battery_capacity": 77000,
        "charging_standard": "CCS",
        "created": "2026-04-02T08:17:41.219Z",
        "drivers": ["drv_tH4yQm9LcVw2pZr8sJf6xNdA1kBe7uG3"],
        "fleet": "flt_Rn3bWk8QzYv6dLp1sTj5mHxA0cFu2eN4",
        "information": {
            "make": "Nissan",
            "model": "Ariya",
            "year": "2024"
        },
        "metadata": {
            "invoice_group": "paris-monthly"
        },
        "policy_ids": ["pol_Vg7mQe2TbRk9pYx4sNc1hDzA6uLf8wJ0"],
        "registration_plate": "GH-482-LN",
        "status": "active",
        "telemetry": "vtel_Pq2nXc8KbLr5tVz1mHs7dYfA4uW9eJ3",
        "updated": "2026-04-02T09:03:18.644Z",
        "vin": "KMHKR81BFRU123456"
    }
    ```
  </ResponseExample>
</Panel>

<Warning>
  Do not store secrets, payment credentials, or sensitive personal data in metadata.
</Warning>

Metadata is a set of key-value pairs you can attach to supported Charge objects. It lets you store your own context next to Charge data without changing the core schema.

Use metadata to map Charge objects to your internal workflows. For example, a fleet integration might store `invoice_group`, `external_vehicle_id`, or `dispatch_job_id` so operations and billing systems can reconcile records quickly.

Metadata should stay descriptive, not authoritative. If a value controls permissions, billing decisions, or lifecycle rules, keep that logic in your own system of record instead of metadata.

Metadata is returned with supported objects and included in event payloads, which makes it useful for retrieval, logging, and webhook processing. Keep keys stable and predictable over time, and never store secrets or sensitive personal data.

Some objects return metadata, and selected write endpoints accept it in the request body.

## Metadata support by object

| Object                                                      | Endpoints accepting metadata                                                                                                                   |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| [Account](/api-reference/accounts/object)                   | [Create an account](/api-reference/accounts/create)<br />[Update an account](/api-reference/accounts/update)                                   |
| [Driver](/api-reference/drivers/object)                     | [Create a driver](/api-reference/drivers/create)<br />[Update a driver](/api-reference/drivers/update)                                         |
| [Fleet](/api-reference/fleets/object)                       | [Create a fleet](/api-reference/fleets/create)<br />[Update a fleet](/api-reference/fleets/update)                                             |
| [Invoice](/api-reference/invoices/object)                   | [Create an invoice](/api-reference/invoices/create)<br />[Update an invoice](/api-reference/invoices/update)                                   |
| [Policy](/api-reference/policies/object)                    | [Create a policy](/api-reference/policies/create)<br />[Update a policy](/api-reference/policies/update)                                       |
| [Reservation](/api-reference/reservations/object)           | [Create a reservation](/api-reference/reservations/create)<br />[Update a reservation](/api-reference/reservations/update)                     |
| [Vehicle](/api-reference/vehicles/object)                   | [Create a vehicle](/api-reference/vehicles/create)<br />[Update a vehicle](/api-reference/vehicles/update)                                     |
| [Webhook Endpoint](/api-reference/webhook_endpoints/object) | [Create a webhook endpoint](/api-reference/webhook_endpoints/create)<br />[Update a webhook endpoint](/api-reference/webhook_endpoints/update) |

## In practice

Keep metadata keys stable across your integration so they remain useful in search, exports, and support tooling. The most effective values are usually short, explicit, and tied to concepts your own operators already recognize.
