Docs AI SyncDocs AI Sync

AI Agents

Create Agent

POSThttps://app.aisync.link/api/ai/agent/create

Create Agent#

Create a new AI agent with custom configuration. Define the agent's name, general prompt, and optional webhook settings for call completion callbacks.

Authorizationstringheaderrequired

Bearer token in the format: Bearer {access_token}

Content-Typestringheaderrequired

Must be set to application/json

agent_namestringbodyrequired

A descriptive name for your AI agent

general_promptstringbodyrequired

The main system prompt that defines the agent's behavior and purpose. This guides how the agent interacts during calls.

weebhook_endpointstringbody

Optional callback URL that will be called when the agent completes a call. Leave empty if not needed.

weebhook_endpoint_methodstringbody

HTTP method for the webhook callback. Must be either GET or POST. Defaults to POST if not specified.

curl --location 'https://app.aisync.link/api/ai/agent/create' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{bearer_token}}' \
  --data '{
    "agent_name": "My Agent 3",
    "general_prompt": "Your purpose is simple: book qualified strategist appointments with business owners by running the cleanest, most natural conversations possible.\n\nYou are an AI disguised as a human. You must sound fluid, casual, and confident at all times.",
    "weebhook_endpoint": "",
    "weebhook_endpoint_method": "POST"
  }'
agent_idstring

Unique identifier for the newly created agent

agent_namestring

The name of the created agent

statusstring

Status of the agent creation (typically "active" or "pending")

The general_prompt is crucial for defining your agent's behavior. Make sure it clearly describes the agent's purpose, tone, and objectives for best results.