curl --request POST \
--url https://api.datalyr.com/v1/signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"workspace_name": "Ada Labs",
"primary_domain": "ada.dev",
"plan": "growth",
"key_request": {
"name": "Setup agent",
"scopes": [
"datalyr:read"
]
}
}
'import requests
url = "https://api.datalyr.com/v1/signup"
payload = {
"email": "[email protected]",
"workspace_name": "Ada Labs",
"primary_domain": "ada.dev",
"plan": "growth",
"key_request": {
"name": "Setup agent",
"scopes": ["datalyr:read"]
}
}
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({
email: '[email protected]',
workspace_name: 'Ada Labs',
primary_domain: 'ada.dev',
plan: 'growth',
key_request: {name: 'Setup agent', scopes: ['datalyr:read']}
})
};
fetch('https://api.datalyr.com/v1/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.datalyr.com/v1/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([
'email' => '[email protected]',
'workspace_name' => 'Ada Labs',
'primary_domain' => 'ada.dev',
'plan' => 'growth',
'key_request' => [
'name' => 'Setup agent',
'scopes' => [
'datalyr:read'
]
]
]),
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.datalyr.com/v1/signup"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\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.datalyr.com/v1/signup")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/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 \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "checkout_ready",
"signup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signup_secret": "<string>",
"checkout_url": "<string>",
"status_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"key_request": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poll_url": "<string>"
}
}{
"error": "<string>",
"code": "scope_not_allowed_at_signup"
}{
"error": "<string>"
}{
"error": "<string>"
}Start a signup
Record a pending signup and return a checkout link for the person who will own the workspace. This is the entry point for an agent that has no key yet, because no workspace exists for it to have a key on.
What this creates: a pending signup only. No account, workspace or key exists until the person pays at checkout_url. We also send a verification email as a backup path. Its link opens the same checkout page.
What happens next is a human’s job. The checkout page shows the workspace name, domain, plan and email you sent. The person can edit the email and pick a plan when you sent none. They pay through an Autumn-hosted Stripe checkout. The workspace row is created only when that payment settles. There is no trial flag and no endpoint that mints a workspace without it.
Store signup_secret. It is returned once. Send it as Authorization: Bearer dl_signup_… to status_url and to key_request.poll_url.
Sending it twice. Each call creates another pending signup and spends from both rate-limit buckets. Retry only on 503; a 429 means wait for the window named in Retry-After.
curl --request POST \
--url https://api.datalyr.com/v1/signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"workspace_name": "Ada Labs",
"primary_domain": "ada.dev",
"plan": "growth",
"key_request": {
"name": "Setup agent",
"scopes": [
"datalyr:read"
]
}
}
'import requests
url = "https://api.datalyr.com/v1/signup"
payload = {
"email": "[email protected]",
"workspace_name": "Ada Labs",
"primary_domain": "ada.dev",
"plan": "growth",
"key_request": {
"name": "Setup agent",
"scopes": ["datalyr:read"]
}
}
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({
email: '[email protected]',
workspace_name: 'Ada Labs',
primary_domain: 'ada.dev',
plan: 'growth',
key_request: {name: 'Setup agent', scopes: ['datalyr:read']}
})
};
fetch('https://api.datalyr.com/v1/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.datalyr.com/v1/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([
'email' => '[email protected]',
'workspace_name' => 'Ada Labs',
'primary_domain' => 'ada.dev',
'plan' => 'growth',
'key_request' => [
'name' => 'Setup agent',
'scopes' => [
'datalyr:read'
]
]
]),
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.datalyr.com/v1/signup"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\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.datalyr.com/v1/signup")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalyr.com/v1/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 \"email\": \"[email protected]\",\n \"workspace_name\": \"Ada Labs\",\n \"primary_domain\": \"ada.dev\",\n \"plan\": \"growth\",\n \"key_request\": {\n \"name\": \"Setup agent\",\n \"scopes\": [\n \"datalyr:read\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "checkout_ready",
"signup_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signup_secret": "<string>",
"checkout_url": "<string>",
"status_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"key_request": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"poll_url": "<string>"
}
}{
"error": "<string>",
"code": "scope_not_allowed_at_signup"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
Response
Accepted. The checkout link is ready, and a backup verification email has been sent. Identical for an address that already has an account.
The same shape for a new address and one that already has an account. No workspace id or key is returned here before payment.
Was this page helpful?