Skip to main content
POST
/
agents
Create an AI agent
curl --request POST \
  --url https://app.autoposting.ai/api-proxy/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Daily LinkedIn Poster",
  "brandSlug": "acme-corp",
  "platforms": [
    "linkedin"
  ],
  "schedule": "0 9 * * 1-5",
  "knowledgeBaseId": "kb_01HXYZ",
  "postsPerRun": 1,
  "tone": "professional"
}
'
{
  "success": true,
  "data": {
    "id": "agent_01HXYZ",
    "name": "Daily LinkedIn Poster",
    "brandSlug": "acme-corp",
    "platforms": [
      "linkedin"
    ],
    "schedule": "0 9 * * 1-5",
    "enabled": true,
    "autoPublish": false,
    "createdAt": "2024-01-01T00:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Display name for the agent.

brandSlug
string
required

Brand the agent posts on behalf of.

platforms
enum<string>[]
required

Target platforms.

Available options:
x,
linkedin,
instagram,
threads,
youtube
schedule
string

Cron expression defining when the agent runs (UTC). Example: "0 9 * * 1-5" runs at 9 AM UTC Monday-Friday.

knowledgeBaseId
string

ID of the knowledge base the agent draws content ideas from.

postsPerRun
integer
default:1

Number of posts to generate per run.

tone
enum<string>

Writing tone.

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

Custom instructions for the agent (e.g., "Always end with a question to boost engagement").

autoPublish
boolean
default:false

If true, the agent publishes posts immediately. If false, posts are saved as drafts for review.

Response

Agent created.

success
boolean
data
object

An AI agent that autonomously generates and schedules content.