StakPak Rules API

Rules API

Operations 6

GET /v1/rules List Rule Books #
POST /v1/rules Create or Update Rule Book #
POST /v1/rules/bulk Create Many Rule Books #
GET /v1/rules/search Search Rule Books #
GET /v1/rules/{uri} Get Rule Book by URI #
DELETE /v1/rules/{uri} Delete Rule Book #

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/stakpak-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

stakpak-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stakpak Account Rules API
  description: API for the Stakpak platform
  license:
    name: ''
  version: 1.0.0
servers:
- url: https://apiv2.stakpak.dev
  description: Production server
- url: http://localhost:4000
  description: Local server
tags:
- name: Rules
  description: Rules API
paths:
  /v1/rules:
    get:
      tags:
      - Rules
      summary: List Rule Books
      operationId: list_rule_books_handler
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRuleBooksResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - {}
      - Api Key: []
    post:
      tags:
      - Rules
      summary: Create or Update Rule Book
      operationId: create_rule_book_handler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRuleBookPayload'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRuleBookResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - Api Key: []
  /v1/rules/bulk:
    post:
      tags:
      - Rules
      summary: Create Many Rule Books
      operationId: create_many_rule_books_handler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManyRuleBooksPayload'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateManyRuleBooksResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - Api Key: []
  /v1/rules/search:
    get:
      tags:
      - Rules
      summary: Search Rule Books
      operationId: search_rule_books_handler
      parameters:
      - name: keywords
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchRuleBooksResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - {}
      - Api Key: []
  /v1/rules/{uri}:
    get:
      tags:
      - Rules
      summary: Get Rule Book by URI
      operationId: get_rule_book_handler
      parameters:
      - name: uri
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleBook'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - {}
      - Api Key: []
    delete:
      tags:
      - Rules
      summary: Delete Rule Book
      operationId: delete_rule_book_handler
      parameters:
      - name: uri
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                default: null
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - Api Key: []
components:
  schemas:
    SearchRuleBooksResponse:
      type: object
      required:
      - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/RuleBook'
    ErrorBody:
      type: object
      required:
      - key
      - message
      properties:
        key:
          type: string
        message:
          type: string
    CreateManyRuleBooksResponse:
      type: object
      required:
      - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/CreateRuleBookResponse'
    CreateRuleBookResponse:
      type: object
      required:
      - id
      properties:
        id:
          type: string
    CreateManyRuleBooksPayload:
      type: object
      required:
      - books
      properties:
        books:
          type: array
          items:
            $ref: '#/components/schemas/CreateRuleBookPayload'
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
    RuleBook:
      type: object
      required:
      - id
      - uri
      - description
      - content
      - visibility
      - tags
      properties:
        content:
          type: string
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        description:
          type: string
        id:
          type: string
          format: uuid
        tags:
          type: array
          items:
            type: string
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        uri:
          type: string
        visibility:
          $ref: '#/components/schemas/RuleBookVisibility'
    ListRuleBooksResponse:
      type: object
      required:
      - results
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ListRuleBook'
    CreateRuleBookPayload:
      type: object
      required:
      - uri
      - description
      - content
      properties:
        content:
          type: string
        description:
          type: string
        tags:
          type: array
          items:
            type: string
        uri:
          type: string
        visibility:
          $ref: '#/components/schemas/RuleBookVisibility'
    ListRuleBook:
      type: object
      required:
      - id
      - uri
      - description
      - visibility
      - tags
      properties:
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        description:
          type: string
        id:
          type: string
          format: uuid
        tags:
          type: array
          items:
            type: string
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        uri:
          type: string
        visibility:
          $ref: '#/components/schemas/RuleBookVisibility'
    RuleBookVisibility:
      type: string
      enum:
      - PUBLIC
      - PRIVATE
  securitySchemes:
    Api_Key:
      type: http
      scheme: bearer
      bearerFormat: JWT
    Token:
      type: http
      scheme: bearer
      bearerFormat: JWT
    cookie:
      type: apiKey
      in: cookie
      name: .idToken