Examples below show the wire-format
Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE header. To compute the signature in your code, use the signedRequest helper in Authentication.A campaign is configured by your company: name, catalog, prices in points, categories, level rules and even the currency name. This API returns whatever is configured — it knows no specific campaign.
How It Works
- You get an API Key with the
campaigns:readscope (Admin > Integrations > API Keys) - Your backend asks for the state of one or many collaborators (by CPF or email)
- SalesOS answers with the running campaigns — campaign data once, then each collaborator’s state
Campaign metadata comes back once at the top, not repeated per person. On a 500-collaborator batch that is the difference between a lean response and a multi-megabyte one.
Authentication
Environments
- Production
- Staging
Base URL:
https://api.play2sell.comEndpoint Reference
action field: campaign_status and campaign_catalog.
Each collaborator is identified by CPF (any format — digits are normalized) or email. When both are sent, CPF wins.
Action: campaign_status
Your company’s running campaigns and each collaborator’s state in them.Request Schema
Language of the currency name (
currency.label), when your company configured it per language. Absent = the campaign’s default language. name and tagline come as configured.Example
Campaign fields
The currency name is resolved in this order: the label configured on the campaign, then the currency registered for your company (with singular form and icon), then
pontos. It is the same name the campaign page shows.Collaborator fields
Action: campaign_catalog
Returns the same content ascampaign_status — the campaign fields, with the catalog summary, and each collaborator’s balance and eligibility — with a batch limit of 100. The rewards themselves are browsed on the campaign page (see Opening the campaign page).
Opening the campaign page
Every campaign comes with anaccess block: where its page lives in the SalesOS app and how to get the user there. The page is where the user browses the catalog and redeems rewards, and it requires a signed-in user. There are two ways in:
Read
access.url and access.login_url from the response — do not hardcode them. The URL changes per environment (production and staging have different apps).Signing in again through your identity provider
The full guide to this sign-in (both ways, what to send and the refusals) is in SSO (Single Sign-On). When your company signs users in with its own identity provider (OAuth 2.0 / OpenID Connect) and Play2sell connects that provider to SalesOS, the response includesaccess.login_url. Use it as the default link to the campaign page. It covers the case where the user has to sign in again:
Read
access.login_url from the response — do not build the URL in your code. It changes per environment and is only filled in when the link to your provider is active in that environment. With null, use one of the other ways in.To turn it on: your company registers Play2sell as an OAuth 2.0 client in your provider, one client per environment, with the callback address we send (
https://auth.play2sell.com/login/callback in production). We need the authorization, token and userinfo endpoints, the client ID and secret (over a secure channel) and each user’s stable identifier: your provider’s internal id, the CPF or CNPJ, or the email. With CPF or CNPJ, the user stays the same person in SalesOS even after changing email.Self mode (SSO user token)
With the token of a user who signed in through SSO, sendAuthorization: Bearer <jwt> and omit collaborators. The answer covers only the token’s own user.
If the user belongs to more than one company, send X-Tenant-Id with the company’s ID; without it, the token’s default company is used. Other self-mode errors: 400 SELF_MODE_USER_ONLY (the token is not a user’s) and 400 TENANT_REQUIRED (the account is not linked to any company).
Error Handling
400 — VALIDATION_ERROR
400 — VALIDATION_ERROR
Invalid body, batch over the limit, CPF without 11 digits, an item with neither
cpf nor email, or a malformed campaign_slug. The details array points to the item index.400 — SELF_MODE_NO_COLLABORATORS
400 — SELF_MODE_NO_COLLABORATORS
A
collaborators list was sent together with a user token.401 — authentication
401 — authentication
API key missing, unknown, revoked or expired, a timestamp outside the 30-second window (any second in the future included), or a signature that does not match. The body is
{ "error": "<message>", "code": "<code>" }, with code such as header_missing, api_key_not_found, key_revoked, key_expired, timestamp_too_old, timestamp_in_future or signature_invalid. In self mode, an invalid or expired user token answers { "error": { "code": "UNAUTHORIZED", … } }.403 — scope_insufficient
403 — scope_insufficient
The key is valid but lacks the
campaigns:read scope: { "error": "…", "code": "scope_insufficient", "missing_scopes": ["campaigns:read"] }. In self mode, FORBIDDEN means the account has no access to the company sent in X-Tenant-Id.405 — METHOD_NOT_ALLOWED
405 — METHOD_NOT_ALLOWED
Only
POST is accepted.429 — rate_limited
429 — rate_limited
The key reached its hourly limit:
{ "error": "…", "code": "rate_limited" }. Wait the seconds in the Retry-After header, then retry.500 — SERVER_ERROR
500 — SERVER_ERROR
Internal server error. Retry with exponential backoff (2s, 4s, 8s).
Rate Limits
Security
- Read-only: this API never creates redemptions, accepts terms, or changes balances
- Each key is scoped to a single company — a CPF from another company answers
found: false, and other companies’ campaigns never appear - Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs
Next Steps
Missions API
The progress that generates the points spent here
Authentication
How to create and manage API Keys

