Sign up
curl --request POST \
--url https://api.getmetacognition.com/signup \
--header 'Content-Type: application/json' \
--data '
{
"org_id": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.getmetacognition.com/signup"
payload = {
"org_id": "<string>",
"name": "<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({org_id: '<string>', name: '<string>'})
};
fetch('https://api.getmetacognition.com/signup', 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.getmetacognition.com/signup",
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([
'org_id' => '<string>',
'name' => '<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.getmetacognition.com/signup"
payload := strings.NewReader("{\n \"org_id\": \"<string>\",\n \"name\": \"<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.getmetacognition.com/signup")
.header("Content-Type", "application/json")
.body("{\n \"org_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmetacognition.com/signup")
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 \"org_id\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"org_id": "<string>",
"user_id": "<string>",
"api_key": "<string>",
"key": {}
}Auth & sessions
Sign up
Create an org and receive the first API key.
POST
/
signup
Sign up
curl --request POST \
--url https://api.getmetacognition.com/signup \
--header 'Content-Type: application/json' \
--data '
{
"org_id": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.getmetacognition.com/signup"
payload = {
"org_id": "<string>",
"name": "<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({org_id: '<string>', name: '<string>'})
};
fetch('https://api.getmetacognition.com/signup', 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.getmetacognition.com/signup",
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([
'org_id' => '<string>',
'name' => '<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.getmetacognition.com/signup"
payload := strings.NewReader("{\n \"org_id\": \"<string>\",\n \"name\": \"<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.getmetacognition.com/signup")
.header("Content-Type", "application/json")
.body("{\n \"org_id\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmetacognition.com/signup")
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 \"org_id\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"org_id": "<string>",
"user_id": "<string>",
"api_key": "<string>",
"key": {}
}Creates a new organization, a default user, and the first API key. The plaintext API key appears in the response once.
Response —
Body
{
"org_id": "acme", // optional; auto-generated when omitted
"name": "acme corp" // optional; label for the first key
}
string
Optional org id. If omitted, the server generates
org_<10-char base62>. Must be alphanumeric, with - or _ allowed, and at most 64 chars. Returns 409 Conflict if the id already exists.string
Human-readable label for the org’s first API key. Optional, max 64 chars.
Response — 201
string
Server-generated org id. Format
org_<10 chars>.string
Server-generated user id inside that org.
string
The plaintext API key. Save it now. It cannot be recovered later.
object
Metadata about the key (id, prefix, display_id, name, scopes, timestamps).
Example
curl -X POST https://api.getmetacognition.com/signup \
-H 'content-type: application/json' \
-d '{"name": "acme corp"}'
import httpx
resp = httpx.post(
"https://api.getmetacognition.com/signup",
json={"name": "acme corp"},
)
data = resp.json()
api_key = data["api_key"] # store this securely
Response
{
"org_id": "org_79d0fHwDRhoZ8Ww7",
"user_id": "user_FuHtj0C14AaKHJq1",
"api_key": "tex_live_LfbRIlFWtazFQaLw2C05IBTuoKX0B-sLFZ5XOHmkSJ8",
"key": {
"id": "a1247653-9646-4f32-b04f-72d2c0f5355b",
"prefix": "tex_live_",
"display_id": "LfbRIlFW",
"name": "acme corp",
"scopes": ["*"],
"is_active": true,
"created_at": "2026-05-08T09:56:42.855738",
"last_used_at": null,
"revoked_at": null
}
}
The
api_key field appears only in this response. Store it server-side. We cannot recover or re-display it.This endpoint is unauthenticated by design. Anyone can create an org. For a private launch, put your existing auth provider in front and only forward to
/signup after your checks pass.Errors
| Status | When |
|---|---|
409 Conflict | The org_id you supplied is already in use, or hash collision on key minting. |
422 Unprocessable Entity | org_id failed the alphanumeric / length validation. |

