Create endpoints

After registering SIMs, you need to create a virtual representation of the device associated with the SIM. In the emnify REST API, this is called an endpoint.

You can create one endpoint using the Create an Endpoint API call, or multiple endpoints at once (up to 2,000) using the Bulk Create Endpoint API call.

This guide uses the Postman API platform for example purposes. Each time you use the emnify REST API, you must authenticate in Postman.

For more information, see How to use the REST API via Postman on the emnify Developer Blog.

Alternatively, you can create devices via the emnify Portal. For step-by-step instructions, see Create a device in the Portal documentation.

Individual endpoint

Execute this operation sequentially - wait for each request to complete before starting the next. For bulk operations, see Multiple endpoints.

To create a new request in Postman, click +New in the upper left corner. Name the request Endpoint creation and add it to a new collection called Endpoints.

Then follow these steps to set up your request:

1

Select the POST HTTP method.

2

Set the request URL as https://cdn.emnify.net/api/v1/endpoint

3

Navigate to the Headers tab. Insert Content-Type and Authorization as Keys and add the respective Values application/json and Bearer TOKEN. Replace TOKEN with your auth_token and make sure there’s a non-breaking space between Bearer and the token value.

4

Go to the Body tab and select raw. Make sure the format is set to JSON. Then, specify the endpoint details.

To get your endpoint online immediately, set the endpoint status to Enabled and activate the SIM card:

1{
2 "name": "ENDPOINT_NAME",
3 "status": {
4 "id": 0
5 },
6 "service_profile": {
7 "id": 123
8 },
9 "tariff_profile": {
10 "id": 456
11 },
12 "sim": {
13 "id": 123456,
14 "activate": true
15 }
16}

Keep in mind that a monthly cost is charged for each activated SIM card, even if the endpoint status is set to Disabled.

If you don’t plan on using the endpoint right away, set the endpoint status to Disabled and don’t activate the SIM:

1{
2 "name": "ENDPOINT_NAME",
3 "status": {
4 "id": 1
5 },
6 "service_profile": {
7 "id": 123
8 },
9 "tariff_profile": {
10 "id": 456
11 },
12 "sim": {
13 "id": 567890,
14 "activate": false
15 }
16}

The activate property defaults to false, so you can also omit it.

5

To complete the request, click Send.

A 200 OK response status indicates the successful creation of the endpoint.

1{
2 "created": "2026-01-26T09:56:39.741+0000",
3 "last_updated": "2026-01-26T09:56:39.741+0000",
4 "name": "ENDPOINT_NAME",
5 "ip_address": "198.51.100.235",
6 "id": 12345678,
7 "tag_assignments": [],
8 "sim": {
9 "id": 567890,
10 "iccid": "8988303000008013931",
11 "iccid_with_luhn": "89883030000080139311",
12 "imsi": "295050901198207",
13 "msisdn": "423663921003632",
14 "sim_profile_type": {
15 "id": 1
16 }
17 },
18 "ip_address_space": {
19 "id": 1234
20 }
21}

Multiple endpoints

The Bulk Create Endpoint API call lets you:

  • Create up to 2,000 endpoints in a single request
  • Process multiple endpoints safely without sequential execution constraints
  • Save time compared to creating endpoints individually

If you previously used Postman’s Runner to create endpoints sequentially (calling /api/v1/endpoint repeatedly), we recommend migrating to the bulk endpoint for better efficiency and reliability.

Choose your workflow

Choose the workflow that matches your needs:

Workflow A: Send JSON directly

Best for: Developers comfortable working directly with JSON.

Set up the bulk request in Postman

Check the rate limits before executing bulk operations.

To create a new request in Postman, click +New in the upper left corner. Name the request Bulk endpoint creation and add it to your Endpoints collection.

Then follow these steps:

1

Select the POST HTTP method.

2

Set the request URL as https://cdn.emnify.net/api/v2/endpoint/multi

3

Navigate to the Headers tab and set:

  • Content-Type: application/json
  • Authorization: Bearer TOKEN (replace TOKEN with your auth token)
4

Go to the Body tab and select raw. Make sure the format is set to JSON.

5

Structure your request body as described in the following section.

Structure the request body

The bulk endpoint uses a different structure than individual endpoint creation. Shared properties (service profile, tariff profile, status) are defined once at the root level, and variable endpoint details go in the endpoints array. Properties within the endpoints array can be adjusted per endpoint. For example, you can create one endpoint with a SIM attached and one without, have different tags for each endpoint, etc.

To get your endpoints online immediately, set the endpoint status to Enabled ("id": 0) and activate the SIMs:

