Pular para o conteúdo principal
POST
/
api
/
v1
/
agents
/
{agent_id}
/
schedules
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.agent_schedules.create_agent_schedule(agent_id="<id>", schedule={
        "type": "interval",
        "interval_seconds": 581769,
        "timezone": "UTC",
    }, input=[])

    # Handle response
    print(res)
{
  "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": "<string>",
  "conversation": "<string>",
  "previous_response_id": "<string>",
  "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"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

Autorizações

Authorization
string
header
obrigatório

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Cabeçalhos

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Parâmetros de caminho

agent_id
string
obrigatório

Corpo

application/json
schedule
object
obrigatório
input
obrigatório
Required string length: 1 - 20000
name
string
Required string length: 1 - 120
conversation
previous_response_id
string
metadata
object

Resposta

Agenda criada.

object
enum<string>
obrigatório
Opções disponíveis:
agent.schedule
id
string
obrigatório
agent_id
string
obrigatório
name
string | null
obrigatório
status
enum<string>
obrigatório
Opções disponíveis:
active,
paused,
completed,
deleted
schedule
object
obrigatório
input
obrigatório
conversation
obrigatório
previous_response_id
string | null
obrigatório
metadata
object
obrigatório
temporal_schedule_id
string | null
obrigatório
last_run_at
string<date-time> | null
obrigatório
last_run_id
string | null
obrigatório
run_count
integer
obrigatório
created_at
string<date-time>
obrigatório
updated_at
string<date-time>
obrigatório
deleted_at
string<date-time> | null
obrigatório