> 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/device-management/gateways-eui64-wlan-leave.md).

# /gateways/{eui64}/wlan/leave

Makes a gateway forget its Wi-Fi credentials and close the Wi-Fi connection.

```json
{"openapi":"3.0.1","info":{"title":"Device Management API","version":"1.7.0"},"tags":[{"name":"Device Management","description":"Commands to configure 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":{"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":{"MissingOrInvalidEUIErrorResponse":{"description":"Invalid request:\n  - Missing required 'path' parameter: 'eui64'.\n  - The provided EUI64 '{eui64}' is not a valid hexadecimal string.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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"}}}},"DeviceOfflineOnWlanLeaveErrorResponse":{"description":"The device '{eui64}' is currently offline and the WLAN leave command cannot be sent.\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}/wlan/leave":{"put":{"summary":"/gateways/{eui64}/wlan/leave","description":"Makes a gateway forget its Wi-Fi credentials and close the Wi-Fi connection.","operationId":"putWlanLeave","tags":["Device Management"],"parameters":[{"$ref":"#/components/parameters/EUI64"}],"responses":{"202":{"description":"Accepted - The wlan-leave command was sent to the device","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessfulResponse"}}}},"400":{"$ref":"#/components/responses/MissingOrInvalidEUIErrorResponse"},"404":{"$ref":"#/components/responses/EUINotFoundErrorResponse"},"409":{"$ref":"#/components/responses/DeviceOfflineOnWlanLeaveErrorResponse"},"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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.net2grid.com/device-management-api/device-management/gateways-eui64-wlan-leave.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
