logo
AgentsGenerate AI reply
Agents

Generate AI reply

Uses the agent's persona, knowledge base, and the full conversation thread to generate a ready-to-send reply via Claude. Costs 3 credits per call.

The agent's role, tone, communication style, company description, and custom instructions are combined with the lead's context and conversation history to produce a natural reply optimized for cold email sales psychology.

curl -X POST "https://api.sendkit.ai/v1/agents/example_string/generate-reply" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "conversationId": "664a1b2c3d4e5f6a7b8c9d20"
}'
{
  "success": true,
  "data": {
    "response": "Hey Jane - saw Example Corp just opened a second office in Austin. When companies scale that fast, outbound usually becomes a bottleneck.

We helped Acme's SDR team 3x their pipeline in 6 weeks without adding headcount.

Worth a 15-min call to see if it fits?

John
AE at SendKit",
    "agentUsed": {
      "id": "664a1b2c3d4e5f6a7b8c9d0e",
      "name": "Sales Agent"
    },
    "debug": {
      "model": "claude-sonnet-4-5-20250929",
      "inputTokens": 1250,
      "outputTokens": 89,
      "cost": "$0.001710",
      "creditsCharged": 3
    }
  }
}
POST
/v1/agents/{id}/generate-reply
POST
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: application/json
conversationIdstring
Required

ID of the inbox conversation to generate a reply for

contextstring

Additional context or instructions for the reply (e.g. "They asked about pricing — mention the 30-day trial")

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Path Parameters

idstring
Required

Resource ID

Body

application/json
conversationIdstring
Required

ID of the inbox conversation to generate a reply for

contextstring

Additional context or instructions for the reply (e.g. "They asked about pricing — mention the 30-day trial")

Responses

successboolean
dataobject