> 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.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

> Service profile API reference for configuring endpoint services, traffic limits, network settings, and callback configurations.

A service profile is an endpoint configuration entity that groups services and traffic limits for assignment.

Instead of assigning services and traffic limits directly to an endpoint, those can be associated to a service profile and assigned to an endpoint in a single operation.

A service profile holds a collection of services and for each associated service it's possible to assign zero or more traffic limits.
To define traffic limits it's first necessary to associate services to a profile.

* Services are **read only** objects.
* Traffic limits are defined for a particular service
* Traffic limits can also be associated directly to an endpoint

The typical **workflow** for service profile definition is:

1. `POST` - Create a service profile
2. `PUT` - Add services to a profile (service collection)
3. `PUT` - Add traffic limits to a service (`traffic_limit` collection)

> **Warning**
>
> For Service Profile management: paging, filtering, and sorting isn't provided.

## Service profile object

| Name             | Type    | Description                                                                        |
| :--------------- | :------ | :--------------------------------------------------------------------------------- |
| `id`             | Integer | Unique ID of this service profile                                                  |
| `name`           | String  | A name or short description of the Service Profile (for example, for select boxes) |
| `description`    | String  | A full description of the Service Profile                                          |
| `allowed_3g`     | Boolean | Is 3G allowed                                                                      |
| `allowed_4g`     | Boolean | Allow connectivity for 4G/LTE and LTE-M networks.                                  |
| `allowed_nb_iot` | Boolean | Is NB-IoT allowed                                                                  |

\| `allowed_nb_iot_geo`         | Boolean                    | Allow NB-IoT connectivity over satellite networks.                                                                                                                                                             |
\| **DEPRECATED** `apply_quota` | Boolean                    | Use `apply_data_quota` instead. Ignored in create/update requests if `apply_data_quota` is present                                                                                                             |

