How to hit the Salesforce API

Salesforce's REST API lives on your org's My Domain at https://<domain>.my.salesforce.com/services/data/v67.0 (Summer '26). GET /services/data/ lists the versions your org supports.

Authentication

Get an access token with OAuth — for quick testing, sf org display from the Salesforce CLI prints one. Send it as Authorization: Bearer <token>. In the examples it's written {{SF_ACCESS_TOKEN}}; {{SF_DOMAIN}} is your My Domain host.

Full reference: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/

Run a SOQL query

curl "https://{{SF_DOMAIN}}/services/data/v67.0/query?q=SELECT+Id,Name+FROM+Account+LIMIT+5" \
  -H "Authorization: Bearer {{SF_ACCESS_TOKEN}}"
Run in PostTaco

Get a record

curl https://{{SF_DOMAIN}}/services/data/v67.0/sobjects/Account/{{RECORD_ID}} \
  -H "Authorization: Bearer {{SF_ACCESS_TOKEN}}"
Run in PostTaco

Org limits

API calls remaining, storage, and more.

curl https://{{SF_DOMAIN}}/services/data/v67.0/limits \
  -H "Authorization: Bearer {{SF_ACCESS_TOKEN}}"
Run in PostTaco