> 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.

# Create an endpoint

POST https://iot.telia.lt/api/v1/endpoint
Content-Type: application/json

Creates a single endpoint with the specified configuration.

For bulk operations, use [`POST /api/v2/endpoint/multi`](/developers/api/endpoint/bulk-create-endpoint) instead (supports up to 2,000 endpoints per request).

Telia charges for activated SIMs, even if the endpoint status is set to **Disabled**.

Reference: https://docs.iot.telia.lt/developers/api/endpoint/create-endpoint

## 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

### Body (application/json)

This endpoint expects an object.

- `service_profile` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaServiceProfile, required) — Service profile that determines network access settings. Must belong to your organization.
- `tariff_profile` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaTariffProfile, required) — Tariff profile that determines pricing and data limits. Must belong to your organization.
- `status` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaStatus, required) — Initial endpoint status.
- `name` (string, optional) — Display name for the endpoint.
- `tag_assignments` (list of integer, optional) — IDs of existing tags to assign to the endpoint. Unlike `tags`, tags are not created automatically, so every ID must already exist. Mutually exclusive with `tags`. Provide at most one of the two.
- `imei` (string, optional) — International Mobile Equipment Identity with Software Version Number (IMEISV) (16 digits).
- `imei_lock` (boolean, optional, default: false) — If `true`, this endpoint only allows connections from the device with the specified IMEI.
- `sim` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaSim, optional) — SIM card to assign to this endpoint. If omitted, no SIM is assigned.
- `ip_address` (string, optional) — Private IP address to assign. If provided, you must also specify `ip_address_space`.
- `organisation` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaOrganisation, optional) — Organization to create the endpoint in. Required only for reseller accounts creating endpoints in sub-organizations.
- `ip_address_space` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaIpAddressSpace, optional) — IP address space for the endpoint. Required if `ip_address` is provided.
- `tags` (string, optional, deprecated) — Comma-separated list of tags (for example, `sensor,outdoor`). Tags that do not exist yet are created. Deprecated. Use `tag_assignments` instead.

## Response

### 201

Endpoint created successfully.

- `id` (integer, required) — Unique identifier for the endpoint.
- `ip_address` (string, required) — Private IP address assigned to this endpoint.
- `status` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaStatus, required) — Endpoint connectivity status.
- `name` (string, required) — Display name for the endpoint.
- `created` (string, required) — Date and time when the endpoint was created (ISO 8601 format).
- `last_updated` (string, required) — Date and time when the endpoint was last modified (ISO 8601 format).
- `imei_lock` (boolean, required) — If `true`, this endpoint only allows connections from the device with the specified IMEI.
- `service_profile` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaServiceProfile, required) — Service profile assigned to this endpoint.
- `tariff_profile` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaTariffProfile, required) — Tariff profile assigned to this endpoint.
- `ip_address_space` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaIpAddressSpace, required) — IP address space containing this endpoint's private IP address.
- `tags` (string, required, deprecated) — Comma-separated list of tags. Empty when the endpoint has no tags assigned. Deprecated. Use `tag_assignments` instead.
- `tag_assignments` (list of ApiV1EndpointPostResponsesContentApplicationJsonSchemaTagAssignmentsItems, optional) — Structured tag data with color information.
- `imei` (string, optional) — IMEI with Software Version Number (IMEISV) (16 digits). Omitted when the device hasn't reported an IMEI.
- `sim` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaSim, optional) — SIM card assigned to this endpoint. Omitted when the endpoint has no SIM.
- `imei_with_luhn` (string, optional) — IMEI with Luhn checksum digit, without Software Version Number (15 digits). Omitted when the device hasn't reported an IMEI.

## Errors

### 400 Bad Request Error

Request body is malformed. Check JSON syntax.

- `any`

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

### 404 Not Found Error

IP address space is full, in use for creating another endpoint or the resource wasn't found.

- `any`

### 422 Unprocessable Entity Error

Validation failed. Possible causes: - Invalid service profile, tariff profile, or status ID - Invalid IP address space or organization ID - Endpoint data is invalid - Organization doesn't belong to your reseller - Both `tags` and `tag_assignments` were provided

- `message` (string, required) — Error summary.
- `error_code` (integer, required) — Application-specific error code.
- `error_token` (string, required) — Error type identifier.
- `errors` (list of ApiV1EndpointPostResponsesContentApplicationJsonSchemaErrorsItems, required) — List of validation errors.
- `status_code` (integer, optional) — HTTP status code.

## Types

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaServiceProfile

Service profile that determines network access settings. Must belong to your organization.

- `id` (integer, required) — Service profile ID.

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaTariffProfile

Tariff profile that determines pricing and data limits. Must belong to your organization.

- `id` (integer, required) — Tariff profile ID.

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaStatus

Initial endpoint status.

- `id` (integer, required) — Status ID. Valid values are `0` (Enabled) or `1` (Disabled).

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaSim

