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": {}
}
]
}purchases
Redeem License
Redeem a license code to link purchase to account.
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
Provide a Clerk JWT or a long-lived CLI token (prefix ap_cli_). Pass as Authorization: Bearer <token>.
Body
application/json
Required string length:
14 - 26Pattern:
^[A-F0-9]{4,8}-[A-F0-9]{4,8}-[A-F0-9]{4,8}$Was this page helpful?