1{
2 "service_profile": {
3 "id": 123
4 },
5 "tariff_profile": {
6 "id": 456
7 },
8 "status": {
9 "id": 0
10 },
11 "endpoints": [
12 {
13 "name": "ENDPOINT_NAME_1",
14 "tags": "example-1,production",
15 "imei": "123456789012345",
16 "sim": {
17 "id": 3595575,
18 "activate": true
19 }
20 },
21 {
22 "name": "ENDPOINT_NAME_2",
23 "tags": "example-1,production",
24 "imei": "123456789012346",
25 "sim": {
26 "id": 3595576,
27 "activate": true
28 }
29 }
30 ]
31}

Keep in mind that a monthly cost is charged for each activated SIM card, even if the endpoint status is set to Disabled.

You can also create endpoints in factory test mode to avoid incurring costs during testing.

If you don’t plan on using the endpoints right away, set the endpoint status to Disabled ("id": 1) and don’t activate the SIMs:

1{
2 "service_profile": {
3 "id": 123
4 },
5 "tariff_profile": {
6 "id": 456
7 },
8 "status": {
9 "id": 1
10 },
11 "endpoints": [
12 {
13 "name": "Endpoint-001",
14 "sim": {
15 "id": 3595575,
16 "activate": false
17 }
18 },
19 {
20 "name": "Endpoint-002",
21 "sim": {
22 "id": 3595576,
23 "activate": false
24 }
25 }
26 ]
27}

The activate property defaults to false, so you can omit it.

To make your request reusable, use Postman collection variables for shared properties like service_profile_id and tariff_profile_id.

Execute the bulk request

1

Verify your JSON structure:

  • Shared properties are at the root level
  • Each endpoint in the endpoints array has a unique sim.id
  • If provided, imei values are unique across all endpoints

The bulk endpoint enforces uniqueness for sim.id and imei values. If any duplicates are found, the entire bulk request fails. Review the error response to identify and correct the duplicate values before retrying.

2

Click Send to execute the request.

A 201 CREATED response indicates successful creation of all endpoints. The response body contains an array with details for each created endpoint.

Workflow B: Convert CSV to JSON manually

Best for: Users with endpoint data in spreadsheets who have a small dataset (fewer than 20 endpoints) and prefer manual conversion.

Organize data in a CSV file

To organize your data in a CSV file, create a table in a spreadsheet software (like Excel or Google Sheets) that includes the necessary endpoint details:

1

In the first row, insert the properties as columns.

Shared properties (same for all endpoints in this batch):

  • service_profile_id
  • tariff_profile_id
  • status_id (0 = Enabled, 1 = Disabled)

Variable properties (unique to each endpoint):

  • name
  • tags
  • imei
  • imei_lock
  • sim
  • ip_address

Optional properties like tags and imei can be left empty if not needed. See the API reference for requirements and property details.

2

Fill in the corresponding data for your endpoints. Each row represents one endpoint. Ensure shared property values are consistent across all rows.

3

Save it as a CSV file (.csv).

You can include up to 2,000 endpoints in a single bulk request. If you have more, split them into multiple CSV files.

Map CSV columns to the JSON body

Since the bulk endpoint only accepts JSON, you need to convert your CSV data into the required JSON format.

1

Open your CSV file

2

For each row, create an object in the endpoints array:

  • Map endpoint_name to name
  • Map sim_id to sim.id
  • Map sim_activate to sim.activate
  • Map optional columns like tags and imei
3

Set the shared properties once at the root level using values from your CSV

The following example illustrates how to convert a single CSV row into the corresponding JSON structure.

CSV row:

service_profile_idtariff_profile_idstatus_idendpoint_namesim_idsim_activate
1234560Endpoint-0013595575true
1234560Endpoint-0023595576false

Maps to JSON:

1{
2 "service_profile": { "id": 123 },
3 "tariff_profile": { "id": 456 },
4 "status": { "id": 0 },
5 "endpoints": [
6 {
7 "name": "Endpoint-001",
8 "sim": {
9 "id": 3595575,
10 "activate": true
11 }
12 },
13 {
14 "name": "Endpoint-002",
15 "sim": {
16 "id": 3595576,
17 "activate": false
18 }
19 }
20 ]
21}

Send the request

After manually converting your CSV data to JSON:

  1. Set up the bulk request in Postman following Workflow A: Set up the bulk request
  2. Paste your converted JSON into the request body
  3. Verify the JSON structure (ensure unique sim.id and imei values)
  4. Click Send to execute the request

A 201 CREATED response indicates successful creation of all endpoints.

Workflow C: Automate CSV to JSON with Postman Runner

Best for: Users with endpoint data in CSV files and large datasets (20+ endpoints) who want to automate the conversion process.

Prepare the CSV file

Organize your CSV file following the structure in Workflow B: Organize data in a CSV file. This workflow automates the conversion to JSON using Postman Runner, saving time for large datasets.

Create the collector request

To automate CSV to JSON conversion, create two requests in the same collection/folder and run them via Runner with a CSV data file.

