> For the complete documentation index, see [llms.txt](https://docs.monogoto.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monogoto.io/developer/api/things/how-to-change-thing-state.md).

# Update Thing State

## Change a Thing state

<mark style="color:orange;">`PUT`</mark> `https://console.monogoto.io/thing/ThingId_ICCID_{ICCID}/state/`

#### Path Parameters

| Name                                    | Type   | Description           |
| --------------------------------------- | ------ | --------------------- |
| ICCID<mark style="color:red;">\*</mark> | String | The ICCID of your SIM |

#### Headers

| Name                                          | Type   | Description               |
| --------------------------------------------- | ------ | ------------------------- |
| TOKEN\_HERE<mark style="color:red;">\*</mark> | String | Your authentication token |

#### Request Body

| Name                                           | Type   | Description                            |
| ---------------------------------------------- | ------ | -------------------------------------- |
| THING\_STATE<mark style="color:red;">\*</mark> | String | Possible variables: ACTIVE / SUSPENDED |

{% tabs %}
{% tab title="200: OK State changed successfully" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found Not found" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Example using **cURL**:

```bash
curl -X PUT \
    --url "https://console.monogoto.io/thing/ThingId_ICCID_{ICCID}/state/" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer {TOKEN_HERE}" \
    -d "{ \"state\": \"{THING_STATE}\"}"
```

Expected response:

```json
{
    Thing state updated successfully.
}
```

{% hint style="info" %}
Please note that the above shown command needs to be replaced with information:&#x20;

* **{ICCID}** - replace with your Monogoto thing ICCID number
* **{TOKEN\_HERE}** - replace with your token
* **{THING\_STATE}** - replace with the state you wish your Thing to use:
  * **ACTIVE** - SIM card is activated and can be used
  * **SUSPENDED** - SIM card is suspended. Can not be used until status is changed to ACTIVE
    {% endhint %}

Example of request setting Thing state to SUSPENDED:

```bash
curl -X PUT \
    --url "https://console.monogoto.io/thing/ThingId_ICCID_8912372646888991/state/" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -d "{ \"state\": \"SUSPENDED\"}"
```

{% openapi src="/files/lqgrtNg1pOcbxIdacwgh" path="/thing/{ThingId}/state/" method="put" %}
[JPU\_CustomerAPIV\_Without\_Test it.yaml](https://3922449203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0mPxGpottOEfcucXOR%2Fuploads%2FXtNpEMk17YOUrC39Cmvr%2FJPU_CustomerAPIV_Without_Test%20it.yaml?alt=media\&token=09b74b38-dd09-4edc-8f98-4df792b3c986)
{% endopenapi %}


---

# 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.monogoto.io/developer/api/things/how-to-change-thing-state.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.
