curl --request POST \
--url https://api.omegas.dev/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idle_suspend_secs": 123,
"name": "<string>",
"region": "<string>",
"space_id": "<string>"
}
'import requests
url = "https://api.omegas.dev/v1/devices"
payload = {
"idle_suspend_secs": 123,
"name": "<string>",
"region": "<string>",
"space_id": "<string>"
}
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({
idle_suspend_secs: 123,
name: '<string>',
region: '<string>',
space_id: '<string>'
})
};
fetch('https://api.omegas.dev/v1/devices', 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.omegas.dev/v1/devices",
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([
'idle_suspend_secs' => 123,
'name' => '<string>',
'region' => '<string>',
'space_id' => '<string>'
]),
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.omegas.dev/v1/devices"
payload := strings.NewReader("{\n \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\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.omegas.dev/v1/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omegas.dev/v1/devices")
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 \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"region": "<string>",
"space_id": "<string>",
"status": "<string>",
"current_task_id": "<string>",
"last_active_at": "<string>"
}Create device
Create + provision an Operator device. Runs the write gate (scope + entitlement), resolves the
target Space (org-wide key: space_id required + Space check; Space-scoped key: its held Space),
enforces the device-count and rolling-duration quotas, provisions the device sprite, and returns
the active device (201). Idempotency-Key replays a prior success and 409s a reused key + a
different body.
curl --request POST \
--url https://api.omegas.dev/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idle_suspend_secs": 123,
"name": "<string>",
"region": "<string>",
"space_id": "<string>"
}
'import requests
url = "https://api.omegas.dev/v1/devices"
payload = {
"idle_suspend_secs": 123,
"name": "<string>",
"region": "<string>",
"space_id": "<string>"
}
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({
idle_suspend_secs: 123,
name: '<string>',
region: '<string>',
space_id: '<string>'
})
};
fetch('https://api.omegas.dev/v1/devices', 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.omegas.dev/v1/devices",
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([
'idle_suspend_secs' => 123,
'name' => '<string>',
'region' => '<string>',
'space_id' => '<string>'
]),
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.omegas.dev/v1/devices"
payload := strings.NewReader("{\n \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\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.omegas.dev/v1/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omegas.dev/v1/devices")
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 \"idle_suspend_secs\": 123,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"space_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"region": "<string>",
"space_id": "<string>",
"status": "<string>",
"current_task_id": "<string>",
"last_active_at": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
At-most-once key for the create
Body
The create-device request body. Every field is optional; an org-wide key MUST carry space_id,
a Space-scoped key holding exactly one Space may omit it.
Response
The provisioned device
A device as returned on the /v1 surface. id/current_task_id carry the dev_/task_ prefixes
(the bare uuids never leave the DB); space_id is a raw uuid (Spaces are not an Operator concept).
dev_<uuid>.
Discriminator for polymorphic SDK decoders. Always "device".
task_<uuid> of the task currently holding the device, or null when idle.