Create subject
curl --request POST \
--url https://partner-api.ochy-prod.com/subjects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "runner@example.com",
"name": "Jane Smith",
"height": 1.72,
"weight": 62
}
'import requests
url = "https://partner-api.ochy-prod.com/subjects"
payload = {
"email": "runner@example.com",
"name": "Jane Smith",
"height": 1.72,
"weight": 62
}
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({email: 'runner@example.com', name: 'Jane Smith', height: 1.72, weight: 62})
};
fetch('https://partner-api.ochy-prod.com/subjects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subject_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2025-03-20T15:30:00Z"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}{
"detail": "API Key is missing"
}{
"detail": "API Key is missing"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}Subjects
Create subject
Create a new subject. The subject_id is generated by the server.
All body fields are optional — you can create a subject with no data and update it later.
Metric system: height is in meters and weight is in kilograms.
POST
/
subjects
Create subject
curl --request POST \
--url https://partner-api.ochy-prod.com/subjects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "runner@example.com",
"name": "Jane Smith",
"height": 1.72,
"weight": 62
}
'import requests
url = "https://partner-api.ochy-prod.com/subjects"
payload = {
"email": "runner@example.com",
"name": "Jane Smith",
"height": 1.72,
"weight": 62
}
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({email: 'runner@example.com', name: 'Jane Smith', height: 1.72, weight: 62})
};
fetch('https://partner-api.ochy-prod.com/subjects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subject_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2025-03-20T15:30:00Z"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}{
"detail": "API Key is missing"
}{
"detail": "API Key is missing"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}Authorizations
bearerAuthapiKeyHeaderapiKeyQuery
Recommended. Pass your API key as a Bearer token in the Authorization header: Authorization: Bearer YOUR_API_KEY.
Body
application/json