Create a product
POST
/v1/admin/products
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.sealcord.com/v1/admin/products"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"id\": \"example\", \"name\": \"example\", \"key_prefix\": \"example\", \"current_major\": 1, \"machines_per_seat\": 3, \"licence_signing_domain\": \"example\", \"verdict_signing_domain\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.sealcord.com/v1/admin/products"
payload := strings.NewReader("{ \"id\": \"example\", \"name\": \"example\", \"key_prefix\": \"example\", \"current_major\": 1, \"machines_per_seat\": 3, \"licence_signing_domain\": \"example\", \"verdict_signing_domain\": \"example\" }")
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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.sealcord.com/v1/admin/products")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"id\": \"example\", \"name\": \"example\", \"key_prefix\": \"example\", \"current_major\": 1, \"machines_per_seat\": 3, \"licence_signing_domain\": \"example\", \"verdict_signing_domain\": \"example\" }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'https://api.sealcord.com/v1/admin/products';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","name":"example","key_prefix":"example","current_major":1,"machines_per_seat":3,"licence_signing_domain":"example","verdict_signing_domain":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.sealcord.com/v1/admin/products";
let payload = json!({ "id": "example", "name": "example", "key_prefix": "example", "current_major": 1, "machines_per_seat": 3, "licence_signing_domain": "example", "verdict_signing_domain": "example" });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.sealcord.com/v1/admin/products \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "name": "example", "key_prefix": "example", "current_major": 1, "machines_per_seat": 3, "licence_signing_domain": "example", "verdict_signing_domain": "example" }'The API generates the product’s Ed25519 signing key and stores it encrypted; the response carries its public key, never the private key. An organization’s product is its own and counts against its plan.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id
required
string
name
required
string
key_prefix
required
string
current_major
required
integer
machines_per_seat
integer
licence_signing_domain
string
verdict_signing_domain
string
Responses
Section titled “Responses”Missing or invalid API key.
Needs scope products:write.