CRM
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/crm/accountsimport requests
url = "https://win.oneshotagent.com/v1/tools/crm/accounts"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/tools/crm/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/crm/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/crm/accounts"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/crm/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/crm/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyConnections
CRM
Read CRM records, tickets and activity; write to the CRM with approval
POST
/
v1
/
tools
/
crm
/
accounts
CRM
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/crm/accountsimport requests
url = "https://win.oneshotagent.com/v1/tools/crm/accounts"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://win.oneshotagent.com/v1/tools/crm/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/crm/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/crm/accounts"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/crm/accounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/crm/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRead at
Pick
Records carry
Unavailable fields are null; owner/stage identify system values. HubSpot’s associated company: requested, else primary, else lowest id; a ticket’s is its primary company. Activity
Upserts change only supplied fields. A stage outside the deal’s pipeline returns
Answers:
POST /v1/tools/crm/<read> using a connection. Agent tools: oneshot_crm_<read>; writes have none.
| System | Authorization | Reads |
|---|---|---|
| Salesforce | Sign-in | Accounts, contacts, opportunities |
| HubSpot | Sign-in | Accounts, contacts, opportunities, tickets, activity |
| Follow Up Boss | Sign-in | Contacts, opportunities; accounts: unsupported_read |
| Affinity | API key | Accounts, contacts, opportunities |
connection_id from GET /v1/connections by system and account_label. Nothing fetched is stored or logged.
Input
| Field | Meaning |
|---|---|
query | Name contains, case insensitive (tickets: subject). |
updated_since | On or after this YYYY-MM-DD date, UTC. |
limit, cursor | 1 to 100 (default 25); previous next_cursor. |
account_id | Contacts, opportunities: associated account. |
status | Opportunities: open, won, lost, all. Tickets: open, closed, all. |
contact_id, company_id | Tickets: associated contact or company. |
record, since | Activity: { type, id } (account, contact, opportunity, ticket); on or after this date. |
{ "connection_id": "5f4a3b2c-1d0e-4f9a-8b7c-6d5e4f3a2b1c", "query": "Example", "updated_since": "2026-10-01", "limit": 25 }
Output
{ "success": true, "data": { "records": [], "receipt_id": "...", "next_cursor": "..." } }
id, updated_at, source: { system, id }.
| Read | Fields |
|---|---|
| Accounts | name, domain, industry, owner |
| Contacts | name, title, email, phone, account: { id, name } |
| Opportunities | name, account, stage, status, amount, currency, close_date, owner |
| Tickets | subject, status, priority, pipeline_stage, contact: { id, name }, company: { id, name }, created_at |
| Activity | type, occurred_at, subject, summary, direction, owner |
type: email, call, meeting, note, task; summary is at most 500 characters; direction covers emails, and calls when recorded. Filters apply per page; continue while next_cursor is present.
Follow Up Boss and Affinity mappings and limitations.
Errors
Before payment:404 connection_not_found, 400 connection_wrong_system, inactive 409, 503 not_configured; Salesforce tickets or activity 400 unsupported_read; a HubSpot sign-in missing the ticket or email permission 409 connection_scope_missing (Reconnect). Later: 503 rate_limited, 503 system_unavailable, 409 connection_expired, refunded as credit.
Write to the CRM
Writes need approval unless agent policy allows them; approval names the system, record and changed values. SendIdempotency-Key; after approval retry unchanged with X-Approval-Id. Same-key retries never repeat writes.
Write (under /v1/tools/crm) | Fields |
|---|---|
POST /notes (crm_notes_create) | record (account, contact, opportunity); body, 1 to 5,000 characters |
POST /contacts/upsert (crm_contacts_upsert), HubSpot | email (match key), first_name, last_name, title, phone, company_id |
POST /deals/update (crm_deals_update), HubSpot | id; any of stage, amount, close_date |
POST /tasks (crm_tasks_create), HubSpot | record (also ticket), title, body, due_at, owner_id |
400 invalid_stage before approval. Salesforce: notes only. write_outcome_unknown: inspect the CRM before using another key. Only the approval keeps a note or task body. See Pricing.
{ "connection_id": "5f4a3b2c-1d0e-4f9a-8b7c-6d5e4f3a2b1c", "record": { "type": "contact", "id": "101" }, "body": "Customer requested a follow-up." }
{ "success": true, "data": { "id": "501", "created_at": "2026-10-17T12:00:00.000Z", "source": { "system": "hubspot", "id": "501" } } }
id, source; created (upsert), updated_at (deal), created_at (others).