curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request \
--header 'Content-Type: application/json' \
--header 'X-Portal-Bootstrap-Signature: <x-portal-bootstrap-signature>' \
--data '
{
"workos_user_id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"country": "<string>",
"turnstile_token": "<string>",
"use_case": "<string>",
"client_ip": "<string>"
}
'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request"
payload = {
"workos_user_id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"country": "<string>",
"turnstile_token": "<string>",
"use_case": "<string>",
"client_ip": "<string>"
}
headers = {
"X-Portal-Bootstrap-Signature": "<x-portal-bootstrap-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Portal-Bootstrap-Signature': '<x-portal-bootstrap-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workos_user_id: '<string>',
email: 'jsmith@example.com',
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
country: '<string>',
turnstile_token: '<string>',
use_case: '<string>',
client_ip: '<string>'
})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request', 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-sandbox.ledgersyncappv2.com/v3/portal/access-request",
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([
'workos_user_id' => '<string>',
'email' => 'jsmith@example.com',
'first_name' => '<string>',
'last_name' => '<string>',
'company_name' => '<string>',
'country' => '<string>',
'turnstile_token' => '<string>',
'use_case' => '<string>',
'client_ip' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Portal-Bootstrap-Signature: <x-portal-bootstrap-signature>"
],
]);
$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-sandbox.ledgersyncappv2.com/v3/portal/access-request"
payload := strings.NewReader("{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Portal-Bootstrap-Signature", "<x-portal-bootstrap-signature>")
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-sandbox.ledgersyncappv2.com/v3/portal/access-request")
.header("X-Portal-Bootstrap-Signature", "<x-portal-bootstrap-signature>")
.header("Content-Type", "application/json")
.body("{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Portal-Bootstrap-Signature"] = '<x-portal-bootstrap-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"environment": "SANDBOX",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Submit a sandbox access request
Records a developer’s sandbox sign-up. The portal calls this
immediately after the WorkOS sign-up flow completes; the request
is HMAC-signed with the shared bootstrap secret
(X-Portal-Bootstrap-Signature header), so the embedded
workos_user_id is trusted without an additional JWT round-trip.
The endpoint:
- Verifies the Cloudflare Turnstile token against the canonical
https://challenges.cloudflare.com/turnstile/v0/siteverifyendpoint usingTURNSTILE_SECRET_KEY. - Normalizes the email (strip
+tag, gmail dot-stripping) and rejects when the source IP exceeds 3 sign-ups in 24h or the email domain exceeds 10 in 24h. - Inserts a
v3.access_requestrow withstatus=PENDINGandenvironment=SANDBOX.
Feature-flagged behind ledgersync.v3.portal-gating.enabled;
with the flag off, returns 503.
curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request \
--header 'Content-Type: application/json' \
--header 'X-Portal-Bootstrap-Signature: <x-portal-bootstrap-signature>' \
--data '
{
"workos_user_id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"country": "<string>",
"turnstile_token": "<string>",
"use_case": "<string>",
"client_ip": "<string>"
}
'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request"
payload = {
"workos_user_id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"country": "<string>",
"turnstile_token": "<string>",
"use_case": "<string>",
"client_ip": "<string>"
}
headers = {
"X-Portal-Bootstrap-Signature": "<x-portal-bootstrap-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Portal-Bootstrap-Signature': '<x-portal-bootstrap-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
workos_user_id: '<string>',
email: 'jsmith@example.com',
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
country: '<string>',
turnstile_token: '<string>',
use_case: '<string>',
client_ip: '<string>'
})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request', 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-sandbox.ledgersyncappv2.com/v3/portal/access-request",
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([
'workos_user_id' => '<string>',
'email' => 'jsmith@example.com',
'first_name' => '<string>',
'last_name' => '<string>',
'company_name' => '<string>',
'country' => '<string>',
'turnstile_token' => '<string>',
'use_case' => '<string>',
'client_ip' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Portal-Bootstrap-Signature: <x-portal-bootstrap-signature>"
],
]);
$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-sandbox.ledgersyncappv2.com/v3/portal/access-request"
payload := strings.NewReader("{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Portal-Bootstrap-Signature", "<x-portal-bootstrap-signature>")
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-sandbox.ledgersyncappv2.com/v3/portal/access-request")
.header("X-Portal-Bootstrap-Signature", "<x-portal-bootstrap-signature>")
.header("Content-Type", "application/json")
.body("{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/portal/access-request")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Portal-Bootstrap-Signature"] = '<x-portal-bootstrap-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workos_user_id\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country\": \"<string>\",\n \"turnstile_token\": \"<string>\",\n \"use_case\": \"<string>\",\n \"client_ip\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"environment": "SANDBOX",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Headers
Hex HMAC-SHA256 of the raw request body (or, for the GET
status endpoint, of the X-Portal-Workos-User-Id header
value) computed with the shared portal bootstrap secret.
Body
The WorkOS user id of the signed-in developer.
255128128255ISO 3166-1 alpha-2 country code, e.g. US.
2Cloudflare Turnstile token from the portal widget.
Free-text "what are you building" summary.
2000Source IP captured by the portal (used for rate-limiting).
