Skip to main content
GET
/
api
/
v1
/
whoami
Who am I
curl --request GET \
  --url https://devs.adaptyvbio.com/api/v1/whoami \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://devs.adaptyvbio.com/api/v1/whoami"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://devs.adaptyvbio.com/api/v1/whoami', 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://devs.adaptyvbio.com/api/v1/whoami",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://devs.adaptyvbio.com/api/v1/whoami"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://devs.adaptyvbio.com/api/v1/whoami")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://devs.adaptyvbio.com/api/v1/whoami")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "organizations": [
    {
      "active": true,
      "id": "019b8da3-4a91-16c6-fa94-619212bee6a6",
      "name": "Acme Biotech",
      "role": "member"
    }
  ],
  "permissions": [
    "organization:read",
    "experiment:read",
    "experiment:create"
  ],
  "active_organization_id": "019b8da3-4a91-16c6-fa94-619212bee6a6",
  "token_expires_at": "2026-12-31T23:59:59Z",
  "user_id": "019b8da3-1111-2222-3333-444455556666"
}
{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}
{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}
{
"error": "experiment not found",
"request_id": "req_019462a4-b1c2-7def-8901-23456789abcd"
}

Authorizations

Authorization
string
header
required

Biscuit-based bearer token. Obtain tokens from the Adaptyv Portal or via the /tokens endpoint. Tokens encode organization membership and role-based capabilities; the API verifies the token's cryptographic signature and authorization claims before processing requests. Use /tokens/attenuate to create restricted tokens for delegation.

Response

Caller identity and access summary

Identity and access summary for the calling token.

organizations
object[]
required

Every organization the token can access. For most tokens this is a single organization; exactly one entry is flagged active.

permissions
string[]
required

The permissions this token grants, as resource:action strings (for example experiment:create). Use these to learn what the token can do before attempting an operation.

Example:
[
"organization:read",
"experiment:read",
"experiment:create"
]
active_organization_id
string<uuid> | null

Identifier of the organization the token is currently acting as. This is the organization flagged active: true in organizations.

Example:

"019b8da3-4a91-16c6-fa94-619212bee6a6"

token_expires_at
string<date-time> | null

When the token expires (ISO 8601 / RFC 3339, UTC). null for tokens without a recorded expiry.

Example:

"2026-12-31T23:59:59Z"

user_id
string<uuid> | null

The authenticated user's unique identifier.

Example:

"019b8da3-1111-2222-3333-444455556666"