1

In Postman, create a new request in the same collection/folder as your bulk request.

2

Name the request Bulk CSV — Collect rows.

3

Set:

  • Method: GET
  • URL: https://postman-echo.com/get

This is a harmless echo endpoint provided by Postman for testing purposes. Its response doesn’t matter and it only exists to run the script once per CSV row.

4

Open the Tests tab and paste the following script:

1// Read the current CSV row for this iteration
2const row = pm.iterationData.toObject();
3
4// Load stored endpoints (persisted across iterations)
5const endpoints = JSON.parse(pm.collectionVariables.get('bulkEndpoints') || '[]');
6
7// Store shared properties (same for all endpoints in the CSV)
8const shared = {
9 service_profile: { id: parseInt(row.service_profile_id, 10) },
10 tariff_profile: { id: parseInt(row.tariff_profile_id, 10) },
11 status: { id: parseInt(row.status_id, 10) }
12};
13
14// Add this row as one endpoint object
15endpoints.push({
16 name: row.endpoint_name,
17 sim: {
18 id: parseInt(row.sim_id, 10),
19 activate: row.sim_activate === true || String(row.sim_activate).toLowerCase() === 'true'
20 }
21});
22
23// Persist state for the next iteration
24pm.collectionVariables.set('bulkShared', JSON.stringify(shared));
25pm.collectionVariables.set('bulkEndpoints', JSON.stringify(endpoints));
26
27// Add at least one test so Runner displays results
28pm.test('Collected one CSV row', function () {
29 pm.expect(row.endpoint_name).to.be.ok;
30});
31
32// IMPORTANT: Don't loop back to this request, or Runner will never advance iterations
33const isLastIteration = (pm.info.iteration === pm.info.iterationCount - 1);
34
35if (isLastIteration) {
36 postman.setNextRequest('Bulk endpoint creation');
37} else {
38 postman.setNextRequest(null);
39}

This script uses postman.setNextRequest() for maximum compatibility. Some Postman environments don’t expose pm.execution.setNextRequest().

Configure the bulk request

1

Create (or open) your bulk request.

2

Name the request to match the setNextRequest value defined in the collector script.

The name must match the value used in the collector script. For example, the collector script in this guide defines postman.setNextRequest('Bulk endpoint creation'), meaning the request name must be Bulk endpoint creation.

3

Set:

  • Method: POST
  • URL: https://cdn.emnify.net/api/v2/endpoint/multi
4

In Headers, set:

  • Key: Content-Type | Value: application/json
  • Key: Authorization | Value: Bearer TOKEN (replace TOKEN with your auth_token)
5

In Body:

  1. Select raw
  2. Set the format to JSON
  3. Paste the following into the body:
1{{bulkBody}}
6

Open the Pre-request Script tab and paste the following script:

1const shared = JSON.parse(pm.collectionVariables.get('bulkShared') || '{}');
2const endpoints = JSON.parse(pm.collectionVariables.get('bulkEndpoints') || '[]');
3
4if (!endpoints.length) {
5 throw new Error('No endpoints were collected from the CSV. Run "Bulk CSV — Collect rows" using Runner with a CSV data file.');
6}
7
8pm.variables.set('bulkBody', JSON.stringify({ ...shared, endpoints }));
7

This step is optional, but recommended.

Open the Tests tab and paste the following cleanup script:

1pm.test('Bulk request body contains endpoints', function () {
2 pm.expect(pm.request.body.raw).to.include('"endpoints"');
3});
4
5// Clean up so reruns don't append old data
6pm.collectionVariables.unset('bulkShared');
7pm.collectionVariables.unset('bulkEndpoints');
8pm.variables.unset('bulkBody');
9
10// Stop after sending the bulk request
11postman.setNextRequest(null);

Run the workflow in Runner

1

Open Runner in Postman.

2

Select the collection or folder that contains both requests:

  1. Bulk CSV — Collect rows
  2. Bulk endpoint creation

The order matters. The collector request must run first.

3

Under Data, upload your CSV file.

  • Postman runs one iteration per CSV row.
  • Each iteration populates pm.iterationData with the row’s values.
4

Click Start Run to execute the requests.

The Runner executes each CSV row through the collector request, building an array of endpoints. On the final row, it triggers the bulk request which sends all endpoints in a single API call.

The script builds the bulk request automatically from your CSV data.

Create more than 2,000 endpoints

If you need to create more than 2,000 endpoints:

1

Divide your endpoint data into batches of 2,000 or fewer.

For CSV workflows, split your CSV file into multiple files of 2,000 rows or fewer before processing.

2

Execute the first bulk request and wait for the 201 CREATED response.

3

Update your request body with the next batch of endpoints.

4

Execute subsequent bulk requests sequentially, waiting for each to complete before starting the next.