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

> Make your first API call in minutes using the interactive API explorer and learn how to authenticate with the emnify API.

To use the emnify REST API, you must authenticate with an **authentication token**.
emnify uses JSON Web Tokens (JWTs) as the authentication token.

**Base URL:** `https://cdn.emnify.net`

## Make your first API call

Get started in minutes using the interactive API explorer.

### Get an application token

1. Log in to the [emnify Portal](https://portal.emnify.com)
2. Navigate to **Integrations** > **Application tokens**
3. Click **Add token**, generate and copy your token, and store it securely

> **Tip**
>
> For more detailed instructions, see [Application tokens in the Portal](/portal/application-tokens).

### Authenticate

Click **Try it** to open the API explorer.
Paste your application token and send the request to receive your `auth_token`.

### Request

POST [https://cdn.emnify.net/api/v1/authenticate](https://cdn.emnify.net/api/v1/authenticate)

**`Application Token Authentication`**

```curl Application Token Authentication
curl -X POST https://cdn.emnify.net/api/v1/authenticate \
     -H "Content-Type: application/json" \
     -d '{
  "application_token": "5cCI6IkpXVCJ9.."
}'
```

**`Application Token Authentication`**

```python Application Token Authentication
import requests

url = "https://cdn.emnify.net/api/v1/authenticate"

payload = { "application_token": "5cCI6IkpXVCJ9.." }
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

**`Application Token Authentication`**

```javascript Application Token Authentication
const url = 'https://cdn.emnify.net/api/v1/authenticate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"application_token":"5cCI6IkpXVCJ9.."}'
};

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

**`Application Token Authentication`**

```go Application Token Authentication
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/authenticate"

	payload := strings.NewReader("{\n  \"application_token\": \"5cCI6IkpXVCJ9..\"\n}")

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

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

}
```

**`Application Token Authentication`**

```ruby Application Token Authentication
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/authenticate")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"application_token\": \"5cCI6IkpXVCJ9..\"\n}"

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

**`Application Token Authentication`**

```java Application Token Authentication
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://cdn.emnify.net/api/v1/authenticate")
  .header("Content-Type", "application/json")
  .body("{\n  \"application_token\": \"5cCI6IkpXVCJ9..\"\n}")
  .asString();
```

**`Application Token Authentication`**

```php Application Token Authentication
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://cdn.emnify.net/api/v1/authenticate', [
  'body' => '{
  "application_token": "5cCI6IkpXVCJ9.."
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

**`Application Token Authentication`**

```csharp Application Token Authentication
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/authenticate");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"application_token\": \"5cCI6IkpXVCJ9..\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

**`Application Token Authentication`**

```swift Application Token Authentication
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["application_token": "5cCI6IkpXVCJ9.."] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/authenticate")! 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()
```

> **Note**
>
> Copy the `auth_token` to paste into the **Authorization** header of the next call.

### Make an authenticated request

Use the `auth_token` from Step 2 to make authenticated requests.
Click **Try it** to retrieve your endpoints:

### Request

GET [https://cdn.emnify.net/api/v1/endpoint](https://cdn.emnify.net/api/v1/endpoint)

**`Default - List All Endpoints`**

```curl Default - List All Endpoints
curl https://cdn.emnify.net/api/v1/endpoint \
     -H "Authorization: Bearer <token>"
```

**`Default - List All Endpoints`**

```python Default - List All Endpoints
import requests

url = "https://cdn.emnify.net/api/v1/endpoint"

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

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

print(response.json())
```

**`Default - List All Endpoints`**

```javascript Default - List All Endpoints
const url = 'https://cdn.emnify.net/api/v1/endpoint';
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);
}
```

**`Default - List All Endpoints`**

```go Default - List All Endpoints
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/endpoint"

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

}
```

**`Default - List All Endpoints`**

```ruby Default - List All Endpoints
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/endpoint")

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

**`Default - List All Endpoints`**

```java Default - List All Endpoints
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/endpoint")
  .header("Authorization", "Bearer <token>")
  .asString();
```

**`Default - List All Endpoints`**

```php Default - List All Endpoints
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/endpoint', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

**`Default - List All Endpoints`**

```csharp Default - List All Endpoints
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/endpoint");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

**`Default - List All Endpoints`**

```swift Default - List All Endpoints
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/endpoint")! 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()
```

> **Info**
>
> The `/api/v1/authenticate` endpoint has a rate limit of 100 requests per IP in a 5-minute window.
> Store your `auth_token` and reuse it instead of authenticating on every request.
> For more information, see [Rate limits](/developers/api-guidelines/rate-limits).

Most endpoints also require a specific [permission](/developers/api-guidelines/permissions), shown in a **Required permissions** callout on the endpoint's reference page.

### Use an SDK

If you prefer to use an SDK instead of direct API calls:

* [Python SDK Quickstart](/developers/sdks/python/quickstart)
* [Java SDK Quickstart](/developers/sdks/java/quickstart)

## Choose your authentication method

> **Tip**
>
> Always use [application tokens](/developers/auth/application-tokens) to authenticate with the emnify REST API when possible.
> Any APIs that currently require user credentials are being updated to support application tokens.

#### [Application tokens](/developers/auth/application-tokens)

Recommended for most integrations.

\


Secure M2M authentication without exposing user credentials.
Supports IP restrictions and configurable expiration.

#### [User credentials](/developers/auth/user-credentials)

Required for cross-Workspace operations.

\


Use for Workspace switching and SIM transfers between Workspaces.
Requires handling MFA if enabled.

## Learn more

#### [JWTs](/developers/auth/jwts)

Understand how JSON Web Tokens authenticate API requests via the `Authorization` header.

#### [Multi-factor authentication](/developers/auth/multi-factor-authentication)

Handle MFA when authenticating with user credentials.

#### [Permissions](/developers/api-guidelines/permissions)

In beta. See the permission each endpoint requires, and create custom roles that grant an exact set.