Create TOS acceptance link
curl --request POST \
--url https://api-sandbox.lumx.io/customers/{id}/tos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirectUrl": "https://yourapp.com/onboarding/next-step"
}
'import requests
url = "https://api-sandbox.lumx.io/customers/{id}/tos"
payload = { "redirectUrl": "https://yourapp.com/onboarding/next-step" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirectUrl: 'https://yourapp.com/onboarding/next-step'})
};
fetch('https://api-sandbox.lumx.io/customers/{id}/tos', 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.lumx.io/customers/{id}/tos",
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([
'redirectUrl' => 'https://yourapp.com/onboarding/next-step'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.lumx.io/customers/{id}/tos"
payload := strings.NewReader("{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}")
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.lumx.io/customers/{id}/tos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.lumx.io/customers/{id}/tos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://dashboard.lumx.io/tos/sandbox/eyJhbGciOi...",
"expiresAt": "2026-11-10T17:39:26.227Z"
}{
"requestId": "0e6da7e8-1828-47e1-a3aa-eeef509e52f1",
"timestamp": "2026-11-04T16:51:35.419Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 400,
"code": "VALIDATION_ERROR",
"message": "The request body contains invalid parameters.",
"validationErrors": [
{
"param": "redirectUrl",
"message": "redirectUrl must be a URL address"
}
]
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 401,
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}{
"requestId": "11cc7bdd-2921-4b1e-987e-06ad3094b6ce",
"timestamp": "2026-11-04T16:51:37.308Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 403,
"code": "FORBIDDEN",
"message": "This API key can't access this resource."
}{
"requestId": "33fa2684-1530-4dff-a398-bf97d8f77721",
"timestamp": "2026-11-04T16:51:36.852Z",
"path": "/customers/00000000-0000-4000-8000-000000000000/tos",
"status": 404,
"code": "CUSTOMER_NOT_FOUND",
"message": "Customer with id 00000000-0000-4000-8000-000000000000 not found"
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 409,
"code": "TOS_NOT_REQUIRED",
"message": "Project does not require terms of service acceptance"
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 500,
"code": "UPSTREAM_SERVICE_ERROR",
"message": "An unexpected error occurred."
}Customers
Create TOS acceptance link
Generates a terms of service acceptance link that covers the customer’s accounts.
POST
/
customers
/
{id}
/
tos
Create TOS acceptance link
curl --request POST \
--url https://api-sandbox.lumx.io/customers/{id}/tos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirectUrl": "https://yourapp.com/onboarding/next-step"
}
'import requests
url = "https://api-sandbox.lumx.io/customers/{id}/tos"
payload = { "redirectUrl": "https://yourapp.com/onboarding/next-step" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirectUrl: 'https://yourapp.com/onboarding/next-step'})
};
fetch('https://api-sandbox.lumx.io/customers/{id}/tos', 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.lumx.io/customers/{id}/tos",
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([
'redirectUrl' => 'https://yourapp.com/onboarding/next-step'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.lumx.io/customers/{id}/tos"
payload := strings.NewReader("{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}")
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.lumx.io/customers/{id}/tos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.lumx.io/customers/{id}/tos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirectUrl\": \"https://yourapp.com/onboarding/next-step\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://dashboard.lumx.io/tos/sandbox/eyJhbGciOi...",
"expiresAt": "2026-11-10T17:39:26.227Z"
}{
"requestId": "0e6da7e8-1828-47e1-a3aa-eeef509e52f1",
"timestamp": "2026-11-04T16:51:35.419Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 400,
"code": "VALIDATION_ERROR",
"message": "The request body contains invalid parameters.",
"validationErrors": [
{
"param": "redirectUrl",
"message": "redirectUrl must be a URL address"
}
]
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 401,
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}{
"requestId": "11cc7bdd-2921-4b1e-987e-06ad3094b6ce",
"timestamp": "2026-11-04T16:51:37.308Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 403,
"code": "FORBIDDEN",
"message": "This API key can't access this resource."
}{
"requestId": "33fa2684-1530-4dff-a398-bf97d8f77721",
"timestamp": "2026-11-04T16:51:36.852Z",
"path": "/customers/00000000-0000-4000-8000-000000000000/tos",
"status": 404,
"code": "CUSTOMER_NOT_FOUND",
"message": "Customer with id 00000000-0000-4000-8000-000000000000 not found"
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 409,
"code": "TOS_NOT_REQUIRED",
"message": "Project does not require terms of service acceptance"
}{
"requestId": "5b7c3a1e-2f4d-4c8a-9e6b-1d2f3a4b5c6d",
"timestamp": "2026-11-04T17:00:00.000Z",
"path": "/customers/5d72f3b3-48a1-4188-a003-38e40be85548/tos",
"status": 500,
"code": "UPSTREAM_SERVICE_ERROR",
"message": "An unexpected error occurred."
}Authorizations
Body
application/json
Response
Terms of service link successfully generated.