> For the complete documentation index, see [llms.txt](https://docs.net2grid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.net2grid.com/device-management-api/streamer-configuration/gateways-eui64-streamer-capacity-peaks-configuration.md).

# /gateways/{eui64}/streamer/capacity-peaks/configuration

Sets the capacity peak threshold in the cp\_mgmt shadow for a specific device. Edge events must be enabled for the device's label partner before the shadow can be updated. When `threshold_value` is provided with `enabled=true`, it is converted from watts to watt-hours and written to the shadow alongside `enabled`. When `threshold_value` is omitted with `enabled=true`, only the `enabled` flag is updated — this is permitted only if the device's cp\_mgmt shadow already has a threshold configured; otherwise `threshold_value` is required.

```json
{"openapi":"3.0.1","info":{"title":"Device Management API","version":"1.6.0"},"tags":[{"name":"Streamer Configuration","description":"Commands to configure the data streaming settings for the devices connected to the platform"}],"servers":[{"url":"https://device-management.n2g-{platform}.net/v2","variables":{"platform":{"default":"dev","description":"The platform name"}}}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"x-api-key","in":"header"}},"parameters":{"EUI64":{"name":"eui64","in":"path","description":"The EUI64 of the device in hexadecimal format.","required":true,"schema":{"type":"string"}}},"schemas":{"CapacityPeaksConfiguration":{"type":"object","description":"Contains the capacity peak threshold configuration. `enabled` is required. `threshold_value` is required when enabling for the first time; omit it to reuse the previously configured value.\n","required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Indicates whether capacity peak alerts are active."},"threshold_value":{"type":"integer","minimum":1,"description":"The capacity peak threshold in Watts. Required when enabling for the first time. If omitted on subsequent enabled=true requests, the previously set value is reused. Ignored when enabled=false.\n"}}},"SuccessfulResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"The success message returned."}}},"ErrorResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"The error message returned."},"code":{"type":"integer","description":"The error code returned."}}}},"responses":{"EUINotFoundErrorResponse":{"description":"Not found:\n  - 400: The device '{eui64}' is not available in the IoT Thing registry.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerErrorResponse":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/gateways/{eui64}/streamer/capacity-peaks/configuration":{"put":{"summary":"/gateways/{eui64}/streamer/capacity-peaks/configuration","description":"Sets the capacity peak threshold in the cp_mgmt shadow for a specific device. Edge events must be enabled for the device's label partner before the shadow can be updated. When `threshold_value` is provided with `enabled=true`, it is converted from watts to watt-hours and written to the shadow alongside `enabled`. When `threshold_value` is omitted with `enabled=true`, only the `enabled` flag is updated — this is permitted only if the device's cp_mgmt shadow already has a threshold configured; otherwise `threshold_value` is required.\n","operationId":"putStreamerCapacityPeaksConfiguration","tags":["Streamer Configuration"],"parameters":[{"$ref":"#/components/parameters/EUI64"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapacityPeaksConfiguration"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessfulResponse"}}}},"400":{"description":"Invalid request:\n  - Request body is required but was not provided.\n  - Schema validation failed due to error: Missing required key: 'enabled'.\n  - Schema validation failed due to error: Value for key 'threshold_value' must be at least 1.\n  - 'threshold_value' is required when enabling capacity peaks for the first time. No previously configured threshold was found for this device.\n  - Edge events are not enabled for label partner '{labelpartner}'.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"$ref":"#/components/responses/EUINotFoundErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.net2grid.com/device-management-api/streamer-configuration/gateways-eui64-streamer-capacity-peaks-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
