List Device Invites
List information for all device invites. Shows both pending invites and also previously accepted or rejected invites.
curl --url https://parrot.dev/api/v1/device-invites \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/device-invites', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/device-invites';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/device-invites"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/device-invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Create Device Invite
Creates a new device invite. This is the only method of adding a new device. It generates a unique code, and paired with /api/v1/device-invites/:id/qrcode
allows the device to be connected to the account.
No params are required.
Note: Each invite can only be used once.
curl --url https://parrot.dev/api/v1/device-invites \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/device-invites', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/device-invites';
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/device-invites"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("POST", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/device-invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Show Device Invite
Shows the information about the device invite including whether it's still pending or has been accepted by the device. Shows the actual invite code, which might be useful in generating your own qrcode which takes the format parrot:invite_code
.
curl --url https://parrot.dev/api/v1/device-invites/:id \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/device-invites/:id', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/device-invites/:id';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/device-invites/:id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/device-invites/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Show Device Invite QRCode
Generates and sends a QRCode image for the device_invite
. Suitable for embedding within a page for phone to scan.
curl --url https://parrot.dev/api/v1/device-invites/:id/qrcode \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/device-invites/:id/qrcode', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/device-invites/:id/qrcode';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/device-invites/:id/qrcode"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/device-invites/:id/qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Delete Device Invite
Deletes the device invite. Ensuring it can't be used.
curl --url https://parrot.dev/api/v1/device-invites/:id \
--request DELETE \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'DELETE',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/device-invites/:id', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/device-invites/:id';
const options = {
method: 'DELETE',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/device-invites/:id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/device-invites/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
List Devices
Retrieves a list of all devices belonging to the account.
curl --url https://parrot.dev/api/v1/devices \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/devices', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/devices';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/devices"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Show Device
Shows information about a specific device.
curl --url https://parrot.dev/api/v1/devices/:id \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/devices/:id', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/devices/:id';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/devices/:id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/devices/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Delete Device
Deletes/Removes a device
from the account. Once called the device will need to be invited again by using a new device_invite
curl --url https://parrot.dev/api/v1/devices/:id \
--request DELETE \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'DELETE',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/devices/:id', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/devices/:id';
const options = {
method: 'DELETE',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/devices/:id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/devices/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
List SMS Jobs
Lists all the sms_jobs
and their corresponding states.
curl --url https://parrot.dev/api/v1/sms-jobs \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/sms-jobs', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/sms-jobs';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/sms-jobs"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/sms-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Create SMS Job
Creates a new SMS job. This is the main interface for sending messages.
Details should be provided in a payload in the POST
body. Needs to be assigned to one or more devices using device_filter
.
curl --url https://parrot.dev/api/v1/sms-jobs \
--request POST \
--data '{"sms":{"message":"Hello World","to":"+123456789","device_filter":"comma,separated,device,ids"}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
body: JSON.stringify({ sms: { message: "Hello World", to: "+123456789", device_filter: "comma,separated,device,ids" } })
};
fetch('https://parrot.dev/api/v1/sms-jobs', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/sms-jobs';
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
body: JSON.stringify({ sms: { message: "Hello World", to: "+123456789", device_filter: "comma,separated,device,ids" } })
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/sms-jobs"
payload = {"sms":{"message":"Hello World","to":"+123456789","device_filter":"comma,separated,device,ids"}}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/sms-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
request.body = "{\"sms\":{\"message\":\"Hello World\",\"to\":\"+123456789\",\"device_filter\":\"comma,separated,device,ids\"}}"
response = http.request(request)
puts response.read_body
Show SMS Job
Show all the information about the sms_job
including the current sending status
curl --url https://parrot.dev/api/v1/sms-jobs/:id \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/sms-jobs/:id', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/sms-jobs/:id';
const options = {
method: 'GET',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/sms-jobs/:id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/sms-jobs/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body
Cancel SMS Job
Cancels the sms_job
. This will have no effect if it has already been picked up by the device
for processing. Useful mostly for clearing stuck sms_jobs
curl --url https://parrot.dev/api/v1/sms-jobs/:id/cancel \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $API_KEY'
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}' },
};
fetch('https://parrot.dev/api/v1/sms-jobs/:id/cancel', options)
.then(response => console.log(response))
.catch(err => console.error(err));
const fetch = require('node-fetch');
const url = 'https://parrot.dev/api/v1/sms-jobs/:id/cancel';
const options = {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'x-api-key' : '{{INSERT_API_KEY}}'},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
import requests
url = "https://parrot.dev/api/v1/sms-jobs/:id/cancel"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
"x-api-key": "{{INSERT_API_KEY}}"
}
response = requests.request("POST", url, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://parrot.dev/api/v1/sms-jobs/:id/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["x-api-key"] = '{{INSERT_API_KEY}}'
response = http.request(request)
puts response.read_body