Skip to main content

API Overview

The SalesOS API is a RESTful API that lets you programmatically interact with your SalesOS workspace. Use it to create integrations, sync data with external systems, or build custom applications on top of SalesOS.

Base URL

All API requests are made to:
https://api.play2sell.com/v1
For staging and development environments, use the corresponding base URLs. Contact your administrator for environment-specific URLs.

Authentication

All API requests require a valid JWT bearer token. Include it in the Authorization header:
curl -X GET https://api.play2sell.com/v1/leads \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"
See the Authentication guide for details on obtaining tokens.

Request Format

  • All request bodies must be JSON with Content-Type: application/json
  • Query parameters are used for filtering, sorting, and pagination
  • URL paths use lowercase and hyphens (e.g., /custom-fields)

Response Format

All responses return JSON. Successful responses follow this structure:
{
  "data": { ... },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-03-15T10:30:00Z"
  }
}
List endpoints return paginated results:
{
  "data": [ ... ],
  "meta": {
    "total": 150,
    "page": 1,
    "per_page": 25,
    "total_pages": 6,
    "request_id": "req_abc123",
    "timestamp": "2026-03-15T10:30:00Z"
  }
}

Error Responses

Errors return an appropriate HTTP status code and a JSON body:
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The 'email' field is required.",
    "details": [
      {
        "field": "email",
        "message": "This field is required"
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-03-15T10:30:00Z"
  }
}

HTTP Status Codes

Status CodeMeaning
200 OKRequest succeeded
201 CreatedResource created successfully
204 No ContentRequest succeeded with no response body (e.g., DELETE)
400 Bad RequestInvalid request body or parameters
401 UnauthorizedMissing or invalid authentication token
403 ForbiddenAuthenticated but lacking permission for this action
404 Not FoundResource does not exist
409 ConflictResource conflict (e.g., duplicate email)
422 Unprocessable EntityValidation error in the request body
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer-side error

Rate Limits

API requests are rate-limited based on your plan:
PlanRate Limit
Starter100 requests/minute
Professional500 requests/minute
Enterprise2,000 requests/minute
Rate limit headers are included in every response:
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 498
X-RateLimit-Reset: 1710500460
When you exceed the rate limit, the API returns a 429 status code with a Retry-After header indicating when you can make requests again.

Pagination

List endpoints support pagination via query parameters:
ParameterDefaultDescription
page1Page number (starts at 1)
per_page25Items per page (max 100)
Example:
GET /v1/leads?page=2&per_page=50

Filtering

Most list endpoints support filtering via query parameters:
GET /v1/leads?status=qualified&source=website&created_after=2026-01-01
Common filter parameters:
ParameterTypeDescription
created_afterISO dateRecords created after this date
created_beforeISO dateRecords created before this date
updated_afterISO dateRecords updated after this date
owner_idUUIDFilter by assigned user
team_idUUIDFilter by team

Sorting

Use the sort parameter to order results:
GET /v1/deals?sort=-value  # Descending by value
GET /v1/leads?sort=created_at  # Ascending by creation date
Prefix with - for descending order.

Versioning

The API is versioned via the URL path (/v1/). Breaking changes will result in a new version. Non-breaking additions (new fields, new endpoints) may be added to the current version.
Always specify the full versioned URL in your integrations. This ensures your code continues to work even when new API versions are released.

SDKs and Tools

  • cURL — Examples throughout this documentation use cURL
  • Postman — Import our Postman collection for quick testing
  • JavaScript/TypeScript — Use any HTTP client (fetch, axios)
  • Python — Use requests or httpx

Next Steps