myCRMSIM

myCRMSIM API 1.0

Get Started
​
No token

Create campaign with a new agent

POST

/api/v1/ext/dbr-campaigns/new-agent

A campaign plus a new AI agent written for it. Answers 202 with a job.

Auth: Bearer access_token
Scope: dbr_campaigns.write

Describe the business, the offer and how a conversation should close; a new draft AI agent is written for this campaign. That takes 1–3 minutes, so the answer is 202 with a job_id: poll Get campaign creation job until status is done — it then carries the campaign. close is how the agent finishes: book_appointment (needs calendar_id, from List calendars), send_link (needs booking_url), or collect_enquiry (take the details for your team). Nothing is sent to anyone. The next step is Preview campaign; going live, test messages and launching the list are done on the Campaigns page.

Parameters

NameInTypeRequiredDescription
workspace_id
body
number
yes
A workspace of the installer.
business_description
body
string
yes
What the business does.
offer
body
string
yes
What the campaign offers the old leads.
close
body
enum
yes
How a conversation ends.
calendar_id
body
stringnoFor book_appointment: a calendar id.
calendar_provider
body
stringnoWhere that calendar is: native (default, the Calendar page), google or ghl.
booking_url
body
stringnoFor send_link: the link to send.
business_name
body
stringnoThe business's name.
sender_name
body
stringnoThe name the agent signs as.
agent_name
body
stringnoName of the new agent.
campaign_name
body
stringnoName of the campaign.
tone
body
stringnoe.g. Friendly, Professional.
qualifying_questions
body
stringnoQuestions to ask before closing, one per line.
follow_ups
body
booleannoWrite follow-ups for contacts who do not reply.
offer_end_date
body
stringnoWhen the offer ends.
link_or_coupon
body
stringnoA link or coupon code to mention.
closing_message
body
stringnoWhat to say once the conversation is closed.
list_size_estimate
body
numbernoAbout how many contacts are on the list (sets the pacing).
missed_call_first
body
booleannoRing each contact with a missed call before the opener.
timezone
body
stringnoIANA timezone for the sending hours, e.g. Australia/Sydney.
website_url
body
stringnoThe business's website.
session_id
body
stringnoThe session_id from Research a website.
research_id
body
stringnoThe research_id from Research a website.

Responses

StatusWhen
202
Accepted — poll the job
400
Missing or invalid field
400
Refused by the campaign service, e.g. the workspace is not ready (see Preflight). Its code and message are passed on.
401
Missing or invalid token
403
Missing scope
404
workspace_id does not exist or is not the installer's (same response for both)
502
The campaign service could not be reached
Request
curl -X POST "https://backend.mysmsgateway.app/api/v1/ext/dbr-campaigns/new-agent" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "workspace_id": 7,
  "business_name": "Harbour Dental",
  "business_description": "Family dental clinic in Sydney: check-ups, cleaning and whitening.",
  "offer": "A free check-up for patients we have not seen in a year",
  "close": "book_appointment",
  "calendar_id": "12",
  "tone": "Friendly",
  "list_size_estimate": 400,
  "timezone": "Australia/Sydney"
}'
Responses
Accepted — poll the job
{
  "success": true,
  "message": "Writing the campaign's AI agent. Poll GET /dbr-campaigns/jobs/{job_id} until status is done (usually 1–3 minutes).",
  "data": {
    "job_id": "job_5e2f…",
    "status": "queued"
  }
}
Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Body (JSON)
Request URL
POSThttps://backend.mysmsgateway.app/api/v1/ext/dbr-campaigns/new-agent
Previous

« Research a website

Next

Get campaign creation job »