{
  "openapi": "3.1.0",
  "info": {
    "title": "AurionX AI Directory API",
    "version": "1.1.0",
    "contact": {
      "email": "thomas@aurionx.ai"
    },
    "description": "List an AI tool in the AurionX directory on behalf of the company that makes it. Two calls: submit, then confirm the 6-digit code we email to the contact address. contact_email must be a work email on the tool's own domain, and its owner must give you the code. Nothing is listed until the code is confirmed. We check the website and write the listing ourselves; it is free."
  },
  "servers": [
    {
      "url": "https://aurionx.ai"
    }
  ],
  "paths": {
    "/api/submit/": {
      "post": {
        "operationId": "submitListing",
        "summary": "Step 1: submit an AI tool; emails a 6-digit code to contact_email",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "website",
                  "contact_email"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "website": {
                    "type": "string",
                    "description": "Product URL. Its domain is the duplicate key."
                  },
                  "contact_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Work email on the website's domain (no Gmail, Outlook, etc.). Receives the code."
                  },
                  "category": {
                    "type": "string",
                    "description": "Category slug from https://aurionx.ai/ai/ (we assign one if missing)"
                  },
                  "pricing_model": {
                    "enum": [
                      "free",
                      "freemium",
                      "paid",
                      "enterprise"
                    ]
                  },
                  "tagline": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "features": {
                    "oneOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "starting_price": {
                    "type": "string"
                  },
                  "hq": {
                    "type": "string"
                  },
                  "founded_year": {
                    "type": "string"
                  },
                  "logo_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Code sent. Ask the owner of sent_to for it, then call confirmListing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "status": {
                      "const": "pending_email_verification"
                    },
                    "verification_id": {
                      "type": "string"
                    },
                    "sent_to": {
                      "type": "string"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/submit/verify/": {
      "post": {
        "operationId": "confirmListing",
        "summary": "Step 2: confirm the emailed code; the tool is then reviewed and listed",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "verification_id",
                  "code"
                ],
                "properties": {
                  "verification_id": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted. status = published | in_review | rejected (a duplicate website is rejected and changes nothing).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "status": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing fields or wrong code (tries_left in body; 5 tries per code)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "Expired (30 min), used, or out of tries: submit again",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}