curl --request GET \
--url https://api.peridot.id/v1/users/{pid}/level \
--cookie pid_access=const options = {method: 'GET', headers: {cookie: 'pid_access='}};
fetch('https://api.peridot.id/v1/users/{pid}/level', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peridot.id/v1/users/{pid}/level"
headers = {"cookie": "pid_access="}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.peridot.id/v1/users/{pid}/level"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "pid_access=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"pid": "ifal@pid",
"level": 5,
"total_xp": 1701,
"current_level_xp": 1701,
"next_level_xp": 2819,
"progress_percentage": 0
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "No Identity found"
}Get a user's PeridotID level
Returns the authoritative Level + XP summary for any live (non-deleted)
PeridotID identity (ANT-89 M1). Open to ALL authorized apps, including
unverified ones — XP-submission permission is never consulted on reads
(it gates the M3 event-intake path only). Users without XP history read
as Level 1 / 0 XP. next_level_xp is null at the max-level cap.
XP totals are JSON-safe integers.
curl --request GET \
--url https://api.peridot.id/v1/users/{pid}/level \
--cookie pid_access=const options = {method: 'GET', headers: {cookie: 'pid_access='}};
fetch('https://api.peridot.id/v1/users/{pid}/level', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peridot.id/v1/users/{pid}/level"
headers = {"cookie": "pid_access="}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.peridot.id/v1/users/{pid}/level"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "pid_access=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"pid": "ifal@pid",
"level": 5,
"total_xp": 1701,
"current_level_xp": 1701,
"next_level_xp": 2819,
"progress_percentage": 0
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 404,
"message": "No Identity found"
}Authorizations
JWT access token set by /auth/google/callback or /auth/refresh
Path Parameters
The user's permanent PID (e.g. ifal@pid)
^[a-z0-9_]{3,20}@pid$Response
The user's level summary
Authoritative level summary, read live from PeridotID. Apps must NOT persist this — no XP duplication in app DBs; re-read it instead.
^[a-z0-9_]{3,20}@pid$Current level (starts at 1)
x >= 1Cumulative XP (JSON-safe integer)
x >= 0XP marking the start of the current level
x >= 0Progress within the current level band (0–100, 100 at cap)
0 <= x <= 100XP marking the next level; null at the max-level cap