Skip to main content
POST
/
v1
/
purchases
/
redeem
Redeem License
curl --request POST \
  --url https://api.agentpowers.ai/v1/purchases/redeem \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "license_code": "<string>"
}
'
import requests

url = "https://api.agentpowers.ai/v1/purchases/redeem"

payload = { "license_code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({license_code: '<string>'})
};

fetch('https://api.agentpowers.ai/v1/purchases/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "skill_slug": "<string>",
  "purchase_id": "<string>",
  "message": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Provide a Clerk JWT or a long-lived CLI token (prefix ap_cli_). Pass as Authorization: Bearer <token>.

Body

application/json
license_code
string
required
Required string length: 14 - 26
Pattern: ^[A-F0-9]{4,8}-[A-F0-9]{4,8}-[A-F0-9]{4,8}$

Response

Successful Response

skill_slug
string
required
purchase_id
string
required
message
string
required