\| `apply_data_quota`           | Boolean                    | Apply a quota for data usage                                                                                                                                                                                   |
\| `apply_sms_quota`            | Boolean                    | Apply a quota for SMS usage                                                                                                                                                                                    |
\| `retail`                     | Boolean                    | Turn Retail Subscription Management on or off, which allows the customer to manage or top up a prepaid balance. Use of this feature requires privileges \`provided by emnify.                             |
\| `sms_p2p_int`                | Boolean                    | Allow P2P SMS between endpoints for your own organization (internal)                                                                                                                                           |
\| `sms_p2p_ext`                | Boolean                    | Allow P2P SMS to/from the world (external)                                                                                                                                                                     |
\| **DEPRECATED**`prepaid`      | Boolean                    | Enable prepaid balance management per endpoint                                                                                                                                                                 |
\| `nipdp`                      | Boolean                    | Enable Network-Initiated PDP. If enabled and an endpoint is offline, EGN nodes send GTP PDU-Notifications if packets are arriving for the IP of the endpoint                                                   |
\| `used_count`                 | Integer                    | The number of endpoints using this service profile                                                                                                                                                             |
\| `api_callback`               | Object                     | `id`(Integer) - ID of the API callback \
`url`(String) - URL of the API callback \
`purpose`(String) - Purpose of the API callback \
`created`(Date) - Creation date timestamp of the API callback |
\| `api_secret`                 | Object                     | `id`(Integer) - ID of the API Secret \
`purpose`(String) - Purpose of the API Secret                                                                                                                       |
\| `moc_callback`               | Object                     | `id`(Integer) - ID of the MOC callback \
`url`(String) - URL of the MOC callback \
`purpose`(String) - Purpose of the MOC callback \
`created`(Date) - Creation date timestamp of the MOC callback |
\| `esme_interface_type`        | Object                     | `id`(Integer) - ID of the ESME interface type                                                                                                                                                                  |
\| `breakout_region`            | Object                     | `id`(Integer) - ID of the Breakout Region                                                                                                                                                                      |
\| `dns`                        | Object                     | `id`(Integer) - DNS ID                                                                                                                                                                                         |
\| `service`                    | Collection \
(Service) | Nested collection of services associated with a profile (see [Service object](#service-object))                                                                                                                |

> **Note**
>
> `breakout_region` identifies the breakout region for this service profile.
> Automatic selection is the default, and its breakout region ID is `1`.
> Devices reached over OpenVPN or through Cloud Connect require a region that matches the integration, so set it explicitly for those profiles.
> Retrieve the available regions and their IDs from `GET /api/v1/breakout_region`.
> See [Set the breakout region](/portal/how-tos/set-breakout-region).

### Service object

Here is the description of a nested **Service** object:

| Name               | Type                          | Description                                                                                                                         |
| :----------------- | :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
| `id`               | Integer                       | Unique ID of this service                                                                                                           |
| `description`      | String                        | Description of a service                                                                                                            |
| `teleservice_code` | Integer                       | Teleservice code of a service                                                                                                       |
| `used_with_vlr`    | Boolean                       | Is this service used with Visitor Location Register                                                                                 |
| `used_with_sgsn`   | Boolean                       | Is this service used with Serving GPRS Support Node                                                                                 |
| `traffic_type`     | Object                        | `id` (Integer) - Traffic type ID  `description` (String) - Traffic type description  `unit` (String) - Traffic type unit of measure |
| `traffic_limit`    | Collection  (`traffic_limit`) | Collection of traffic limits associated (nested) to a service (See [Traffic limit object](#traffic-limit-object))                   |

#### Traffic limit object

Here is the description of a (nested) **Traffic limit** object:

| Name     | Type    | Description                                                                                                   |
| :------- | :------ | :------------------------------------------------------------------------------------------------------------ |
| `id`     | Integer | Unique ID of this traffic limit                                                                               |
| `volume` | Integer | Volume limit of this traffic limit object                                                                     |
| `period` | Object  | `id` (Integer) - limit period ID  `time_units` (Integer) - number of units  `unit` (String) - Unit of measure |

## Example service profile

```json maxLines=20
[
  {
    "id": 1,
    "name": "Smart meter",
    "description": "Data + SMS - 1G limit",
    "allowed_3g": true,
    "allowed_4g": false,
    "allowed_nb_iot": false,
    "allowed_nb_iot_geo": false,
    "retail": false,
    "sms_p2p_int": true,
    "sms_p2p_ext": true,
    "nipdp": false,
    "used_count":12,
    "api_callback":{
      "id":38,
      "url": "https://www.customers-server.com",
      "created": "2015-03-18 16:11:07",
      "purpose": "Customer's Webserver"
    },
    "api_secret":{
      "id": 38,
      "purpose": "K3"
    },
    "moc_callback":{
      "id":39,
      "url": "https://moc.customers-server.com",
      "created": "2015-03-18 16:11:17",
      "purpose": "Customer's Moc server"
    },
    "esme_interface_type": {
        "description": "Console",
        "id": 3
    },
    "breakout_region": {
        "name": "eu-west-1",
        "ip_address": "0.0.0.0",
        "id": 3
    },
    "dns": {
        "id": 1,
        "primary": "8.8.8.8",
        "secondary": "8.8.4.4",
        "ip_address_version": 4
    },
    "service": [
      {
        "id": 123,
        "description": "Data",
        "teleservice_code": 7678345,
        "used_with_vlr": true,
        "used_with_sgsn": true,
        "traffic_type": {
          "id": 1,
          "description": "Data",
          "unit": "GB"
        },
        "traffic_limit": [
          {
            "id": 123,
            "volume": 64,
            "period": {
              "id": 33,
              "time_units": 5,
              "unit": "Days"
            }
          },
          {
            "id": 234,
            "volume": 128,
            "period": {
              "id": 35,
              "time_units": 1,
              "unit": "Months"
            }
          }
        ]
      },
      {
        "id": 234,
        "description": "SMS",
        "teleservice_code": 441236,
        "used_with_vlr": true,
        "used_with_sgsn": true,
        "traffic_type": {
          "id": 2,
          "description": "SMS",
          "unit": "count"
        },
        "traffic_limit": []
      }
    ]
  }
]
```