> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

# Reset endpoint connectivity

PATCH https://iot.telia.lt/api/v1/endpoint/{endpoint_id}/connectivity
Content-Type: application/json

Dispatches a message that causes either a `Cancel Location`, `Delete PDP Context`, or both sent to the endpoint.
The return of the call doesn't yet mean the event has been sent towards the device.

Master organization types can reset any endpoints inside their organization hierarchy.
Enterprises may only reset connectivity of own endpoints.

Reference: https://docs.iot.telia.lt/developers/api/endpoint/update-endpoint-connectivity-by-id

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `endpoint_id` (integer, required) — Numeric ID of an endpoint

### Body (application/json)

This endpoint expects an object.

- `pdp_context` (any, optional, nullable)
- `location` (any, optional, nullable)

## Response

### 204

Successful, no content.

## Errors

### 403 Forbidden Error

Calling organization is not of correct type.

- `any`

### 404 Not Found Error

Endpoint not found.

- `any`

## Examples

### Reset All

**Request**

```json
{
  "pdp_context": null,
  "location": null
}
```

**Response**

```json
{}
```

**SDK Code**

```python Reset All
import requests

url = "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

payload = {
    "pdp_context": None,
    "location": None
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Reset All
const url = 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"pdp_context":null,"location":null}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Reset All
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

	payload := strings.NewReader("{\n  \"pdp_context\": null,\n  \"location\": null\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Reset All
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pdp_context\": null,\n  \"location\": null\n}"

response = http.request(request)
puts response.read_body
```

```java Reset All
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pdp_context\": null,\n  \"location\": null\n}")
  .asString();
```

```php Reset All
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity', [
  'body' => '{
  "pdp_context": null,
  "location": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Reset All
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/12345/connectivity");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pdp_context\": null,\n  \"location\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Reset All
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "pdp_context": ,
  "location": 
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/12345/connectivity")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Reset Network

**Request**

```json
{
  "location": null
}
```

**Response**

```json
{}
```

**SDK Code**

```python Reset Network
import requests

url = "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

payload = { "location": None }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Reset Network
const url = 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"location":null}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Reset Network
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

	payload := strings.NewReader("{\n  \"location\": null\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Reset Network
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"location\": null\n}"

response = http.request(request)
puts response.read_body
```

```java Reset Network
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"location\": null\n}")
  .asString();
```

```php Reset Network
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity', [
  'body' => '{
  "location": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Reset Network
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/12345/connectivity");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"location\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Reset Network
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["location": ] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/12345/connectivity")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Reset Data

**Request**

```json
{
  "pdp_context": null
}
```

**Response**

```json
{}
```

**SDK Code**

```python Reset Data
import requests

url = "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

payload = { "pdp_context": None }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Reset Data
const url = 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"pdp_context":null}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Reset Data
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/12345/connectivity"

	payload := strings.NewReader("{\n  \"pdp_context\": null\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Reset Data
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pdp_context\": null\n}"

response = http.request(request)
puts response.read_body
```

```java Reset Data
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://iot.telia.lt/api/v1/endpoint/12345/connectivity")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pdp_context\": null\n}")
  .asString();
```

```php Reset Data
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://iot.telia.lt/api/v1/endpoint/12345/connectivity', [
  'body' => '{
  "pdp_context": null
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Reset Data
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint/12345/connectivity");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pdp_context\": null\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Reset Data
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["pdp_context": ] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/12345/connectivity")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```