Campaigns API
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
string
required
Must be
"campaign_status"array
required
Array of collaborator references (max 500)
string
CPF, any format (
52998224725 or 529.982.247-25). Must contain exactly 11 digits.string
Email — used only when
cpf is absentstring
Filter to a single campaign. Absent = every running campaign.
string
Language for the configurable texts. Absent = the campaign’s default.
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
The same content with the catalog cut. Because the catalog grows per collaborator, the batch limit drops to 100.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 company’s 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 and token 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.
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.403 — FORBIDDEN
403 — FORBIDDEN
API key is valid but lacks the
campaigns:read scope.405 — METHOD_NOT_ALLOWED
405 — METHOD_NOT_ALLOWED
Only
POST is accepted.429 — RATE_LIMITED
429 — RATE_LIMITED
Too many requests this hour. Wait
retry_after seconds.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

