NAV Navbar
cURL Node.js Python PHP Java Ruby

Iridium API v2019-07-25T16:46:48Z

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Iridium API is used for SMS and SBD communication with Iridium satellite mobile devices.

The Iridium API allows a message to be sent, and received from, any Iridium device located anywhere in the world. The device must be able to communicate with the Iridium network and therefore must have a clear view of the sky at the time of communication. SMS messages normally reach an Iridum device in around 22 seconds. Each SMS message can be up to 160 characters in length.

Base URLs:

Email: Melrose Labs - Technical Support

Authentication

Inbound SMS

Set callback URL

Code samples

# You can also use wget
curl -X POST https://api.melroselabs.com/iridium/inbound/callbackurl \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

const fetch = require('node-fetch');
const inputBody = '{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'x-api-key':'API_KEY'

};

fetch('https://api.melroselabs.com/iridium/inbound/callbackurl',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.post('https://api.melroselabs.com/iridium/inbound/callbackurl', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.melroselabs.com/iridium/inbound/callbackurl', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/iridium/inbound/callbackurl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.post 'https://api.melroselabs.com/iridium/inbound/callbackurl',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /inbound/callbackurl

Set callback URL for inbound SMS.

An SMS received from an Iridium device can be delivered to a URL, passing the source address, destination address and message content.

Body parameter

{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}

Parameters

Name In Type Required Description
body body CallbackURL true Callback URL
» url body string true URL to receive messages from Iridium devices
» sourceNumber body string false Sending Iridium number
» destinationNumber body string false Number receiving from Iridium device

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Callback URL set Empty

Update callback URL

Code samples

# You can also use wget
curl -X PUT https://api.melroselabs.com/iridium/inbound/callbackurl \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

const fetch = require('node-fetch');
const inputBody = '{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'x-api-key':'API_KEY'

};

fetch('https://api.melroselabs.com/iridium/inbound/callbackurl',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.put('https://api.melroselabs.com/iridium/inbound/callbackurl', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://api.melroselabs.com/iridium/inbound/callbackurl', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/iridium/inbound/callbackurl");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.put 'https://api.melroselabs.com/iridium/inbound/callbackurl',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /inbound/callbackurl

Update callback URL for inbound SMS

Body parameter

{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}

Parameters

Name In Type Required Description
body body CallbackURL true Callback URL
» url body string true URL to receive messages from Iridium devices
» sourceNumber body string false Sending Iridium number
» destinationNumber body string false Number receiving from Iridium device

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Callback URL updated Empty

Get callback URL

Code samples

# You can also use wget
curl -X GET https://api.melroselabs.com/iridium/inbound/callbackurl/{number} \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'API_KEY'

};

fetch('https://api.melroselabs.com/iridium/inbound/callbackurl/{number}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.get('https://api.melroselabs.com/iridium/inbound/callbackurl/{number}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.melroselabs.com/iridium/inbound/callbackurl/{number}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/iridium/inbound/callbackurl/{number}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.get 'https://api.melroselabs.com/iridium/inbound/callbackurl/{number}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /inbound/callbackurl/{number}

Get callbackback URL currently set for receiving inbound SMS

Parameters

Name In Type Required Description
number path string true Source (Iridium) or receiving number

Example responses

200 Response

{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}

Responses

Status Meaning Description Schema
200 OK Callback URL found CallbackURL

Satellites

Visible satellites

Code samples

# You can also use wget
curl -X GET https://api.melroselabs.com/iridium/satellites/visible/{location} \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'x-api-key':'API_KEY'

};

fetch('https://api.melroselabs.com/iridium/satellites/visible/{location}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.get('https://api.melroselabs.com/iridium/satellites/visible/{location}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.melroselabs.com/iridium/satellites/visible/{location}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/iridium/satellites/visible/{location}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.get 'https://api.melroselabs.com/iridium/satellites/visible/{location}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /satellites/visible/{location}

Get visible satellites at location

Parameters

Name In Type Required Description
location path string true Location in latitude and longitude (decimal). Example: 55.598,-2.731

Example responses

200 Response

{
  "satellite": "string",
  "signal": 0
}

Responses

Status Meaning Description Schema
200 OK Visible satellites returned VisibleSatellites

Send SMS

Send message to Iridium

Code samples

# You can also use wget
curl -X POST https://api.melroselabs.com/iridium/sms \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'x-api-key: API_KEY'

const fetch = require('node-fetch');
const inputBody = '{
  "iridiumNo": "string",
  "message": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'x-api-key':'API_KEY'

};

fetch('https://api.melroselabs.com/iridium/sms',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'x-api-key': 'API_KEY'
}

r = requests.post('https://api.melroselabs.com/iridium/sms', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'x-api-key' => 'API_KEY',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.melroselabs.com/iridium/sms', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.melroselabs.com/iridium/sms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'x-api-key' => 'API_KEY'
}

result = RestClient.post 'https://api.melroselabs.com/iridium/sms',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /sms

Send a message to an Iridium device using SMS. The message will be received when the device is in coverage.

An individual SMS text message can be up to 160 characters in length, has a source (or sender) address and a destination (or recipient) address.

Body parameter

{
  "iridiumNo": "string",
  "message": "string"
}

Parameters

Name In Type Required Description
body body MessageTo true Request body containing the message and Iridium number.
» iridiumNo body string true Iridium satellite phone number. Starts with 881.
» message body string true Message text to be sent to phone (ASCII). Message can be up to 75 characters in length.

Example responses

200 Response

{
  "transactionID": "string"
}

Responses

Status Meaning Description Schema
200 OK Message successfully sent to Iridium gateway SuccessSend
400 Bad Request Request is invalid (missing or malformed parameters). Error
500 Internal Server Error Unable to send message to Iridium gateway. There was either a temporary or permanent problem encountered when attempting to send the message. Retrying may result in success. Error

Schemas

CallbackURL

{
  "url": "string",
  "sourceNumber": "string",
  "destinationNumber": "string"
}

CallbackURL Schema

Properties

Name Type Required Restrictions Description
url string true none URL to receive messages from Iridium devices
sourceNumber string false none Sending Iridium number
destinationNumber string false none Number receiving from Iridium device

Empty

{}

Empty Schema

Properties

None

VisibleSatellites

{
  "satellite": "string",
  "signal": 0
}

VisibleSatellites Schema

Properties

Name Type Required Restrictions Description
satellite string false none Satellite designation
signal number false none Signal strength

Error

{
  "message": "string"
}

Error Schema

Properties

Name Type Required Restrictions Description
message string true none Will indicate the error encountered that prevented the message being sent to the Iridum device.

SuccessSend

{
  "transactionID": "string"
}

SuccessSend Schema

Properties

Name Type Required Restrictions Description
transactionID string true none Will contain transaction ID for a successful send. This indicates that the message has been sent to the Iridium gateway. Note that it does not indicate that the message has been delivered to the Iridium device.

MessageTo

{
  "iridiumNo": "string",
  "message": "string"
}

MessageTo Schema

Properties

Name Type Required Restrictions Description
iridiumNo string true none Iridium satellite phone number. Starts with 881.
message string true none Message text to be sent to phone (ASCII). Message can be up to 75 characters in length.