Skip to main content
POST
/
v2
/
_new_assistants
Create Email AI Agent
curl --request POST \
  --url https://prod-contactswing-fastapi-962560522883.us-central1.run.app/v2/_new_assistants \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "<string>",
  "model": "<string>",
  "instructions": "<string>",
  "prompts": {
    "agent": "<string>",
    "goal": "<string>"
  },
  "kb_id": "<string>",
  "gen_ai_response": "<string>",
  "email_setup": "<string>",
  "labels": "<string>",
  "action_ids": [
    "<string>"
  ]
}
'
{
  "ctx_id": "<string>",
  "data": {
    "assistant_id": "<string>",
    "name": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.contactswing.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Assistant display name. Example: "My Email Agent"
type
string
required
Assistant type: "EMAIL"
model
string
required
LLM model: "cw-llm-1"
instructions
string
required
Detailed recruiter instructions and candidate profiles
prompts
object
Agent prompts with agent and goal
agent
string
goal
string
kb_id
string
Knowledge base ID

Email-Specific Settings

gen_ai_response
string
Response mode: "SEMI_TOUCH"
email_setup
string
Email role: "Responder"
labels
string
Email labels/categories
action_ids
string[]
Linked action IDs []

Response

201 Created - Email assistant created successfully
ctx_id
string
Request context ID
data
object
assistant_id
string
New assistant ID
name
string
Assistant name
400 Bad Request - Invalid email configuration 401 Unauthorized - Invalid token