{
  "openapi": "3.1.0",
  "info": {
    "title": "CrawlSprint API",
    "version": "1.0.0",
    "description": "Check and submit URLs for a verified website. Publish, schedule and edit public roundups and manage them with a private removal key."
  },
  "servers": [
    {
      "url": "https://crawlsprint.daviddacruz.dev"
    }
  ],
  "security": [
    {
      "bearerKey": []
    }
  ],
  "paths": {
    "/api/v1/checks": {
      "post": {
        "summary": "Check verified public URLs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "urls"
                ],
                "properties": {
                  "urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "minItems": 1,
                    "maxItems": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CheckResult"
                      }
                    }
                  },
                  "required": [
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-indexmenow-scope": "checks:read"
      }
    },
    "/api/v1/submissions": {
      "post": {
        "summary": "Submit updated or removed URLs",
        "description": "Send URLs for the key’s exact verified hostname. Read the receipt’s status to learn the delivery outcome.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "urls"
                ],
                "properties": {
                  "urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "operation": {
                    "type": "string",
                    "enum": [
                      "update",
                      "remove"
                    ],
                    "default": "update"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            },
            "description": "Use one key per logical request. Reuse the original key and payload on retries."
          }
        ],
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-indexmenow-scope": "submissions:write"
      },
      "get": {
        "summary": "List up to 40 recent submission summaries for the key’s hostname",
        "description": "Use an API key for the same hostname with either checks:read or submissions:write.",
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "submissions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReceiptSummary"
                      },
                      "maxItems": 40
                    }
                  },
                  "required": [
                    "submissions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/submissions/{id}": {
      "get": {
        "summary": "Get a submission receipt",
        "description": "Use an API key for the same hostname with either checks:read or submissions:write.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "summary": "Get your daily usage",
        "description": "Any active API key can read the account’s combined public roundup and verified-site submission allowance. The allowance resets at midnight UTC.",
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/roundups": {
      "post": {
        "summary": "Publish or schedule a public roundup",
        "x-indexmenow-scope": "roundups:write",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            },
            "description": "Use one key per logical request. Reuse the original key and payload on retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urls",
                  "publicConsent"
                ],
                "additionalProperties": false,
                "properties": {
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Public URLs without access tokens, signatures or other private parameters.",
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    }
                  },
                  "publicConsent": {
                    "const": true,
                    "description": "You have permission to publish these URLs."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 90,
                    "description": "Optional unique page title and visible H1 when publishing a single roundup."
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "Optional unique address segment when publishing a single roundup."
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "description": "Visible summary and page and social metadata. Use null or an empty string for the generated description."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2048,
                    "description": "Public HTTPS URL of a JPEG, PNG or WebP up to 5 MB, 4,096 pixels per side and 12 megapixels. CrawlSprint checks the image before saving. Use null or an empty string for the default social image."
                  },
                  "schedule": {
                    "type": "object",
                    "required": [
                      "publishAt"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "publishAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "dailyLimit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Roundup published",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RoundupReceipt"
                    },
                    {
                      "type": "object",
                      "required": [
                        "published",
                        "title"
                      ],
                      "properties": {
                        "published": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string",
                          "description": "The title displayed on the published roundup."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Roundup scheduled or original request still running",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RunningAction"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/RoundupReceipt"
                        },
                        {
                          "type": "object",
                          "required": [
                            "scheduled",
                            "releases"
                          ],
                          "properties": {
                            "scheduled": {
                              "type": "integer"
                            },
                            "releases": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/PlannedRelease"
                              }
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The social image could not be verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/roundups/{slug}": {
      "parameters": [
        {
          "in": "path",
          "name": "slug",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
          }
        }
      ],
      "get": {
        "summary": "Read a roundup you own",
        "responses": {
          "200": {
            "description": "Request completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoundupEditView"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-indexmenow-scope": "roundups:write"
      },
      "patch": {
        "summary": "Update a roundup you own",
        "x-indexmenow-scope": "roundups:write",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            },
            "description": "Use one key per logical request. Reuse the original key and payload on retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "revision"
                ],
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "urls",
                      "publicConsent"
                    ]
                  },
                  {
                    "required": [
                      "title"
                    ]
                  },
                  {
                    "required": [
                      "slug"
                    ]
                  },
                  {
                    "required": [
                      "description"
                    ]
                  },
                  {
                    "required": [
                      "imageUrl"
                    ]
                  },
                  {
                    "required": [
                      "resourceNames"
                    ]
                  }
                ],
                "dependentRequired": {
                  "urls": [
                    "publicConsent"
                  ],
                  "publicConsent": [
                    "urls"
                  ]
                },
                "properties": {
                  "revision": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid",
                    "description": "Revision from the current owner-only roundup read. Use null if no edit has been made."
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "description": "Visible summary and page and social metadata. Use null or an empty string for the generated description."
                  },
                  "imageUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2048,
                    "description": "Public HTTPS URL of a JPEG, PNG or WebP up to 5 MB, 4,096 pixels per side and 12 megapixels. CrawlSprint checks the image before saving. Use null or an empty string for the default social image."
                  },
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "The entire replacement link list, in the order you want to save.",
                    "items": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    }
                  },
                  "publicConsent": {
                    "const": true,
                    "description": "You have permission to publish these URLs."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 90,
                    "description": "New title. An empty string restores the generated title."
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "New URL slug. An empty string restores the generated address."
                  },
                  "resourceNames": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Patch the display names of specific resources. Use the exact URL from the roundup or the replacement list. Use null to restore an automatic name.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "url",
                        "name"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 160
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved roundup and revision",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RoundupEditView"
                    },
                    {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "enum": [
                            "updated",
                            "unchanged"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "The original request is still running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunningAction"
                }
              }
            }
          },
          "400": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The social image could not be verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/link-reports": {
      "post": {
        "summary": "Email a report for an individual roundup link",
        "x-indexmenow-scope": "roundups:write",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            },
            "description": "Use one key per logical request. Reuse the original key and payload on retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slug",
                  "position",
                  "reason"
                ],
                "additionalProperties": false,
                "properties": {
                  "slug": {
                    "type": "string",
                    "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 1500
                  },
                  "includeReplyEmail": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Report sent or original request still running",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RunningAction"
                    },
                    {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "enum": [
                            "sent",
                            "preview"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "503": {
            "description": "Request could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/schedule-status": {
      "post": {
        "summary": "Check scheduled releases using the private removal key",
        "security": [
          {
            "roundupRemovalKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "description": "Last path segment of the first roundup URL from the receipt."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scheduled release status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "releases"
                  ],
                  "properties": {
                    "releases": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/PlannedRelease"
                          },
                          {
                            "type": "object",
                            "required": [
                              "status"
                            ],
                            "properties": {
                              "status": {
                                "enum": [
                                  "pending",
                                  "published",
                                  "sign_in_required"
                                ],
                                "description": "A legacy release without an owner reports sign_in_required until it is claimed."
                              },
                              "publishedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The private removal key is missing or does not match this batch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Batch management rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "default": {
            "description": "Batch action could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/unpublish": {
      "post": {
        "summary": "Withdraw a public roundup and cancel its pending releases",
        "security": [
          {
            "roundupRemovalKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "description": "Last path segment of the first roundup URL from the receipt."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Roundup withdrawn",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "removed",
                    "publicUrl"
                  ],
                  "properties": {
                    "removed": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Number of URLs removed from published releases."
                    },
                    "cancelled": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Number of URLs removed from pending releases. Present for a scheduled batch."
                    },
                    "publicUrl": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 2048
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The private removal key is missing or does not match this batch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Batch management rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait when the server supplies a retry interval.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "default": {
            "description": "Batch action could not be completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Scoped API key from the CrawlSprint workspace."
      },
      "roundupRemovalKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Private removal key from the public roundup receipt."
      }
    },
    "schemas": {
      "RunningAction": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "running"
          }
        }
      },
      "RoundupReceipt": {
        "type": "object",
        "required": [
          "publicUrl",
          "removalToken",
          "receiptEmail"
        ],
        "properties": {
          "publicUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "removalToken": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "Private bearer credential for batch management. Store it securely."
          },
          "receiptEmail": {
            "enum": [
              "sent",
              "queued",
              "failed",
              "preview"
            ]
          }
        }
      },
      "PlannedRelease": {
        "type": "object",
        "required": [
          "publicUrl",
          "publishAt",
          "urlCount"
        ],
        "properties": {
          "publicUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "publishAt": {
            "type": "string",
            "format": "date-time"
          },
          "urlCount": {
            "type": "integer"
          }
        }
      },
      "RoundupEditView": {
        "type": "object",
        "required": [
          "publicUrl",
          "slug",
          "title",
          "defaultSlug",
          "customSlug",
          "description",
          "imageUrl",
          "urls",
          "resources",
          "revision",
          "publishedAt",
          "updatedAt"
        ],
        "properties": {
          "publicUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "slug": {
            "type": "string",
            "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "defaultSlug": {
            "type": "string",
            "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "customSlug": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(?=.{3,64}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 320,
            "description": "Visible summary and page and social metadata. Use null or an empty string for the generated description."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048,
            "description": "Public HTTPS URL of a JPEG, PNG or WebP up to 5 MB, 4,096 pixels per side and 12 megapixels. CrawlSprint checks the image before saving. Use null or an empty string for the default social image."
          },
          "urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "url",
                "name",
                "customName",
                "automaticName"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2048
                },
                "name": {
                  "type": "string"
                },
                "customName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "automaticName": {
                  "type": "string"
                }
              }
            }
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "const": 1000
          },
          "used": {
            "type": "integer",
            "minimum": 0
          },
          "directUrls": {
            "type": "integer",
            "minimum": 0
          },
          "roundupLinks": {
            "type": "integer",
            "minimum": 0
          },
          "remaining": {
            "type": "integer",
            "minimum": 0
          },
          "resetsAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "limit",
          "used",
          "directUrls",
          "roundupLinks",
          "remaining",
          "resetsAt"
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      },
      "CheckResult": {
        "type": "object",
        "required": [
          "url",
          "outcome",
          "ready"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "httpStatus": {
            "type": [
              "integer",
              "null"
            ]
          },
          "finalUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "redirects": {
            "type": "integer",
            "minimum": 0
          },
          "redirectTarget": {
            "type": [
              "string",
              "null"
            ]
          },
          "noindex": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "canonical": {
            "type": [
              "string",
              "null"
            ]
          },
          "invalidCanonical": {
            "type": "boolean"
          },
          "metadataTruncated": {
            "type": "boolean"
          },
          "outcome": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          }
        }
      },
      "Receipt": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ReceiptSummary"
          },
          {
            "type": "object",
            "required": [
              "usage"
            ],
            "properties": {
              "usage": {
                "$ref": "#/components/schemas/Usage"
              }
            }
          }
        ]
      },
      "ReceiptSummary": {
        "type": "object",
        "required": [
          "id",
          "hostname",
          "urls",
          "count",
          "channel",
          "operation",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "hostname": {
            "type": "string"
          },
          "urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            }
          },
          "count": {
            "type": "integer"
          },
          "channel": {
            "enum": [
              "api",
              "mcp",
              "web"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "update",
              "remove"
            ],
            "default": "update"
          },
          "status": {
            "enum": [
              "awaiting_approval",
              "sending",
              "accepted",
              "pending_verification",
              "failed",
              "uncertain",
              "cancelled",
              "expired",
              "preview"
            ],
            "description": "Delivery outcome. Accepted means the receiving service accepted the notification. The search engine decides when to crawl and index the URL."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "approvalUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "clientName": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}