Skip to content
Back to skills

Salesforce Api Rest

ASecurity

Implements interactions with the Salesforce API using REST protocols to manage customer relationship data effectively.

  • 4 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 12, 2026
businesspythonapiperformancedocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned June 12, 2026

npx -y skills add paulpas/agent-skill-router --skill salesforce-api-rest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Salesforce Api Rest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Salesforce Api Rest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/paulpas-salesforce-api-rest/badge)](https://www.skillsdirectory.com/skills/paulpas-salesforce-api-rest)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---




name: salesforce-api-rest
description: Implements interactions with the Salesforce API using REST protocols to manage customer relationship data effectively.
license: MIT
compatibility: opencode
metadata:
  version: "1.0.0"
  domain: coding
  triggers: salesforce api, rest api, customer relationship management, crm, salesforce data access, how do I access salesforce data
  role: implementation
  scope: implementation
  output-format: code
  related-skills: salesforce-api-soap, salesforce-api-bulk
  archetypes:
  - tactical
  - operational
  anti_triggers:
  - generic skill dominance
  response_profile:
    verbosity: low
    directive_strength: high
    abstraction_level: tactical




---





# Salesforce API - REST Integration

Implements RESTful interactions with the Salesforce API to manage and automate customer relationship data effectively.

## When to Use
- To retrieve and manipulate Salesforce records programmatically.
- When implementing integrations with third-party applications.
- For automated reporting and data synchronization with CRM systems.
- When interacting with Salesforce data in bulk for performance optimization.

## Core Workflow
1. **Authenticate with Salesforce** — Use OAuth 2.0 to obtain access and refresh tokens for API access.
   **Checkpoint:** Ensure tokens are securely stored and refreshed.
2. **Make API Calls** — Structure HTTP requests to Salesforce endpoints for data retrieval or record updates.
   **Checkpoint:** Confirm correct HTTP methods (GET, POST, PATCH, DELETE) are used based on action.
3. **Handle Responses** — Parse JSON responses from Salesforce and handle errors appropriately.
   **Checkpoint:** Validate response structure against expectations and log error messages for failed requests.

## Implementation Patterns
### Pattern 1: Authenticating with Salesforce
```python
import requests

def authenticate(client_id, client_secret, username, password):
    url = "https://login.salesforce.com/services/oauth2/token"
    payload = {"grant_type": "password",
               "client_id": client_id,
               "client_secret": client_secret,
               "username": username,
               "password": password}
    response = requests.post(url, data=payload)
    response.raise_for_status()  # Raise error for bad requests
    return response.json()  # Return access token and instance URL
```

### Pattern 2: Retrieving Salesforce Records
```python

def get_records(object_name, access_token, instance_url):
    url = f"{instance_url}/services/data/vXX.0/sobjects/{object_name}/"
    headers = {"Authorization": f"Bearer {access_token}"}
    response = requests.get(url, headers=headers)
    response.raise_for_status()
    return response.json()
```

## Constraints
### MUST DO
- Always use OAuth 2.0 authentication for API access.
- Log all API requests and responses for auditing purposes.
### MUST NOT DO
- Store sensitive credentials directly in the codebase.
- Exceed Salesforce API limits, which could lead to temporary lockouts.

---

## Live References

> Authoritative documentation links for this skill's domain. The model follows markdown links at load time to resolve external references and inline content.

- [Salesforce REST API Documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/)
- [REST API Quick Start Guide](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm)
- [REST API Resource Reference](https://developer.salesforce.com/docs/atlas.en-us.api_rest/meta/api_rest/resources_list.htm)
- [Salesforce OAuth 2.0 Authentication](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/auth_used_for_interacting_with_other_systems.htm)
- [REST API Bulk Operations Best Practices](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_bulk_insert_delete_query.htm)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.