Set auth config for an environment
curl --request PUT \
--url https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dynamic": {
"environment_id": "<string>",
"api_key": "<string>"
},
"privy": {
"app_id": "cln1234abcd"
}
}
'import requests
url = "https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth"
payload = {
"dynamic": {
"environment_id": "<string>",
"api_key": "<string>"
},
"privy": { "app_id": "cln1234abcd" }
}
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({
dynamic: {environment_id: '<string>', api_key: '<string>'},
privy: {app_id: 'cln1234abcd'}
})
};
fetch('https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth', 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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth",
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([
'dynamic' => [
'environment_id' => '<string>',
'api_key' => '<string>'
],
'privy' => [
'app_id' => 'cln1234abcd'
]
]),
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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth"
payload := strings.NewReader("{\n \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth")
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 \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "<string>",
"method": "GET",
"templated": false,
"description": "<string>"
},
"environment": {
"href": "<string>",
"method": "GET",
"templated": false,
"description": "<string>"
}
},
"auth": {
"provider": "<string>",
"is_active": true,
"created_at": 123,
"updated_at": 123,
"credentials": {
"environment_id": "<string>",
"api_key": "<string>"
}
}
}{
"detail": "No wallet found with ID 12345 for this user.",
"error_code": "WAL-404-001",
"instance": "/v0/wallets/12345",
"status": 404,
"title": "Wallet Not Found",
"trace_id": "abc123-def456-ghi789",
"type": "https://api.sumvin.com/errors/wal-404-001"
}{
"detail": "No wallet found with ID 12345 for this user.",
"error_code": "WAL-404-001",
"instance": "/v0/wallets/12345",
"status": 404,
"title": "Wallet Not Found",
"trace_id": "abc123-def456-ghi789",
"type": "https://api.sumvin.com/errors/wal-404-001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Auth Config
Set auth config for an environment
PUT
/
v0
/
organisation
/
{org_id}
/
environments
/
{env_id}
/
auth
Set auth config for an environment
curl --request PUT \
--url https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dynamic": {
"environment_id": "<string>",
"api_key": "<string>"
},
"privy": {
"app_id": "cln1234abcd"
}
}
'import requests
url = "https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth"
payload = {
"dynamic": {
"environment_id": "<string>",
"api_key": "<string>"
},
"privy": { "app_id": "cln1234abcd" }
}
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({
dynamic: {environment_id: '<string>', api_key: '<string>'},
privy: {app_id: 'cln1234abcd'}
})
};
fetch('https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth', 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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth",
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([
'dynamic' => [
'environment_id' => '<string>',
'api_key' => '<string>'
],
'privy' => [
'app_id' => 'cln1234abcd'
]
]),
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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth"
payload := strings.NewReader("{\n \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\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://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sis.sumvin.com/v0/organisation/{org_id}/environments/{env_id}/auth")
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 \"dynamic\": {\n \"environment_id\": \"<string>\",\n \"api_key\": \"<string>\"\n },\n \"privy\": {\n \"app_id\": \"cln1234abcd\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "<string>",
"method": "GET",
"templated": false,
"description": "<string>"
},
"environment": {
"href": "<string>",
"method": "GET",
"templated": false,
"description": "<string>"
}
},
"auth": {
"provider": "<string>",
"is_active": true,
"created_at": 123,
"updated_at": 123,
"credentials": {
"environment_id": "<string>",
"api_key": "<string>"
}
}
}{
"detail": "No wallet found with ID 12345 for this user.",
"error_code": "WAL-404-001",
"instance": "/v0/wallets/12345",
"status": 404,
"title": "Wallet Not Found",
"trace_id": "abc123-def456-ghi789",
"type": "https://api.sumvin.com/errors/wal-404-001"
}{
"detail": "No wallet found with ID 12345 for this user.",
"error_code": "WAL-404-001",
"instance": "/v0/wallets/12345",
"status": 404,
"title": "Wallet Not Found",
"trace_id": "abc123-def456-ghi789",
"type": "https://api.sumvin.com/errors/wal-404-001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Available options:
dynamic, privy Show child attributes
Show child attributes
Privy authentication credentials.
Provide app_id always. Supply either verification_key (recommended for
production — local JWT verification against a public key) or api_key
(Privy app secret — enables REST-backed user data fallback), or neither
(verify against Privy's public JWKS endpoint).
Show child attributes
Show child attributes
Example:
{ "app_id": "cln1234abcd" }
⌘I