API accounts
Create an individual or studio-owned API account
A verified individual may create their own individual account. A studio account is created only after server-side studio owner/admin authorization.
POST
/
v1
/
api-account
Create an individual or studio-owned API account
curl --request POST \
--url https://api.batchrelay.com/v1/api-account \
--header 'Content-Type: application/json' \
--data '
{
"studio_id": "<string>"
}
'import requests
url = "https://api.batchrelay.com/v1/api-account"
payload = { "studio_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({studio_id: '<string>'})
};
fetch('https://api.batchrelay.com/v1/api-account', 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.batchrelay.com/v1/api-account",
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([
'studio_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.batchrelay.com/v1/api-account"
payload := strings.NewReader("{\n \"studio_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.batchrelay.com/v1/api-account")
.header("Content-Type", "application/json")
.body("{\n \"studio_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/api-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"studio_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner": {
"studio_id": "<string>",
"individual_owner_user_id": "<string>"
},
"billing": {
"customer_configured": true,
"default_payment_method_configured": true
},
"created_by_user_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}Body
application/json
Response
Created API account
Exactly one reference is present: studio_id for studio accounts or individual_owner_user_id for individual accounts.
Show child attributes
Show child attributes
Available options:
active, disabled Show child attributes
Show child attributes
⌘I
Create an individual or studio-owned API account
curl --request POST \
--url https://api.batchrelay.com/v1/api-account \
--header 'Content-Type: application/json' \
--data '
{
"studio_id": "<string>"
}
'import requests
url = "https://api.batchrelay.com/v1/api-account"
payload = { "studio_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({studio_id: '<string>'})
};
fetch('https://api.batchrelay.com/v1/api-account', 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.batchrelay.com/v1/api-account",
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([
'studio_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.batchrelay.com/v1/api-account"
payload := strings.NewReader("{\n \"studio_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.batchrelay.com/v1/api-account")
.header("Content-Type", "application/json")
.body("{\n \"studio_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.batchrelay.com/v1/api-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"studio_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner": {
"studio_id": "<string>",
"individual_owner_user_id": "<string>"
},
"billing": {
"customer_configured": true,
"default_payment_method_configured": true
},
"created_by_user_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>"
}