Skip to main content

Salesforce API

Manage Salesforce CRM data including accounts, contacts, leads, and opportunities.

Base Path​

/salesforce

Endpoints​

Accounts​

GET /salesforce/accounts​

List all accounts.

Request:

curl http://localhost:3007/salesforce/accounts \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant"

POST /salesforce/accounts​

Create an account.

Request:

curl -X POST http://localhost:3007/salesforce/accounts \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"name": "Acme Corporation",
"description": "Technology company",
"industry": "Technology",
"website": "https://acme.com"
}'

GET /salesforce/accounts/:id​

Get account details.

PUT /salesforce/accounts/:id​

Update an account.

Contacts​

GET /salesforce/contacts​

List all contacts.

POST /salesforce/contacts​

Create a contact.

GET /salesforce/contacts/:id​

Get contact details.

PUT /salesforce/contacts/:id​

Update a contact.

Leads​

GET /salesforce/leads​

List all leads.

POST /salesforce/leads​

Create a lead.

GET /salesforce/leads/:id​

Get lead details.

PUT /salesforce/leads/:id​

Update a lead.

Opportunities​

GET /salesforce/opportunities​

List all opportunities.

POST /salesforce/opportunities​

Create an opportunity.

Request:

curl -X POST http://localhost:3007/salesforce/opportunities \
-H "Content-Type: application/json" \
-H "X-API-KEY: your-internal-key" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"title": "Enterprise Deal",
"monetaryAmount": 50000,
"currency": "USD",
"winProbability": 75,
"closeDate": "2024-12-31",
"stage": "Negotiation"
}'

GET /salesforce/opportunities/:id​

Get opportunity details.

PUT /salesforce/opportunities/:id​

Update an opportunity.

Data Models​

Account​

{
"id": "001xx000003DGb2AAG",
"name": "Acme Corporation",
"description": "Technology company",
"industry": "Technology",
"website": "https://acme.com",
"annual_revenue": 1000000,
"number_of_employees": 50
}

Contact​

{
"id": "003xx000004TmiQAAS",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"title": "CEO",
"company_id": "001xx000003DGb2AAG"
}

Opportunity​

{
"id": "006xx000001LhVhEAK",
"title": "Enterprise Deal",
"monetary_amount": 50000,
"currency": "USD",
"win_probability": 75,
"close_date": "2024-12-31",
"stage": "Negotiation",
"status": "open"
}