curl --request PUT \
--url https://pria.praxislxp.com/api/user/api-key/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedSources": [
"52.206.211.0/24",
"*.example.com"
],
"enforceSources": false
}
'import requests
url = "https://pria.praxislxp.com/api/user/api-key/sources"
payload = {
"allowedSources": ["52.206.211.0/24", "*.example.com"],
"enforceSources": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedSources: ['52.206.211.0/24', '*.example.com'], enforceSources: false})
};
fetch('https://pria.praxislxp.com/api/user/api-key/sources', 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://pria.praxislxp.com/api/user/api-key/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allowedSources' => [
'52.206.211.0/24',
'*.example.com'
],
'enforceSources' => false
]),
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://pria.praxislxp.com/api/user/api-key/sources"
payload := strings.NewReader("{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://pria.praxislxp.com/api/user/api-key/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/api-key/sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"allowedSources": [
"<string>"
],
"enforceSources": true,
"mixed": true
}Set the authorized-source allowlist for the caller's personal API key
Restricts which sources may exchange this API key for a JWT at POST /api/auth/api-key-signin. Entries are auto-classified as web origins (“https://app.example.com”, “*.example.com”) or network sources (“52.206.211.0/24”, “1.2.3.4”) and are normalized before storage. An EMPTY list means the key is open (no enforcement) — existing keys are unaffected until a list is saved.
Security notes: network entries are matched against the resolved client IP and cannot be spoofed; web origins are matched on the Origin header, which non-browser clients can set freely, so an origin entry constrains browser use only. A MIXED list is therefore only as strong as its weakest entry — the response returns mixed: true so callers can surface that. The Referer header is deliberately not accepted. Survives key rotation.
curl --request PUT \
--url https://pria.praxislxp.com/api/user/api-key/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedSources": [
"52.206.211.0/24",
"*.example.com"
],
"enforceSources": false
}
'import requests
url = "https://pria.praxislxp.com/api/user/api-key/sources"
payload = {
"allowedSources": ["52.206.211.0/24", "*.example.com"],
"enforceSources": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedSources: ['52.206.211.0/24', '*.example.com'], enforceSources: false})
};
fetch('https://pria.praxislxp.com/api/user/api-key/sources', 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://pria.praxislxp.com/api/user/api-key/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allowedSources' => [
'52.206.211.0/24',
'*.example.com'
],
'enforceSources' => false
]),
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://pria.praxislxp.com/api/user/api-key/sources"
payload := strings.NewReader("{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://pria.praxislxp.com/api/user/api-key/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/api-key/sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowedSources\": [\n \"52.206.211.0/24\",\n \"*.example.com\"\n ],\n \"enforceSources\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"allowedSources": [
"<string>"
],
"enforceSources": true,
"mixed": true
}Authorizations
JWT token passed in authorization header
Body
Was this page helpful?