{
  "openapi": "3.1.0",
  "info": {
    "title": "Product Rally for agents",
    "version": "1.0.0",
    "description": "Search the Product Rally board of design and maker tools, read any product and pitch one for the board. Reading is open and anonymous. Denis reads every pitch and answers by email, which is how a maker with a throwaway address still gets read and spam stays off the board. A pitch queues for review and leaves votes, membership and ranking alone. Bulk sending gets the sender blocked.",
    "contact": {
      "url": "https://productrally.com/agents"
    },
    "license": {
      "name": "Public data, attribution appreciated"
    }
  },
  "servers": [
    {
      "url": "https://productrally.com"
    }
  ],
  "paths": {
    "/api/agent/products": {
      "get": {
        "operationId": "search_products",
        "summary": "Search Product Rally",
        "description": "Search the products on Product Rally by words, category or pricing. Returns ranked matches with their vote counts and pages. An empty query returns the newest hunts.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Words to match against name, domain, tagline and the hunter's note.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Category slug, e.g. dev-tools.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pricing",
            "in": "query",
            "required": false,
            "description": "One of free, freemium, paid, onetime.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 to 50, default 10.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "202": {
            "description": "Pitch accepted and queued for review"
          },
          "400": {
            "description": "The payload needs fixing"
          },
          "404": {
            "description": "Unknown slug or id"
          },
          "409": {
            "description": "Already on the board or already queued"
          },
          "429": {
            "description": "A limit was hit. Stop there and skip the retry loop"
          }
        }
      }
    },
    "/api/agent/products/{slug}": {
      "get": {
        "operationId": "get_product",
        "summary": "Read one product",
        "description": "Read one published product by its slug: the tagline, the hunter's note, the category, tags, pricing, votes and its weekly place.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The slug from a product page URL, e.g. linear.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "202": {
            "description": "Pitch accepted and queued for review"
          },
          "400": {
            "description": "The payload needs fixing"
          },
          "404": {
            "description": "Unknown slug or id"
          },
          "409": {
            "description": "Already on the board or already queued"
          },
          "429": {
            "description": "A limit was hit. Stop there and skip the retry loop"
          }
        }
      }
    },
    "/api/agent/categories": {
      "get": {
        "operationId": "list_categories",
        "summary": "List categories",
        "description": "List every category with how many products it holds. Use a slug from here as the category filter in search_products.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success"
          },
          "202": {
            "description": "Pitch accepted and queued for review"
          },
          "400": {
            "description": "The payload needs fixing"
          },
          "404": {
            "description": "Unknown slug or id"
          },
          "409": {
            "description": "Already on the board or already queued"
          },
          "429": {
            "description": "A limit was hit. Stop there and skip the retry loop"
          }
        }
      }
    },
    "/api/agent/submit": {
      "post": {
        "operationId": "submit_product",
        "summary": "Pitch a product for review",
        "description": "Pitch one product for the Product Rally board. Send it once, for a product the person you work for built or uses and can vouch for. The reply comes by email. A pitch writes one row in the review queue and leaves votes, membership and ranking alone. Bulk sending gets the sender blocked.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success"
          },
          "202": {
            "description": "Pitch accepted and queued for review"
          },
          "400": {
            "description": "The payload needs fixing"
          },
          "404": {
            "description": "Unknown slug or id"
          },
          "409": {
            "description": "Already on the board or already queued"
          },
          "429": {
            "description": "A limit was hit. Stop there and skip the retry loop"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The product's own https URL."
                  },
                  "email": {
                    "type": "string",
                    "description": "A real address the reviewer can reply to. An address at the product's own domain is read first."
                  },
                  "name": {
                    "type": "string",
                    "description": "The product name. Defaults to the domain."
                  },
                  "tagline": {
                    "type": "string",
                    "description": "One line, up to 140 characters, saying what it does."
                  },
                  "pitch": {
                    "type": "string",
                    "description": "Up to 600 characters on why it belongs here and who it is for. Written by a person, in their words."
                  },
                  "submitterName": {
                    "type": "string",
                    "description": "Who is pitching."
                  },
                  "agent": {
                    "type": "string",
                    "description": "The agent doing the sending, e.g. claude-code. Declared by the sender and taken at its word."
                  }
                },
                "required": [
                  "url",
                  "email"
                ]
              }
            }
          }
        }
      }
    },
    "/api/agent/status/{id}": {
      "get": {
        "operationId": "check_submission",
        "summary": "Check a pitch",
        "description": "Check what happened to a pitch, using the id that submit_product returned. Statuses are pending, approved and rejected.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The id returned by submit_product.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "202": {
            "description": "Pitch accepted and queued for review"
          },
          "400": {
            "description": "The payload needs fixing"
          },
          "404": {
            "description": "Unknown slug or id"
          },
          "409": {
            "description": "Already on the board or already queued"
          },
          "429": {
            "description": "A limit was hit. Stop there and skip the retry loop"
          }
        }
      }
    }
  }
}