Skip to main content
PATCH
/
agents
/
{agentId}
Update an agent
curl --request PATCH \
  --url https://app.autoposting.ai/api-proxy/agents/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "schedule": "<string>",
  "platforms": [],
  "instructions": "<string>",
  "autoPublish": true,
  "postsPerRun": 123
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "brandSlug": "<string>",
    "platforms": [],
    "schedule": "<string>",
    "enabled": true,
    "autoPublish": true,
    "instructions": "<string>",
    "knowledgeBaseId": "<string>",
    "postsPerRun": 123,
    "lastRunAt": "2023-11-07T05:31:56Z",
    "nextRunAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key as Authorization: Bearer sk-social-...

Path Parameters

agentId
string
required

Agent ID.

Body

application/json
name
string

Updated name.

schedule
string

Updated cron schedule.

platforms
enum<string>[]

Updated target platforms.

Available options:
x,
linkedin,
instagram,
threads,
youtube
tone
enum<string>

Updated tone.

Available options:
professional,
casual,
educational,
inspirational,
humorous
instructions
string

Updated instructions.

autoPublish
boolean

Updated auto-publish setting.

postsPerRun
integer

Updated posts per run count.

Response

The updated agent.

success
boolean
data
object

An AI agent that autonomously generates and schedules content.