> For the complete documentation index, see [llms.txt](https://docs.blynk.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blynk.io/en/blynk.cloud/device-https-api/update-datastream-value.md).

# Update Datastream Value

## Update the Datastream value

<mark style="color:blue;">`GET`</mark> `https://{server_address}/external/api/update?token={token}&{pin}={value}`

This endpoint allows you to update the value of the Datastream value via GET request.\
**Example:**\
`https://blynk.cloud/external/api/update?token=ffujYGgbf805tgsf&v1=100`

#### Path Parameters

| Name  | Type   | Description                                                                                                                                                                                                                                   |
| ----- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value | string | The desired value of the Datastream. Will be parsed based on the Datastream data type (int, double, string) and bounded with min / max values of datastream settings. In case value doesn't match the Datastream type error will be returned. |
| pin   | string | Virtual pin number (should start with "v")                                                                                                                                                                                                    |
| token | string | Device auth token                                                                                                                                                                                                                             |

{% tabs %}
{% tab title="200 Success" %}

```
```

{% endtab %}

{% tab title="400 " %}

```
{"error":{"message":"Invalid token."}}
or
{"error":{"message":"Wrong pin format."}}
or
{"error":{"message":"Value doesn't match the Datastream data type."}}
or
{"error":{"message":"No datastream setup for that pin."}}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can get the **Device auth token** in [Device info](https://bit.ly/BlynkSimpleAuth).
{% endhint %}

## Update value by Datastream ID

<mark style="color:blue;">`GET`</mark> `https://{server_address}/external/api/update?token={token}&dataStreamId={id}&value={value}`

{% swagger-response status="400" description="Could not find a device token or Wrong dataStreamId format or Value doesn't match the Datastream data type" %}

```
{"error":{"message":"Invalid token."}}

or

{"error":{"message":"Wrong dataStreamId format."}}

or

{"error":{"message":"Value doesn't match the Datastream data type"}}
```

To update Datastreams that have 2 values, for example Location Datastream, use this call:

```
/external/api/update?token={token}&dataStreamId={id}&value=lon&value=lat
```

or

```
/external/api/update?token={token}&pin=V1&value=lon&value=lat
```


---

# 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.blynk.io/en/blynk.cloud/device-https-api/update-datastream-value.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.
