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 and add notes 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_bodyThree read-only tools use a connection to Salesforce or HubSpot:
Missing fields are null. Owner/stage are system identifiers. Status follows closed/won flags. HubSpot accounts/opportunities are companies/deals. Associated company: requested, otherwise primary, otherwise lexically lowest id.
HubSpot filters each page by name. Empty pages can have
POST /v1/tools/crm/accounts(crm_accounts)POST /v1/tools/crm/contacts(crm_contacts)POST /v1/tools/crm/opportunities(crm_opportunities)
connection_id from GET /v1/connections, by system and account_label.
Reads use connected_systems grants and payment headers. Nothing fetched is stored or logged; receipts contain identifiers and record counts only.
Input
| Field | Meaning |
|---|---|
connection_id | Required connection UUID. |
query | Case insensitive literal name contains. |
updated_since | Updated on or after this ISO calendar date, YYYY-MM-DD, at midnight UTC. |
limit | Integer from 1 to 100, default 25. |
cursor | Previous next_cursor; keep the connection and filters unchanged. |
account_id | Contacts and opportunities only: associated account id. |
status | Opportunities only: open, won, lost or all (default). |
{
"connection_id": "5f4a3b2c-1d0e-4f9a-8b7c-6d5e4f3a2b1c",
"query": "Example",
"updated_since": "2026-10-01",
"limit": 25
}
Output
Each record carriessource: { system, id }. No next_cursor means finished.
{ "success": true, "data": { "records": [], "receipt_id": "...", "next_cursor": "..." } }
| Read | Record fields |
|---|---|
| Accounts | id, name, domain, industry, owner, updated_at, source |
| Contacts | id, name, title, email, phone, account: { id, name }, updated_at, source |
| Opportunities | id, name, account: { id, name }, stage, status, amount, currency, close_date, owner, updated_at, source |
next_cursor; continue. Beyond 10,000 records, narrow updated_since or account_id.
Errors
Refusals precede payment: another agent’s connection returns404 connection_not_found; wrong system, 400 connection_wrong_system; inactive connections, 409; unavailable systems, 503 not_configured. Cursor/limit refusals: 400 unsupported_for_system or not_supported. Busy/failed reads: 503 rate_limited or system_unavailable; expired sign-in: 409 connection_expired. Failed paid reads return account credit.
Write a note
POST /v1/tools/crm/notes (crm_notes_create) needs approval unless an enabled agent policy allows it. Send payment headers and Idempotency-Key. After approval, retry unchanged with X-Approval-Id. Same-key retries return the original note without writing again.
body is plain text, 1 to 5,000 characters.
connection_scope_missing means use console Reconnect to grant writing permission. write_outcome_unknown means inspect the CRM before using another key.
created_at is the UTC dispatch time. Only the approval record retains the note body. See Pricing.
{
"connection_id": "5f4a3b2c-1d0e-4f9a-8b7c-6d5e4f3a2b1c",
"record": { "type": "contact", "id": "101" },
"body": "Customer requested a follow-up."
}
record.type: account, contact or opportunity.
{ "success": true, "data": { "id": "501", "created_at": "2026-10-17T12:00:00.000Z", "source": { "system": "hubspot", "id": "501" } } }