Skip to main content
POST
/
api
/
v1
/
tokens
/
attenuate
Attenuate token
curl --request POST \
  --url https://foundry-api-public.adaptyvbio.com/api/v1/tokens/attenuate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "attenuation": {
    "allowed_actions": [
      "<string>"
    ],
    "allowed_org_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "allowed_resources": [
      "<string>"
    ],
    "expires_at": "2023-11-07T05:31:56Z",
    "non_destructive": true,
    "read_only": true
  },
  "token": "<string>"
}
'
{
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to attenuate (restrict) an existing token.

Attenuation is a Biscuit cryptographic feature that adds restriction blocks without needing the private signing key. Any authenticated user can attenuate their tokens to create limited-scope versions for delegation.

attenuation
object
required

Restrictions to apply to the token.

token
string
required

Existing token string (format: abs0_{slug}{biscuit_base64}) to attenuate.

Response

Token attenuated successfully

Response after attenuating a token.

token
string
required

The attenuated token string. Format: abs0_{slug}{biscuit_base64}.