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.How It Works
- You get an API Key with the
missions:readscope (Admin > Integrations > API Keys) - Your backend asks for the mission state of one or many collaborators (by CPF or email)
- SalesOS answers with today’s missions per collaborator — progress counters, the full list, and the next active mission
Missions are advanced by activity inside SalesOS: the engine listens to events (a visit scheduled, a sale closed) and increments the matching mission. This API is for reading that state — pair it with a deep link into the SalesOS module for the action itself.
Authentication
All requests require an API Key in theAuthorization header:
Environments
- Production
- Staging
Base URL:
https://api.play2sell.comEndpoint Reference
action field: missions_status and missions_summary.
Each collaborator is identified by CPF (any format — digits are normalized) or email. When both are sent, CPF wins.
Action: missions_status
The missions whose period window contains today, per collaborator. “Today” is computed in your company’s timezone (returned astimezone / reference_date in the response) — never UTC.
Request Schema
Return the full
missions[] array. Off by default: missions fan out per collaborator, so a large batch with the list on becomes a multi-megabyte response. progress and next_mission always come back.Example
Response fields explained
Empty fields are left out, not sent as
null. Test for the field’s presence, not for null.Rewards are paid in installments, so “earned” and “still to win” are different numbers. A mission worth 100 points with a target of 5 credits 20 on every step. After one step the collaborator has earned 20 and still has 80 to win —
points_earned counts the 20, points_available counts the 80. Adding the full 100 to both would count the same points twice.Action: missions_summary
Everythingmissions_status returns, plus week/month completion counters. Useful for a “your month so far” strip.
Missions are counted in the period they belong to (their own window), not the date they were approved — so a mission approved late still counts in the week it was earned. Weeks start on Monday and months on day 1, in the company timezone.
Example
missions_summary scans a month of mission rows per collaborator, so its batch limit is 100 instead of 500.all_time carries the same since the beginning, under the same rule as week and month: completed and rewarded missions only, deleted ones excluded.
Self mode (SSO user token)
When your app already holds the token of a user who signed in through SSO, send it asAuthorization: Bearer <jwt> and omit collaborators. The answer covers only the token’s own user.
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
All errors follow the shared structure:400 — VALIDATION_ERROR
400 — VALIDATION_ERROR
Invalid body, batch over the limit, CPF without 11 digits, or an item with neither
cpf nor email. The details array points to the item index.400 — SELF_MODE_NO_COLLABORATORS
400 — SELF_MODE_NO_COLLABORATORS
A
collaborators list was sent with a user token. Omit it, or use a partner API key.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
missions:read scope: { "error": "…", "code": "scope_insufficient", "missing_scopes": ["missions: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, advances or provisions missions
- Each key is scoped to a single company — a CPF from another company answers
found: false - Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs
Next Steps
Check-in API
Read duty presence to complete the same home screen
Authentication
Learn how to create and manage API Keys

