{
    "openapi": "3.1.0",
    "info": {
        "title": "PostFile API",
        "version": "1.0.0",
        "description": "REST API for permanent file uploads. Authenticate with the `X-API-Key` header (except public endpoints such as signup, plans, and intake uploads)."
    },
    "servers": [
        {
            "url": "https:\/\/postfile.net"
        }
    ],
    "tags": [
        {
            "name": "Auth"
        },
        {
            "name": "Demo"
        },
        {
            "name": "Try"
        },
        {
            "name": "Account"
        },
        {
            "name": "Intake Links"
        },
        {
            "name": "Public"
        }
    ],
    "security": [
        {
            "apiKey": []
        }
    ],
    "paths": {
        "\/v1\/signup": {
            "post": {
                "operationId": "files.signup",
                "summary": "Create account and get API key",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/SignupRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Account created"
                                                },
                                                "api_key": {
                                                    "type": "string"
                                                },
                                                "plan": {
                                                    "type": "string",
                                                    "const": "free"
                                                },
                                                "email": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "message",
                                                "api_key",
                                                "plan",
                                                "email"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "If an account exists for this email, a login link has been sent to it."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/waitlist": {
            "post": {
                "operationId": "files.waitlist",
                "summary": "Join waitlist for upcoming features",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/WaitlistRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "You're on the list! We'll notify you when this feature launches."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/unsubscribe": {
            "get": {
                "operationId": "files.unsubscribe",
                "summary": "Unsubscribe from product emails",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text\/html; charset=UTF-8": {
                                "schema": {
                                    "type": "string",
                                    "const": "<html><body><h1>Unsubscribed<\/h1><p>You will no longer receive product emails.<\/p><\/body><\/html>"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/v1\/account": {
            "get": {
                "operationId": "files.account",
                "summary": "Get account info and usage",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "email": {
                                            "type": "string"
                                        },
                                        "pending_email": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "plan": {
                                            "type": "string"
                                        },
                                        "email_verified": {
                                            "type": "boolean"
                                        },
                                        "email_verified_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "email_verification_source": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "usage": {
                                            "type": "object",
                                            "properties": {
                                                "uploads_this_month": {
                                                    "type": "integer"
                                                },
                                                "uploads_limit": {
                                                    "type": "integer"
                                                },
                                                "max_file_size_mb": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "uploads_this_month",
                                                "uploads_limit",
                                                "max_file_size_mb"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "email",
                                        "pending_email",
                                        "plan",
                                        "email_verified",
                                        "email_verified_at",
                                        "email_verification_source",
                                        "usage"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/account\/email": {
            "post": {
                "operationId": "files.changeEmail",
                "summary": "Change account email",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/EmailChangeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "email": {
                                                    "type": "string"
                                                },
                                                "pending_email": {
                                                    "type": "string"
                                                },
                                                "email_changed": {
                                                    "type": "boolean"
                                                },
                                                "email_change_pending": {
                                                    "type": "boolean"
                                                },
                                                "email_verified": {
                                                    "type": "boolean"
                                                },
                                                "verification_sent": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "email",
                                                "pending_email",
                                                "email_changed",
                                                "email_change_pending",
                                                "email_verified",
                                                "verification_sent"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "email": {
                                                    "type": "string"
                                                },
                                                "pending_email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "email_changed": {
                                                    "type": "boolean"
                                                },
                                                "email_change_pending": {
                                                    "type": "boolean"
                                                },
                                                "email_verified": {
                                                    "type": "boolean"
                                                },
                                                "verification_sent": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "email",
                                                "pending_email",
                                                "email_changed",
                                                "email_change_pending",
                                                "email_verified",
                                                "verification_sent"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/rotate-key": {
            "post": {
                "operationId": "files.rotateKey",
                "summary": "Rotate API key",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "API key rotated. Your old key no longer works."
                                        },
                                        "api_key": {
                                            "type": "string"
                                        },
                                        "email": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "api_key",
                                        "email"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/email-preferences": {
            "post": {
                "operationId": "files.emailPreferences",
                "summary": "Update email preferences",
                "tags": [
                    "Account"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/EmailPreferencesRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "email_opt_out": {
                                            "type": "boolean"
                                        },
                                        "marketing_consent": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "email_opt_out",
                                        "marketing_consent"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/auth\/google": {
            "post": {
                "operationId": "auth.google",
                "description": "Verify a Google ID token and create\/find the user, returning an API key.",
                "summary": "Sign in with Google",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/GoogleAuthRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "api_key": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "api_key"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "detail": {
                                            "type": "string",
                                            "const": "Google account has no email"
                                        }
                                    },
                                    "required": [
                                        "detail"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "detail": {
                                            "type": "string",
                                            "const": "Invalid Google credential"
                                        }
                                    },
                                    "required": [
                                        "detail"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "detail": {
                                            "type": "string",
                                            "const": "Google sign-in is not configured"
                                        }
                                    },
                                    "required": [
                                        "detail"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/upload": {
            "post": {
                "operationId": "files.upload",
                "description": "Upload a file with multipart\/form-data. Authenticate with X-API-Key (optional for anonymous uploads).\nThe response includes a public CDN URL. Add optional form field `expires_in` (e.g. `30s`, `24h`, `7d`) to auto-delete later.",
                "summary": "Upload a file and get a public URL",
                "tags": [
                    "Files"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UploadFileRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/upload\/base64": {
            "post": {
                "operationId": "files.uploadBase64",
                "description": "Intended for low-code platforms that can produce base64 but cannot send multipart\/form-data.\nAuthenticate with X-API-Key (optional for anonymous uploads).",
                "summary": "Upload a base64-encoded file and get a public URL",
                "tags": [
                    "Files"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/Base64UploadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/demo-upload": {
            "post": {
                "operationId": "files.demoUpload",
                "description": "Public demo endpoint. No API key required. Size-limited and IP rate-limited.",
                "summary": "Anonymous demo upload \u2014 no signup, no key",
                "tags": [
                    "Files",
                    "Demo"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/DemoUploadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string"
                                        },
                                        "file_id": {
                                            "type": "string"
                                        },
                                        "size": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "url",
                                        "file_id",
                                        "size"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/try-upload": {
            "post": {
                "operationId": "files.tryUpload",
                "description": "Free trial upload. Requires email and consent to track files.",
                "summary": "Try uploading a file (no auth, trial limit)",
                "tags": [
                    "Files",
                    "Try"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/TryUploadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/files": {
            "get": {
                "operationId": "files.index",
                "summary": "List your uploaded files",
                "tags": [
                    "Files"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "string"
                                        },
                                        "page": {
                                            "type": [
                                                "object",
                                                "null"
                                            ]
                                        },
                                        "per_page": {
                                            "type": [
                                                "object",
                                                "null"
                                            ]
                                        },
                                        "files": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "file_id": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "size": {
                                                        "type": "integer"
                                                    },
                                                    "content_type": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "expires_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "file_id",
                                                    "url",
                                                    "name",
                                                    "size",
                                                    "content_type",
                                                    "created_at",
                                                    "expires_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "page",
                                        "per_page",
                                        "files"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/files\/{fileId}": {
            "get": {
                "operationId": "files.show",
                "summary": "Get file details",
                "tags": [
                    "Files"
                ],
                "parameters": [
                    {
                        "name": "fileId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "file_id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "size": {
                                            "type": "integer"
                                        },
                                        "content_type": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "file_id",
                                        "url",
                                        "name",
                                        "size",
                                        "content_type",
                                        "created_at",
                                        "expires_at"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "files.destroy",
                "summary": "Delete a file",
                "tags": [
                    "Files"
                ],
                "parameters": [
                    {
                        "name": "fileId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "file_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "deleted",
                                        "file_id"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/files\/bulk-delete": {
            "post": {
                "operationId": "files.bulkDelete",
                "description": "Delete multiple files owned by the authenticated account. Unknown or non-owned IDs are returned in `not_deleted_file_ids`.",
                "summary": "Bulk delete files",
                "tags": [
                    "Files"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/BulkDeleteRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/intake\/{token}\/upload": {
            "post": {
                "operationId": "intake.upload",
                "summary": "Upload a file via intake link (public)",
                "tags": [
                    "Intake Links"
                ],
                "parameters": [
                    {
                        "name": "token",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/IntakeUploadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {}
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/v1\/intake-links": {
            "get": {
                "operationId": "intake.index",
                "summary": "List your intake links",
                "tags": [
                    "Intake Links"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "intake_links": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "intake_id": {
                                                        "type": "string"
                                                    },
                                                    "upload_url": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "upload_count": {
                                                        "type": "integer"
                                                    },
                                                    "max_files": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "active": {
                                                        "type": "boolean"
                                                    },
                                                    "expires_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "intake_id",
                                                    "upload_url",
                                                    "label",
                                                    "upload_count",
                                                    "max_files",
                                                    "active",
                                                    "expires_at",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "intake_links"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "intake.store",
                "summary": "Create an intake link",
                "tags": [
                    "Intake Links"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CreateIntakeLinkRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "intake_id": {
                                            "type": "string"
                                        },
                                        "upload_url": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "allowed_types": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "max_file_size_mb": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "max_files": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "webhook_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "created_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "intake_id",
                                        "upload_url",
                                        "label",
                                        "allowed_types",
                                        "max_file_size_mb",
                                        "max_files",
                                        "webhook_url",
                                        "expires_at",
                                        "created_at"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/intake-links\/{intakeId}": {
            "get": {
                "operationId": "intake.show",
                "summary": "Get intake link details and files",
                "tags": [
                    "Intake Links"
                ],
                "parameters": [
                    {
                        "name": "intakeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "intake_id": {
                                            "type": "string"
                                        },
                                        "upload_url": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "allowed_types": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "max_file_size_mb": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "max_files": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "webhook_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "created_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "upload_count": {
                                            "type": "integer"
                                        },
                                        "active": {
                                            "type": "boolean"
                                        },
                                        "files": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "file_id": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "size": {
                                                        "type": "integer"
                                                    },
                                                    "content_type": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "file_id",
                                                    "url",
                                                    "name",
                                                    "size",
                                                    "content_type",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "intake_id",
                                        "upload_url",
                                        "label",
                                        "allowed_types",
                                        "max_file_size_mb",
                                        "max_files",
                                        "webhook_url",
                                        "expires_at",
                                        "created_at",
                                        "upload_count",
                                        "active",
                                        "files"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "intake.destroy",
                "summary": "Deactivate an intake link",
                "tags": [
                    "Intake Links"
                ],
                "parameters": [
                    {
                        "name": "intakeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deactivated": {
                                            "type": "boolean"
                                        },
                                        "intake_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "deactivated",
                                        "intake_id"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/plans": {
            "get": {
                "operationId": "public.plans",
                "summary": "List available plans and quotas",
                "tags": [
                    "Public"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "plans": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string",
                                                            "const": "free"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Free"
                                                        },
                                                        "price_usd": {
                                                            "type": "integer"
                                                        },
                                                        "uploads_unverified": {
                                                            "type": "integer"
                                                        },
                                                        "uploads_verified": {
                                                            "type": "integer"
                                                        },
                                                        "max_file_size_mb": {
                                                            "type": "integer"
                                                        },
                                                        "storage_mb": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "rate_limit_per_sec": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "price_usd",
                                                        "uploads_unverified",
                                                        "uploads_verified",
                                                        "max_file_size_mb",
                                                        "storage_mb",
                                                        "rate_limit_per_sec"
                                                    ]
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1,
                                            "additionalItems": false
                                        }
                                    },
                                    "required": [
                                        "plans"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "\/v1\/debug\/request": {
            "get": {
                "operationId": "public.debugRequest",
                "description": "Returns the resolved client IP, user-agent, and selected forwarding headers. Requires header X-Debug-Secret matching DEBUG_REQUEST_SECRET. Returns 404 when the secret is unset or wrong.",
                "summary": "Debug client request fingerprint",
                "tags": [
                    "Public"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ip": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "ips": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "remote_addr": {
                                            "type": "string"
                                        },
                                        "user_agent": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "method": {
                                            "type": "string"
                                        },
                                        "path": {
                                            "type": "string"
                                        },
                                        "scheme": {
                                            "type": "string"
                                        },
                                        "host": {
                                            "type": "string"
                                        },
                                        "trust_cloudflare_connecting_ip": {
                                            "type": "boolean"
                                        },
                                        "forwarding": {
                                            "type": "object",
                                            "properties": {
                                                "cf-connecting-ip": {
                                                    "type": "string"
                                                },
                                                "cf-connecting-ipv6": {
                                                    "type": "string"
                                                },
                                                "cf-ipcountry": {
                                                    "type": "string"
                                                },
                                                "cf-ray": {
                                                    "type": "string"
                                                },
                                                "x-forwarded-for": {
                                                    "type": "string"
                                                },
                                                "x-forwarded-proto": {
                                                    "type": "string"
                                                },
                                                "x-real-ip": {
                                                    "type": "string"
                                                },
                                                "true-client-ip": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "cf-connecting-ip",
                                                "cf-connecting-ipv6",
                                                "cf-ipcountry",
                                                "cf-ray",
                                                "x-forwarded-for",
                                                "x-forwarded-proto",
                                                "x-real-ip",
                                                "true-client-ip"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "ip",
                                        "ips",
                                        "remote_addr",
                                        "user_agent",
                                        "method",
                                        "path",
                                        "scheme",
                                        "host",
                                        "trust_cloudflare_connecting_ip",
                                        "forwarding"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            }
        },
        "schemas": {
            "Base64UploadRequest": {
                "type": "object",
                "properties": {
                    "filename": {
                        "type": "string",
                        "maxLength": 512
                    },
                    "content_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "data_base64": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "file_base64": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "data": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_in": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "filename"
                ],
                "title": "Base64UploadRequest"
            },
            "BulkDeleteRequest": {
                "type": "object",
                "properties": {
                    "file_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1,
                        "maxItems": 100
                    }
                },
                "required": [
                    "file_ids"
                ],
                "title": "BulkDeleteRequest"
            },
            "CreateIntakeLinkRequest": {
                "type": "object",
                "properties": {
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 256
                    },
                    "allowed_types": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 32
                        }
                    },
                    "max_file_size_mb": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1
                    },
                    "max_files": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1
                    },
                    "expires_in": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_in_days": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1
                    },
                    "webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 1024
                    }
                },
                "title": "CreateIntakeLinkRequest"
            },
            "DemoUploadRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream"
                    }
                },
                "required": [
                    "file"
                ],
                "title": "DemoUploadRequest"
            },
            "EmailChangeRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 320
                    }
                },
                "required": [
                    "email"
                ],
                "title": "EmailChangeRequest"
            },
            "EmailPreferencesRequest": {
                "type": "object",
                "properties": {
                    "opt_out": {
                        "type": "boolean"
                    },
                    "marketing_consent": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    }
                },
                "required": [
                    "opt_out"
                ],
                "title": "EmailPreferencesRequest"
            },
            "GoogleAuthRequest": {
                "type": "object",
                "properties": {
                    "credential": {
                        "type": "string"
                    },
                    "marketing_consent": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "credential"
                ],
                "title": "GoogleAuthRequest"
            },
            "IntakeUploadRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream"
                    }
                },
                "required": [
                    "file"
                ],
                "title": "IntakeUploadRequest"
            },
            "SignupRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 320
                    },
                    "marketing_consent": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "email"
                ],
                "title": "SignupRequest"
            },
            "TryUploadRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream"
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 320
                    },
                    "consent": {
                        "type": "string"
                    },
                    "marketing_consent": {
                        "type": "string"
                    }
                },
                "required": [
                    "file",
                    "email",
                    "consent"
                ],
                "title": "TryUploadRequest"
            },
            "UploadFileRequest": {
                "type": "object",
                "properties": {
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream"
                    },
                    "expires_in": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "file"
                ],
                "title": "UploadFileRequest"
            },
            "WaitlistRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 320
                    },
                    "feature": {
                        "type": "string",
                        "maxLength": 64
                    }
                },
                "required": [
                    "email"
                ],
                "title": "WaitlistRequest"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}