> 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.smartsim.telecom.li/llms.txt.

# Retrieve a service profile

GET https://smartsim.telecom.li/api/v1/service_profile/{profile_id}

Retrieve a service profile with a given id.


Reference: https://docs.smartsim.telecom.li/developers/api/service-profiles/service-profile-by-profile-id-get

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

- `profile_id` (double, required) — The Numeric ID of a Service Profile

## Response

### 200

Success

- `id` (integer, optional)
- `name` (string, optional)
- `description` (string, optional)
- `allowed_3g` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `allowed_4g` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `allowed_nb_iot` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `allowed_nb_iot_geo` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `apply_sms_quota` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `apply_data_quota` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `retail` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `sms_p2p_int` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `sms_p2p_ext` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `prepaid` (enum, optional) — `1` means enabled, `0` means disabled.
  - Allowed values: `1`, `0`
- `nipdp` (enum, optional) — `"1"` means enabled, `"0"` means disabled.
  - Allowed values: `1`, `0`
- `used_count` (string, optional)
- `api_callback` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiCallback, optional)
- `api_secret` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiSecret, optional)
- `moc_callback` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaMocCallback, optional)
- `esme_interface_type` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaEsmeInterfaceType, optional)
- `breakout_region` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaBreakoutRegion, optional)
- `service` (list of ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaServiceItems, optional)
- `ip_firewall_rule_set` (ServiceProfileIPFirewallRuleSet, optional)
- `dns_firewall_rule_set` (ServiceProfileDNSFirewallRuleSet, optional)
- `d2d` (ServiceProfileD2D, optional) — Device-to-device (D2D) mode of the service profile. Device-to-device is opt-in and enabled per organization. To request access, contact your account manager.

## Errors

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

## Types

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiCallback

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiSecret

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaMocCallback

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaEsmeInterfaceType

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaBreakoutRegion

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaServiceItems

### ServiceProfileIPFirewallRuleSet

- `ip_firewall_profiles` (list of ServiceProfileIpFirewallRuleSetIpFirewallProfilesItems, optional)
- `enforce` (boolean, optional)

### ServiceProfileDNSFirewallRuleSet

- `dns_firewall_profiles` (list of ServiceProfileDnsFirewallRuleSetDnsFirewallProfilesItems, optional)
- `enforce` (boolean, optional)
- `mode` (enum, optional)
  - Allowed values: `allowlist`, `blocklist`

### ServiceProfileD2D

Device-to-device (D2D) mode of the service profile. Device-to-device is opt-in and enabled per organization. To request access, contact your account manager.

- `mode` (enum, required) — Device-to-device mode of the service profile: - `disabled` (default): Traffic between devices is dropped. - `enabled`: Traffic is delivered directly between devices, as long as the service profiles of both devices have device-to-device enabled. - `forward_to_backend`: Traffic between devices is routed through your Cloud Connect backend, for example so your own firewall can inspect it.
  - Allowed values: `disabled`, `enabled`, `forward_to_backend`
- `modified_at` (string, required, nullable) — When the service profile's network settings last changed, which covers the D2D mode, IP firewall enforcement, and DNS firewall enforcement and mode. `null` if none of them has ever been set.

### ServiceProfileIpFirewallRuleSetIpFirewallProfilesItems

- `id` (integer, optional)
- `name` (string, optional)
- `added` (string, optional)

### ServiceProfileDnsFirewallRuleSetDnsFirewallProfilesItems

- `id` (integer, optional)
- `name` (string, optional)
- `added` (string, optional)

## Examples

**Response**

```json
{
  "id": 232,
  "name": "Smart meter",
  "description": "Data + SMS - 1G limit",
  "allowed_3g": 1,
  "allowed_4g": 1,
  "allowed_nb_iot": 1,
  "allowed_nb_iot_geo": 0,
  "apply_sms_quota": 0,
  "apply_data_quota": 0,
  "retail": 0,
  "sms_p2p_int": 1,
  "sms_p2p_ext": 1,
  "nipdp": "0",
  "used_count": "12",
  "api_callback": {
    "created": "2019-03-18T16:11:07.000Z",
    "id": 38,
    "purpose": "Customer's Webserver",
    "url": "https://www.customers-server.com"
  },
  "api_secret": {
    "id": 38,
    "purpose": "K3"
  },
  "moc_callback": {
    "created": "2019-03-18T16:11:17.000Z",
    "id": 39,
    "purpose": "Customer's Moc server",
    "url": "https://moc.customers-server.com"
  },
  "esme_interface_type": {
    "description": "Console",
    "id": 3
  },
  "breakout_region": {
    "id": 3,
    "ip_address": "0.0.0.0",
    "name": "eu-west-1"
  },
  "service": [
    {
      "description": "Data",
      "id": 123,
      "teleservice_code": 7678345,
      "traffic_limit": [
        {
          "id": 123,
          "period": {
            "id": 33,
            "time_units": 5,
            "unit": "Days"
          },
          "volume": 64
        },
        {
          "id": 234,
          "period": {
            "id": 35,
            "time_units": 1,
            "unit": "Months"
          },
          "volume": 128
        }
      ],
      "traffic_type": {
        "description": "Data",
        "id": 1,
        "unit": "GB"
      }
    }
  ],
  "ip_firewall_rule_set": {
    "ip_firewall_profiles": [
      {
        "id": 43,
        "name": "Default Inbound Block",
        "added": "2026-04-09T11:12:45+00:00"
      }
    ],
    "enforce": true
  },
  "dns_firewall_rule_set": {
    "dns_firewall_profiles": [
      {
        "id": 10,
        "name": "Corporate DNS Policy",
        "added": "2026-07-07T08:15:00+00:00"
      }
    ],
    "enforce": true,
    "mode": "allowlist"
  },
  "d2d": {
    "mode": "enabled",
    "modified_at": "2026-08-04T09:15:22+00:00"
  }
}
```

**SDK Code**

```python Retrieved
import requests

url = "https://smartsim.telecom.li/api/v1/service_profile/1.1"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Retrieved
const url = 'https://smartsim.telecom.li/api/v1/service_profile/1.1';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Retrieved
package main

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

func main() {

	url := "https://smartsim.telecom.li/api/v1/service_profile/1.1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Retrieved
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v1/service_profile/1.1")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java Retrieved
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v1/service_profile/1.1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v1/service_profile/1.1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Retrieved
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v1/service_profile/1.1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Retrieved
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v1/service_profile/1.1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```