{
  "openapi": "3.1.0",
  "info": {
    "title": "VCG submission API",
    "version": "1.1.0",
    "description": "No browser, account or issued API key required. Generate and privately save a random per-submission key before POST. It is both the retry key and the capability to read this submission. Never put it in a URL, public log or project description. Always use trailing slashes. Free is the default. All projects enter hidden editorial review; payment and publication are separate. Docs: /en/submit/agents.md. No bulk submissions or ownership verification."
  },
  "servers": [
    {
      "url": "https://vibecoding.gallery"
    }
  ],
  "paths": {
    "/api/submissions/badge/availability/": {
      "get": {
        "operationId": "getBadgeAvailability",
        "summary": "Check badge availability",
        "responses": {
          "200": {
            "description": "available: boolean"
          },
          "503": {
            "description": "service_unavailable; outcome may be unknown. GET with the same key, then retry the original POST with that same key and payload"
          }
        }
      }
    },
    "/api/submissions/badge/": {
      "get": {
        "operationId": "getBadgeState",
        "summary": "Recover private badge enrollment and check result using the original submission key",
        "security": [
          {
            "SubmissionKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Badge state and embed assets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadgeState"
                }
              }
            }
          },
          "401": {
            "description": "invalid_submission_key; use a saved private 64-character lowercase hex key"
          },
          "404": {
            "description": "receipt_not_found"
          },
          "409": {
            "description": "badge_not_eligible"
          },
          "503": {
            "description": "service_unavailable; outcome may be unknown. GET with the same key, then retry the original POST with that same key and payload"
          }
        }
      },
      "post": {
        "operationId": "badgeAction",
        "summary": "Offer: request the badge option. Verify: check initial public homepage HTML. Publication requires editorial approval.",
        "security": [
          {
            "SubmissionKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "action"
                    ],
                    "properties": {
                      "action": {
                        "const": "offer"
                      },
                      "locale": {
                        "enum": [
                          "es",
                          "en"
                        ],
                        "default": "en"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "action",
                      "website_edit_authorized",
                      "accepted_terms"
                    ],
                    "properties": {
                      "action": {
                        "const": "verify"
                      },
                      "website_edit_authorized": {
                        "const": true,
                        "description": "Separate owner permission to edit the website; submitting permission is insufficient."
                      },
                      "accepted_terms": {
                        "const": "badge-v1"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "State, check result when verifying, assets and next editorial deadline",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadgeState"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json"
          },
          "401": {
            "description": "invalid_submission_key; use a saved private 64-character lowercase hex key"
          },
          "404": {
            "description": "receipt_not_found"
          },
          "409": {
            "description": "badge_unavailable, badge_not_eligible or badge_offer_required; free submission remains saved"
          },
          "413": {
            "description": "Maximum badge request body: 2048 bytes"
          },
          "415": {
            "description": "unsupported_media_type"
          },
          "422": {
            "description": "validation_failed or badge_consent_required"
          },
          "429": {
            "description": "badge_rate_limited; wait Retry-After (60 seconds)"
          },
          "503": {
            "description": "Outcome may be unknown; GET badge state with the same key before retrying verification"
          }
        }
      }
    },
    "/api/submissions/validate/": {
      "post": {
        "operationId": "validateSubmission",
        "summary": "Validate without saving or paying",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Submission"
              },
              "example": {
                "title": "Pocket Tasks",
                "creator": "Pocket Tasks Team",
                "description": "A free task list for freelancers. Built with Claude and Supabase. AI helped write the code; it is not a runtime feature. Requires an account. Team collaboration is not available.",
                "url": "https://pockettasks.example/",
                "email": "owner@pockettasks.example",
                "categories": [
                  "productivity"
                ],
                "status": "MVP",
                "tools": [
                  "Claude",
                  "Supabase"
                ],
                "image_urls": [],
                "plan": "free",
                "owner_authorized": true,
                "agent": {
                  "name": "Your agent name"
                },
                "locale": "en"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "valid:true, saved:false; not an acceptance decision"
          },
          "400": {
            "description": "invalid_json"
          },
          "401": {
            "description": "invalid_submission_key; use a saved private 64-character lowercase hex key"
          },
          "409": {
            "description": "submission_key_conflict or possible_duplicate; do not create another key to retry"
          },
          "413": {
            "description": "payload_too_large; maximum 24576 bytes"
          },
          "415": {
            "description": "unsupported_media_type"
          },
          "422": {
            "description": "validation_failed; fields contains field names and messages when available"
          },
          "429": {
            "description": "submission_rate_limited; respect Retry-After and retain the same key"
          },
          "503": {
            "description": "service_unavailable; outcome may be unknown. GET with the same key, then retry the original POST with that same key and payload"
          }
        }
      }
    },
    "/api/submissions/": {
      "post": {
        "operationId": "submitProject",
        "summary": "Save once; same key and normalized payload replays the receipt",
        "security": [
          {
            "SubmissionKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Submission"
              },
              "example": {
                "title": "Pocket Tasks",
                "creator": "Pocket Tasks Team",
                "description": "A free task list for freelancers. Built with Claude and Supabase. AI helped write the code; it is not a runtime feature. Requires an account. Team collaboration is not available.",
                "url": "https://pockettasks.example/",
                "email": "owner@pockettasks.example",
                "categories": [
                  "productivity"
                ],
                "status": "MVP",
                "tools": [
                  "Claude",
                  "Supabase"
                ],
                "image_urls": [],
                "plan": "free",
                "owner_authorized": true,
                "agent": {
                  "name": "Your agent name"
                },
                "locale": "en"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing submission; replayed:true",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "201": {
            "description": "Submission received, still hidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json"
          },
          "401": {
            "description": "invalid_submission_key; use a saved private 64-character lowercase hex key"
          },
          "409": {
            "description": "submission_key_conflict or possible_duplicate; do not create another key to retry"
          },
          "413": {
            "description": "payload_too_large; maximum 24576 bytes"
          },
          "415": {
            "description": "unsupported_media_type"
          },
          "422": {
            "description": "validation_failed; fields contains field names and messages when available"
          },
          "429": {
            "description": "submission_rate_limited; respect Retry-After and retain the same key"
          },
          "503": {
            "description": "service_unavailable; outcome may be unknown. GET with the same key, then retry the original POST with that same key and payload"
          }
        }
      },
      "get": {
        "operationId": "getSubmission",
        "summary": "Retrieve receipt and publication status using the same private key",
        "security": [
          {
            "SubmissionKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt with payment status confirmed by Stripe when available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "401": {
            "description": "invalid_submission_key; use a saved private 64-character lowercase hex key"
          },
          "404": {
            "description": "receipt_not_found for this key; retry the original POST with the same key after an interrupted request"
          },
          "503": {
            "description": "service_unavailable; outcome may be unknown. GET with the same key, then retry the original POST with that same key and payload"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "SubmissionKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "64 lowercase hex characters (32 cryptographically random bytes)",
        "description": "Generate locally; no sign-in. Save before POST. Anyone holding it can read this receipt, so share only with the owner. No update or delete authority."
      }
    },
    "schemas": {
      "Submission": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "creator",
          "description",
          "url",
          "email",
          "categories",
          "owner_authorized",
          "agent"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "creator": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "minLength": 40,
            "maxLength": 5000
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri",
            "pattern": "^https://",
            "description": "Public HTTPS URL, without credentials, IP address or custom port. Never fetched by this API."
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "maxLength": 254,
            "format": "email",
            "description": "Authorized owner contact; visible only to administrators."
          },
          "categories": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "chatbots",
                "image-generation",
                "coding-assistants",
                "ai-agents",
                "automation",
                "productivity",
                "education",
                "data-analysis",
                "health",
                "finance",
                "entertainment",
                "other"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "Idea",
              "MVP",
              "Production"
            ],
            "default": "MVP"
          },
          "tools": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "default": []
          },
          "image_urls": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "format": "uri",
              "pattern": "^https://",
              "description": "Public HTTPS URL, without credentials, IP address or custom port. Never fetched by this API."
            },
            "default": [],
            "description": "Direct public image URLs. Use stable authorized JPEG, PNG, GIF or WebP images, <=10 MB each. URL contents are reviewed manually, not downloaded or verified by this API. Local files and data: URLs are not accepted."
          },
          "video_url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "format": "uri",
            "pattern": "^https://",
            "description": "Public HTTPS URL, without credentials, IP address or custom port. Never fetched by this API."
          },
          "locale": {
            "type": "string",
            "enum": [
              "es",
              "en"
            ],
            "default": "en"
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "express"
            ],
            "default": "free"
          },
          "express_authorized": {
            "type": "boolean",
            "default": false,
            "description": "Must be true if the owner authorizes the one-time EUR 9.90 Express plan. POST does not charge; the receipt includes a checkout link for the owner."
          },
          "owner_authorized": {
            "type": "boolean",
            "const": true,
            "description": "Owner authorized submitting and publishing this material. Self-declaration, not verified identity."
          },
          "agent": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "version": {
                "type": "string",
                "minLength": 0,
                "maxLength": 80
              }
            },
            "description": "Private submitting-agent metadata for administrators; not the creator name."
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "plan": {
                  "const": "express"
                }
              },
              "required": [
                "plan"
              ]
            },
            "then": {
              "required": [
                "express_authorized"
              ],
              "properties": {
                "express_authorized": {
                  "const": true
                }
              }
            }
          }
        ]
      },
      "BadgeState": {
        "type": "object",
        "required": [
          "available",
          "project",
          "enrollment",
          "assets",
          "status_url",
          "terms_version"
        ],
        "properties": {
          "status_url": {
            "const": "/api/submissions/badge/"
          },
          "action": {
            "type": "string"
          },
          "benefits": {
            "type": "object",
            "properties": {
              "price_eur": {
                "const": 0
              },
              "review_business_days": {
                "const": 5
              },
              "starts_after": {
                "const": "verified_installation_and_complete_materials"
              },
              "link": {
                "const": "dofollow_while_badge_remains"
              },
              "editorial_approval_required": {
                "const": true
              },
              "featured_homepage": {
                "const": false
              }
            }
          },
          "requirements": {
            "type": "object",
            "description": "Free submission, contact email, complete description, editable public HTTPS homepage with visible link in initial HTML."
          },
          "embed_html": {
            "type": "object",
            "required": [
              "light",
              "dark"
            ],
            "properties": {
              "light": {
                "type": "string"
              },
              "dark": {
                "type": "string"
              }
            }
          },
          "offer_request": {
            "type": "object",
            "description": "POST this body with the original private key; idempotent. No installation or permission is implied."
          },
          "verify_request": {
            "type": "object",
            "description": "Execute only after owner edit permission, terms acceptance, installation and deployment."
          },
          "next_steps": {
            "type": "object",
            "properties": {
              "with_website_access": {
                "type": "string"
              },
              "without_website_access": {
                "type": "string"
              },
              "success": {
                "type": "string"
              }
            }
          },
          "studio_url": {
            "type": "string",
            "format": "uri",
            "description": "Owner handoff. Never put the private key in the URL."
          },
          "available": {
            "type": "boolean"
          },
          "project": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "site_url": {
                "type": "string"
              },
              "published": {
                "type": "boolean"
              }
            }
          },
          "enrollment": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "enum": [
                  "offered",
                  "active",
                  "unavailable",
                  "notice_required",
                  "grace",
                  "revoked"
                ]
              },
              "site_url": {
                "type": "string"
              },
              "verified_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "review_due_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_result": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "grace_until": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "assets": {
            "type": "object",
            "properties": {
              "light": {
                "type": "string"
              },
              "dark": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            }
          },
          "check": {
            "type": "object",
            "properties": {
              "result": {
                "enum": [
                  "verified",
                  "link_missing",
                  "link_qualified",
                  "link_hidden",
                  "page_noindex",
                  "unreachable",
                  "unsafe_url",
                  "response_too_large",
                  "unsupported_content",
                  "redirect_blocked"
                ]
              },
              "final_url": {
                "type": "string"
              },
              "duration_ms": {
                "type": "integer"
              }
            }
          },
          "terms_version": {
            "const": "badge-v1"
          },
          "verification_scope": {
            "type": "string"
          }
        }
      },
      "Receipt": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "title",
          "submission",
          "status",
          "plan",
          "payment",
          "public_url",
          "status_url",
          "replayed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "submission_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "submission": {
            "const": "received"
          },
          "status": {
            "enum": [
              "pending_review",
              "published",
              "removed"
            ]
          },
          "plan": {
            "enum": [
              "free",
              "express"
            ]
          },
          "payment": {
            "type": "object",
            "properties": {
              "status": {
                "enum": [
                  "not_applicable",
                  "unverified",
                  "paid"
                ]
              },
              "checkout_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amount": {
                "type": "number"
              },
              "currency": {
                "const": "EUR"
              },
              "action": {
                "type": "string"
              }
            }
          },
          "public_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_url": {
            "const": "/api/submissions/"
          },
          "replayed": {
            "type": "boolean"
          },
          "badge": {
            "type": "object",
            "properties": {
              "status_url": {
                "const": "/api/submissions/badge/"
              },
              "action": {
                "type": "string"
              },
              "benefits": {
                "type": "object",
                "properties": {
                  "price_eur": {
                    "const": 0
                  },
                  "review_business_days": {
                    "const": 5
                  },
                  "starts_after": {
                    "const": "verified_installation_and_complete_materials"
                  },
                  "link": {
                    "const": "dofollow_while_badge_remains"
                  },
                  "editorial_approval_required": {
                    "const": true
                  },
                  "featured_homepage": {
                    "const": false
                  }
                }
              },
              "requirements": {
                "type": "object",
                "description": "Free submission, contact email, complete description, editable public HTTPS homepage with visible link in initial HTML."
              },
              "embed_html": {
                "type": "object",
                "required": [
                  "light",
                  "dark"
                ],
                "properties": {
                  "light": {
                    "type": "string"
                  },
                  "dark": {
                    "type": "string"
                  }
                }
              },
              "offer_request": {
                "type": "object",
                "description": "POST this body with the original private key; idempotent. No installation or permission is implied."
              },
              "verify_request": {
                "type": "object",
                "description": "Execute only after owner edit permission, terms acceptance, installation and deployment."
              },
              "next_steps": {
                "type": "object",
                "properties": {
                  "with_website_access": {
                    "type": "string"
                  },
                  "without_website_access": {
                    "type": "string"
                  },
                  "success": {
                    "type": "string"
                  }
                }
              },
              "studio_url": {
                "type": "string",
                "format": "uri",
                "description": "Owner handoff. Never put the private key in the URL."
              }
            }
          }
        }
      }
    }
  }
}