SIM card to assign to this endpoint. If omitted, no SIM is assigned.

- `id` (integer, required) — SIM ID to assign. The SIM must belong to your organization and not be assigned to another endpoint.
- `activate` (boolean, optional, default: true) — Whether to activate the SIM after assignment. Defaults to `true`, so the SIM is activated unless you explicitly set this to `false`. If [factory test mode (FTM)](/developers/connectivity/factory-test-mode) is enabled for your organization, an activated SIM enters FTM instead of Activated.
- `status` (ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaSimStatus, optional) — Explicitly set the SIM status, overriding the default activation behavior.

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaOrganisation

Organization to create the endpoint in. Required only for reseller accounts creating endpoints in sub-organizations.

- `id` (integer, required) — Organization ID.

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaIpAddressSpace

IP address space for the endpoint. Required if `ip_address` is provided.

- `id` (integer, required) — IP address space ID.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaStatus

Endpoint connectivity status.

- `id` (integer, required) — Status ID (`0` = Enabled, `1` = Disabled).
- `description` (string, required) — Human-readable status name.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaServiceProfile

Service profile assigned to this endpoint.

- `id` (integer, required) — Service profile ID.
- `name` (string, required) — Service profile name.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaTariffProfile

Tariff profile assigned to this endpoint.

- `id` (integer, required) — Tariff profile ID.
- `name` (string, required) — Tariff profile name.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaIpAddressSpace

IP address space containing this endpoint's private IP address.

- `id` (integer, optional) — IP address space ID.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaTagAssignmentsItems

- `id` (integer, optional) — Tag ID.
- `name` (string, optional) — Tag name.
- `tag_color` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaTagAssignmentsItemsTagColor, optional) — Color assigned to this tag for UI display.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaSim

SIM card assigned to this endpoint. Omitted when the endpoint has no SIM.

- `id` (integer, optional) — SIM ID.
- `iccid` (string, optional) — ICCID without Luhn checksum digit (19 digits).
- `iccid_with_luhn` (string, optional) — ICCID with Luhn checksum digit (20 digits).
- `sim_profile_type_id` (integer, optional) — SIM profile type ID.
- `imsi` (string, optional) — International Mobile Subscriber Identity (IMSI).
- `msisdn` (string, optional) — Phone number assigned to this SIM.
- `status` (ApiV1EndpointPostResponsesContentApplicationJsonSchemaSimStatus, optional) — SIM activation status.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaErrorsItems

- `error_code` (integer, optional) — Application-specific error code.
- `error_token` (string, optional) — Error type identifier.
- `message` (string, optional) — Detailed error message.

### ApiV1EndpointPostRequestBodyContentApplicationJsonSchemaSimStatus

Explicitly set the SIM status, overriding the default activation behavior.

- `id` (integer, required) — SIM status ID. Valid values are `1` (Activated) or `4` (Factory Test).

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaTagAssignmentsItemsTagColor

Color assigned to this tag for UI display.

- `id` (integer, optional) — Color ID.

### ApiV1EndpointPostResponsesContentApplicationJsonSchemaSimStatus

SIM activation status.

- `id` (integer, optional) — Status ID.
- `description` (string, optional) — Human-readable status name.

## Examples

**Request**

```json
{
  "service_profile": {
    "id": 123
  },
  "tariff_profile": {
    "id": 123
  },
  "status": {
    "id": 0
  },
  "name": "test",
  "tag_assignments": [
    1,
    2
  ],
  "imei": "123456789012345",
  "imei_lock": false,
  "sim": {
    "id": 3595575,
    "activate": true
  },
  "ip_address": "127.0.0.1",
  "organisation": {
    "id": 123
  },
  "ip_address_space": {
    "id": 123
  }
}
```

**Response**

```json
{
  "id": 1001,
  "ip_address": "10.0.0.1",
  "status": {
    "id": 1,
    "description": "Disabled"
  },
  "name": "Weather Station 01",
  "created": "2024-01-15T14:44:27.622+0000",
  "last_updated": "2024-01-15T14:44:27.622+0000",
  "imei_lock": false,
  "service_profile": {
    "id": 200,
    "name": "Standard IoT"
  },
  "tariff_profile": {
    "id": 100,
    "name": "Global IoT Plan"
  },
  "ip_address_space": {
    "id": 1
  },
  "tags": "sensor,outdoor",
  "tag_assignments": [
    {
      "id": 1,
      "name": "sensor",
      "tag_color": {
        "id": 3
      }
    },
    {
      "id": 2,
      "name": "outdoor",
      "tag_color": {
        "id": 5
      }
    }
  ],
  "imei": "3561234567890123",
  "sim": {
    "id": 500,
    "iccid": "8988303000001234567",
    "iccid_with_luhn": "89883030000012345671",
    "sim_profile_type_id": 1,
    "imsi": "901430001234567",
    "msisdn": "882850001234567",
    "status": {
      "id": 2,
      "description": "Suspended"
    }
  },
  "imei_with_luhn": "356123456789015"
}
```

