Social Perks Auth API

Authentication and session management

GitHub OpenAPI

Operations 3

POST /agent-auth/token Exchange an OAuth authorization code for an API key #
GET /agent-activity Per-agent activity rollup #
GET /usage Current-month usage vs. plan limits #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/socialperks-app:socialperks-app-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

socialperks-app-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Social Perks Auth API
  version: 1.0.0
  summary: Marketing actions in exchange for perks
  description: Social Perks is a marketing platform where businesses offer perks (discounts, free items, cash back) to customers and influencers in exchange for marketing actions across 25 social platforms (125 actions total). This API exposes pricing, action discovery, campaign management, submission tracking, and the OAuth-style agent key-issuance flow described at https://socialperks.app/AGENTS.md.
  contact:
    name: Social Perks
    url: https://socialperks.app
  license:
    name: Proprietary
servers:
- url: https://socialperks.app/api/v1
  description: Production
tags:
- name: Auth
  description: Authentication and session management
paths:
  /agent-auth/token:
    post:
      tags:
      - Auth
      summary: Exchange an OAuth authorization code for an API key
      description: Step 4 of the agent OAuth flow (see /agent/authorize for steps 1–3). Single-use, 60-second TTL on the code. Response shape mirrors RFC 6749 token responses so off-the-shelf OAuth clients work.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - code
              properties:
                code:
                  type: string
                  description: Authorization code from the /agent/authorize redirect.
                grant_type:
                  type: string
                  enum:
                  - authorization_code
                  description: Optional. If present, must be 'authorization_code'.
      responses:
        '200':
          description: API key minted
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        access_token:
                          type: string
                          example: sp_live_...
                        token_type:
                          type: string
                          const: bearer
                        scope:
                          type: string
                          example: read.campaigns write.campaigns
                        business_id:
                          type: string
                        agent_name:
                          type: string
        '400':
          description: Invalid or expired code
      operationId: postAgentAuthToken
      x-operation-id-source: derived
  /agent-activity:
    get:
      tags:
      - Auth
      summary: Per-agent activity rollup
      description: 'Returns each API key''s activity for the calling business: campaigns created, submissions filed/reviewed, last-used timestamp. Used by /dashboard/agents.'
      security:
      - BearerAuth: []
      - ApiKey: []
      responses:
        '200':
          description: Activity rollup
      operationId: getAgentActivity
      x-operation-id-source: derived
  /usage:
    get:
      tags:
      - Auth
      summary: Current-month usage vs. plan limits
      description: Returns campaigns / submissions / AI-generations usage for the calling business plus the limits for the active plan. Agents should call this before write tools to avoid PLAN_LIMIT_EXCEEDED.
      security:
      - BearerAuth: []
      - ApiKey: []
      responses:
        '200':
          description: Usage snapshot
      operationId: getUsage
      x-operation-id-source: derived
components:
  schemas:
    SuccessEnvelope:
      type: object
      required:
      - success
      - data
      properties:
        success:
          type: boolean
          const: true
        data:
          description: Endpoint-specific payload
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key (sp_live_... or sp_test_...). Recommended for agents.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT issued by /api/v1/auth.