Add credits
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"credits": 500
}'import requests
url = "https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits"
payload = { "credits": 500 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({credits: 500})
};
fetch('https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Credits granted successfully.",
"data": {
"allocation": {
"uuid": "c3d4e5f6",
"allocation_type": "credits",
"quantity": 500,
"subscription_reference": "partner_credit_7a8b9c",
"subscription_expires_at": "2027-07-09T02:00:00.000000Z",
"meta": {
"holding_credits_charged": 500,
"credits_granted": 500
}
},
"holding_credits_charged": 500,
"partner_holding_balance": 8825,
"business_credit_balance": 1250.5
}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "Insufficient partner credit holding.",
"error_code": "insufficient_partner_credit_holding"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}Distribution Partners
Add credits
Transfer AI credits from partner holding to the business at 1:1. Does not require Plus. Transferred credits expire 12 months after grant.
POST
/
referred-businesses
/
{business_uuid}
/
add-credits
Add credits
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"credits": 500
}'import requests
url = "https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits"
payload = { "credits": 500 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({credits: 500})
};
fetch('https://staging-api.usetyms.com/v1/adam/referred-businesses/{business_uuid}/add-credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Credits granted successfully.",
"data": {
"allocation": {
"uuid": "c3d4e5f6",
"allocation_type": "credits",
"quantity": 500,
"subscription_reference": "partner_credit_7a8b9c",
"subscription_expires_at": "2027-07-09T02:00:00.000000Z",
"meta": {
"holding_credits_charged": 500,
"credits_granted": 500
}
},
"holding_credits_charged": 500,
"partner_holding_balance": 8825,
"business_credit_balance": 1250.5
}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "Insufficient partner credit holding.",
"error_code": "insufficient_partner_credit_holding"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}1:1 transfer from holding to the business ledger. Use when plan credits run low or you prefer pay-as-you-go top-ups instead of Add seats. Blocked when
credit_from_referral_partner is true.Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Path Parameters
Body
application/json
Holding credits to transfer to the business at 1:1.
Required range:
1 <= x <= 1000000Response
Credits transferred
Example:
"success"
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Available options:
seats, credits Holding credits charged (rounded up).