**SDK Code**

```python Endpoint Created
import requests

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

payload = {
    "service_profile": { "id": 123 },
    "tariff_profile": { "id": 123 },
    "status": { "id": 0 },
    "name": "test",
    "tag_assignments": [1, 2],
    "imei": "123456789012345",
    "imei_lock": False,
    "sim": {
        "id": 3595575,
        "activate": True
    },
    "ip_address": "127.0.0.1",
    "organisation": { "id": 123 },
    "ip_address_space": { "id": 123 }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Endpoint Created
const url = 'https://iot.telia.lt/api/v1/endpoint';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"service_profile":{"id":123},"tariff_profile":{"id":123},"status":{"id":0},"name":"test","tag_assignments":[1,2],"imei":"123456789012345","imei_lock":false,"sim":{"id":3595575,"activate":true},"ip_address":"127.0.0.1","organisation":{"id":123},"ip_address_space":{"id":123}}'
};

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

```go Endpoint Created
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"service_profile\": {\n    \"id\": 123\n  },\n  \"tariff_profile\": {\n    \"id\": 123\n  },\n  \"status\": {\n    \"id\": 0\n  },\n  \"name\": \"test\",\n  \"tag_assignments\": [\n    1,\n    2\n  ],\n  \"imei\": \"123456789012345\",\n  \"imei_lock\": false,\n  \"sim\": {\n    \"id\": 3595575,\n    \"activate\": true\n  },\n  \"ip_address\": \"127.0.0.1\",\n  \"organisation\": {\n    \"id\": 123\n  },\n  \"ip_address_space\": {\n    \"id\": 123\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Endpoint Created
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"service_profile\": {\n    \"id\": 123\n  },\n  \"tariff_profile\": {\n    \"id\": 123\n  },\n  \"status\": {\n    \"id\": 0\n  },\n  \"name\": \"test\",\n  \"tag_assignments\": [\n    1,\n    2\n  ],\n  \"imei\": \"123456789012345\",\n  \"imei_lock\": false,\n  \"sim\": {\n    \"id\": 3595575,\n    \"activate\": true\n  },\n  \"ip_address\": \"127.0.0.1\",\n  \"organisation\": {\n    \"id\": 123\n  },\n  \"ip_address_space\": {\n    \"id\": 123\n  }\n}"

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

```java Endpoint Created
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://iot.telia.lt/api/v1/endpoint")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"service_profile\": {\n    \"id\": 123\n  },\n  \"tariff_profile\": {\n    \"id\": 123\n  },\n  \"status\": {\n    \"id\": 0\n  },\n  \"name\": \"test\",\n  \"tag_assignments\": [\n    1,\n    2\n  ],\n  \"imei\": \"123456789012345\",\n  \"imei_lock\": false,\n  \"sim\": {\n    \"id\": 3595575,\n    \"activate\": true\n  },\n  \"ip_address\": \"127.0.0.1\",\n  \"organisation\": {\n    \"id\": 123\n  },\n  \"ip_address_space\": {\n    \"id\": 123\n  }\n}")
  .asString();
```

```php Endpoint Created
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://iot.telia.lt/api/v1/endpoint', [
  'body' => '{
  "service_profile": {
    "id": 123
  },
  "tariff_profile": {
    "id": 123
  },
  "status": {
    "id": 0
  },
  "name": "test",
  "tag_assignments": [
    1,
    2
  ],
  "imei": "123456789012345",
  "imei_lock": false,
  "sim": {
    "id": 3595575,
    "activate": true
  },
  "ip_address": "127.0.0.1",
  "organisation": {
    "id": 123
  },
  "ip_address_space": {
    "id": 123
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Endpoint Created
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/endpoint");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"service_profile\": {\n    \"id\": 123\n  },\n  \"tariff_profile\": {\n    \"id\": 123\n  },\n  \"status\": {\n    \"id\": 0\n  },\n  \"name\": \"test\",\n  \"tag_assignments\": [\n    1,\n    2\n  ],\n  \"imei\": \"123456789012345\",\n  \"imei_lock\": false,\n  \"sim\": {\n    \"id\": 3595575,\n    \"activate\": true\n  },\n  \"ip_address\": \"127.0.0.1\",\n  \"organisation\": {\n    \"id\": 123\n  },\n  \"ip_address_space\": {\n    \"id\": 123\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Endpoint Created
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "service_profile": ["id": 123],
  "tariff_profile": ["id": 123],
  "status": ["id": 0],
  "name": "test",
  "tag_assignments": [1, 2],
  "imei": "123456789012345",
  "imei_lock": false,
  "sim": [
    "id": 3595575,
    "activate": true
  ],
  "ip_address": "127.0.0.1",
  "organisation": ["id": 123],
  "ip_address_space": ["id": 123]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```