Pause an automation
beta.agents.automations.pause(automation_id) -> Automation
POST
/agents/automations/{automation_id}/pausePauses future scheduled delivery without stopping an active session.
Pause an automation
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
automation = openai.beta.agents.automations.pause("automation_id")
puts(automation)200 — Example
{
"id": "id",
"created_at": 0,
"created_by": {
"type": "developer"
},
"expression": "expression",
"metadata": {
"foo": "string"
},
"name": "name",
"object": "agent.automation",
"status": "active",
"target": {
"agent": {
"instructions": "instructions",
"model": "model",
"multi_agent": {
"enabled": true,
"max_concurrent_subagents": 1
},
"reasoning": {
"effort": "none",
"summary": "concise"
},
"service_tier": "auto",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"tools": [
{
"defer_loading": true,
"description": "description",
"name": "name",
"parameters": {
"foo": "bar"
},
"type": "function",
"async": true
}
],
"compaction": {
"async": true
},
"experimental": {
"time_awareness": true
}
},
"agent_id": "agent_id",
"environment": {
"type": "none"
},
"input": [
{
"content": [
{
"text": "text",
"type": "input_text"
}
],
"role": "user",
"type": "message"
}
],
"metadata": {
"foo": "string"
},
"type": "new_session",
"vault_ids": [
"string"
]
},
"timezone": "timezone",
"type": "periodic",
"pause_reason": "target_session_failed"
}Returns Examples
200 — Example
{
"id": "id",
"created_at": 0,
"created_by": {
"type": "developer"
},
"expression": "expression",
"metadata": {
"foo": "string"
},
"name": "name",
"object": "agent.automation",
"status": "active",
"target": {
"agent": {
"instructions": "instructions",
"model": "model",
"multi_agent": {
"enabled": true,
"max_concurrent_subagents": 1
},
"reasoning": {
"effort": "none",
"summary": "concise"
},
"service_tier": "auto",
"text": {
"format": {
"type": "text"
},
"verbosity": "low"
},
"tools": [
{
"defer_loading": true,
"description": "description",
"name": "name",
"parameters": {
"foo": "bar"
},
"type": "function",
"async": true
}
],
"compaction": {
"async": true
},
"experimental": {
"time_awareness": true
}
},
"agent_id": "agent_id",
"environment": {
"type": "none"
},
"input": [
{
"content": [
{
"text": "text",
"type": "input_text"
}
],
"role": "user",
"type": "message"
}
],
"metadata": {
"foo": "string"
},
"type": "new_session",
"vault_ids": [
"string"
]
},
"timezone": "timezone",
"type": "periodic",
"pause_reason": "target_session_failed"
}