Create department
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/departments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Marketing",
"branch_uuid": null
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/departments"
payload = {
"name": "Marketing",
"branch_uuid": None
}
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({name: 'Marketing', branch_uuid: null})
};
fetch('https://staging-api.usetyms.com/v1/adam/departments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Department created successfully",
"data": {
"uuid": "dep1234567890abcdef1234567890ab",
"business_uuid": "b1b2b3...",
"name": "Marketing",
"branch_uuid": null,
"deleted": false,
"created_at": "2026-03-05T09:00:00.000000Z"
}
}{
"status": "failed",
"message": "<string>"
}Departments
Create department
Create a new department dimension. Optionally link to a branch with branch_uuid.
POST
/
departments
Create department
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/departments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Marketing",
"branch_uuid": null
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/departments"
payload = {
"name": "Marketing",
"branch_uuid": None
}
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({name: 'Marketing', branch_uuid: null})
};
fetch('https://staging-api.usetyms.com/v1/adam/departments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Department created successfully",
"data": {
"uuid": "dep1234567890abcdef1234567890ab",
"business_uuid": "b1b2b3...",
"name": "Marketing",
"branch_uuid": null,
"deleted": false,
"created_at": "2026-03-05T09:00:00.000000Z"
}
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Body
application/json
Response
Department created