{
  "openapi": "3.1.0",
  "info": {
    "title": "FileGrab Embed Upload API",
    "version": "1.0.0",
    "description": "The API used by FileGrab upload widgets. An embed key is scoped to one link."
  },
  "servers": [
    {
      "url": "https://api.filegrab.link"
    }
  ],
  "security": [
    {
      "embedKey": []
    }
  ],
  "paths": {
    "/api/embed/config": {
      "get": {
        "summary": "Read embed configuration",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    },
    "/api/embed/files": {
      "get": {
        "summary": "List visible files",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    },
    "/api/embed/upload/init": {
      "post": {
        "summary": "Initialize an embed upload",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    },
    "/api/embed/upload/sign-part": {
      "post": {
        "summary": "Sign a multipart part",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    },
    "/api/embed/upload/complete": {
      "post": {
        "summary": "Complete an embed upload",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    },
    "/api/embed/upload/abort": {
      "post": {
        "summary": "Abort an embed upload",
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "embedKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "embedKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}