Create endpoint for an existing Emnify SIM
curl --request POST \
--url https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sim_id": 123,
"phone_number": "<string>",
"service_profile_id": 123,
"tariff_profile_id": 123,
"activate": true,
"tags": "<string>",
"imei": "<string>",
"imei_lock": true
}
'import requests
url = "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim"
payload = {
"name": "<string>",
"sim_id": 123,
"phone_number": "<string>",
"service_profile_id": 123,
"tariff_profile_id": 123,
"activate": True,
"tags": "<string>",
"imei": "<string>",
"imei_lock": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sim_id: 123,
phone_number: '<string>',
service_profile_id: 123,
tariff_profile_id: 123,
activate: true,
tags: '<string>',
imei: '<string>',
imei_lock: true
})
};
fetch('https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'sim_id' => 123,
'phone_number' => '<string>',
'service_profile_id' => 123,
'tariff_profile_id' => 123,
'activate' => true,
'tags' => '<string>',
'imei' => '<string>',
'imei_lock' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim")
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 \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": {
"id": 123,
"description": "<string>"
},
"service_profile": {
"id": 123,
"name": "<string>"
},
"tariff_profile": {
"id": 123,
"name": "<string>"
},
"ip_address": {},
"imei": {},
"imei_lock": {},
"tags": {},
"created": {},
"last_updated": {},
"sim": {
"id": 123,
"iccid": "<string>",
"msisdn": "<string>",
"model": {},
"status": {
"id": 123,
"description": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}Endpoint Management
Create endpoint for an existing Emnify SIM
Creates an Emnify endpoint/equipment and assigns the provided SIM to it.
POST
/
api
/
v1
/
emnify
/
endpoint
/
for-sim
Create endpoint for an existing Emnify SIM
curl --request POST \
--url https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sim_id": 123,
"phone_number": "<string>",
"service_profile_id": 123,
"tariff_profile_id": 123,
"activate": true,
"tags": "<string>",
"imei": "<string>",
"imei_lock": true
}
'import requests
url = "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim"
payload = {
"name": "<string>",
"sim_id": 123,
"phone_number": "<string>",
"service_profile_id": 123,
"tariff_profile_id": 123,
"activate": True,
"tags": "<string>",
"imei": "<string>",
"imei_lock": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sim_id: 123,
phone_number: '<string>',
service_profile_id: 123,
tariff_profile_id: 123,
activate: true,
tags: '<string>',
imei: '<string>',
imei_lock: true
})
};
fetch('https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'sim_id' => 123,
'phone_number' => '<string>',
'service_profile_id' => 123,
'tariff_profile_id' => 123,
'activate' => true,
'tags' => '<string>',
'imei' => '<string>',
'imei_lock' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/emnify/endpoint/for-sim")
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 \"name\": \"<string>\",\n \"sim_id\": 123,\n \"phone_number\": \"<string>\",\n \"service_profile_id\": 123,\n \"tariff_profile_id\": 123,\n \"activate\": true,\n \"tags\": \"<string>\",\n \"imei\": \"<string>\",\n \"imei_lock\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": {
"id": 123,
"description": "<string>"
},
"service_profile": {
"id": 123,
"name": "<string>"
},
"tariff_profile": {
"id": 123,
"name": "<string>"
},
"ip_address": {},
"imei": {},
"imei_lock": {},
"tags": {},
"created": {},
"last_updated": {},
"sim": {
"id": 123,
"iccid": "<string>",
"msisdn": "<string>",
"model": {},
"status": {
"id": 123,
"description": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}Authorizations
Token de sesión Better Auth para rutas de backoffice; las rutas de portal usan su token propio.
Body
application/json
Endpoint/equipment name in Emnify
Emnify SIM ID to assign
SIM phone number/MSISDN used to resolve the real Emnify SIM ID
Emnify service profile ID
Emnify tariff profile ID
Activate SIM while creating endpoint
Endpoint tags
IMEI to associate with the endpoint
Whether Emnify should lock the endpoint to the IMEI