Get optimal cadence schedule
GET
/api/v1/ai/schedule/optimal
const url = 'https://api.ultimateteam.ai/api/v1/ai/schedule/optimal?agent_role=example&cadence_type=example';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.ultimateteam.ai/api/v1/ai/schedule/optimal?agent_role=example&cadence_type=example' \ --header 'X-API-Key: <X-API-Key>'Get optimal schedule for a cadence type.
Returns default fixed schedule when no prediction data exists (cold start).
Args: agent_role: Which agent role owns this cadence. cadence_type: Type of cadence. user: Authenticated user context.
Returns: Optimal schedule recommendation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”agent_role
required
Agent Role
string
cadence_type
required
Cadence Type
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
OptimalScheduleResponse
Recommended optimal schedule for an agent cadence.
object
Examplegenerated
{ "agent_role": "example", "cadence_type": "example", "confidence": 1, "optimal_day": 1, "optimal_hour": 1, "using_prediction": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}