Agent Schedules
List schedules for an agent
GET
/
api
/
v1
/
agents
/
{agent_id}
/
schedules
Typescript (SDK)
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agentSchedules.listAgentSchedules({
agentId: "<id>",
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.AgentSchedules.ListAgentSchedules(ctx, "<id>", mka1.Pointer[int64](20), operations.ListAgentSchedulesOrderDesc.ToPointer(), nil)
if err != nil {
log.Fatal(err)
}
if res.AgentScheduleList != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.AgentSchedules.ListAgentSchedulesAsync(
agentId: "<id>",
limit: 20,
order: ListAgentSchedulesOrder.Desc
);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_schedules.list_agent_schedules(agent_id="<id>", limit=20, order="desc")
# Handle response
print(res)curl --request GET \
--url https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "agent.schedule",
"id": "<string>",
"agent_id": "<string>",
"name": "<string>",
"status": "active",
"schedule": {
"type": "once",
"run_at": "2023-11-07T05:31:56Z",
"timezone": "UTC"
},
"input": "<unknown>",
"conversation": "<unknown>",
"previous_response_id": "<string>",
"context_management": [
{
"type": "compaction",
"compact_threshold": 1001
}
],
"metadata": {},
"temporal_schedule_id": "<string>",
"last_run_at": "2023-11-07T05:31:56Z",
"last_run_id": "<string>",
"run_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.
Headers
Optional external end-user identifier forwarded by the API gateway.
Path Parameters
Query Parameters
Required range:
1 <= x <= 100Available options:
asc, desc Was this page helpful?
⌘I
Typescript (SDK)
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.agentSchedules.listAgentSchedules({
agentId: "<id>",
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.AgentSchedules.ListAgentSchedules(ctx, "<id>", mka1.Pointer[int64](20), operations.ListAgentSchedulesOrderDesc.ToPointer(), nil)
if err != nil {
log.Fatal(err)
}
if res.AgentScheduleList != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.AgentSchedules.ListAgentSchedulesAsync(
agentId: "<id>",
limit: 20,
order: ListAgentSchedulesOrder.Desc
);
// handle responsefrom meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.agent_schedules.list_agent_schedules(agent_id="<id>", limit=20, order="desc")
# Handle response
print(res)curl --request GET \
--url https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/agents/{agent_id}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "agent.schedule",
"id": "<string>",
"agent_id": "<string>",
"name": "<string>",
"status": "active",
"schedule": {
"type": "once",
"run_at": "2023-11-07T05:31:56Z",
"timezone": "UTC"
},
"input": "<unknown>",
"conversation": "<unknown>",
"previous_response_id": "<string>",
"context_management": [
{
"type": "compaction",
"compact_threshold": 1001
}
],
"metadata": {},
"temporal_schedule_id": "<string>",
"last_run_at": "2023-11-07T05:31:56Z",
"last_run_id": "<string>",
"run_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>"
}
}