Register business
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/register-business \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "owner@example.com",
"firstname": "Jane",
"lastname": "Smith",
"business_name": "Smith Enterprises",
"password": "Secure1!",
"country": "US",
"currency": "USD",
"timezone": "America/New_York",
"grant_access": "admin",
"credit_from_referral_partner": false
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/register-business"
payload = {
"email": "owner@example.com",
"firstname": "Jane",
"lastname": "Smith",
"business_name": "Smith Enterprises",
"password": "Secure1!",
"country": "US",
"currency": "USD",
"timezone": "America/New_York",
"grant_access": "admin",
"credit_from_referral_partner": False
}
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({
email: 'owner@example.com',
firstname: 'Jane',
lastname: 'Smith',
business_name: 'Smith Enterprises',
password: 'Secure1!',
country: 'US',
currency: 'USD',
timezone: 'America/New_York',
grant_access: 'admin',
credit_from_referral_partner: false
})
};
fetch('https://staging-api.usetyms.com/v1/adam/register-business', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Business registered successfully.",
"data": {
"business_uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Smith Enterprises",
"currency": "USD",
"country": "US",
"api_public_key": "tyms_pk_example",
"api_secret_key": "tyms_sk_example"
}
}{
"status": "failed",
"message": "Invalid partner API key. Use your distributor partner secret, not a business tyms_sk key."
}Distribution Partners
Register business
Create a new Tyms business using a partner API key.
POST
/
register-business
Register business
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/register-business \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "owner@example.com",
"firstname": "Jane",
"lastname": "Smith",
"business_name": "Smith Enterprises",
"password": "Secure1!",
"country": "US",
"currency": "USD",
"timezone": "America/New_York",
"grant_access": "admin",
"credit_from_referral_partner": false
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/register-business"
payload = {
"email": "owner@example.com",
"firstname": "Jane",
"lastname": "Smith",
"business_name": "Smith Enterprises",
"password": "Secure1!",
"country": "US",
"currency": "USD",
"timezone": "America/New_York",
"grant_access": "admin",
"credit_from_referral_partner": False
}
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({
email: 'owner@example.com',
firstname: 'Jane',
lastname: 'Smith',
business_name: 'Smith Enterprises',
password: 'Secure1!',
country: 'US',
currency: 'USD',
timezone: 'America/New_York',
grant_access: 'admin',
credit_from_referral_partner: false
})
};
fetch('https://staging-api.usetyms.com/v1/adam/register-business', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Business registered successfully.",
"data": {
"business_uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Smith Enterprises",
"currency": "USD",
"country": "US",
"api_public_key": "tyms_pk_example",
"api_secret_key": "tyms_sk_example"
}
}{
"status": "failed",
"message": "Invalid partner API key. Use your distributor partner secret, not a business tyms_sk key."
}Call with your partner API key in
X-API-Key. Do not use a business tyms_sk_ key. After success, use the returned api_secret_key for all other endpoints.Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Body
application/json
Owner account password. Must be at least 8 characters and include a letter, a number, and a special character (e.g. !@#$%^&*).
Minimum string length:
8Example:
"Secure1!"
admin returns api_public_key and api_secret_key in the response.
Available options:
admin, viewer, editor When true, Tyms credit usage for this business is charged to the referring partner's credit balance in the partner portal (the partner manages credit for the business). Optional; defaults to false.