{
    "openapi": "3.1.0",
    "info": {
        "title": "CNF API",
        "version": "2.0.0",
        "summary": "Use reliable, low-latency endpoints in your applications.",
        "description": "Every response carries the same envelope: `success`, then either `data` or `error` + `message`, plus a `request_id`.\n\nAuthentication is a Bearer token issued at https://console.c.nf/account/api. A token acts only for the account that issued it — there is no cross-user or administrative override anywhere in this API, so a request for a resource you do not own returns 403 rather than 404-on-purpose.\n\nEndpoints under /v1/public need no token.",
        "contact": {
            "url": "https://support.c.nf"
        }
    },
    "servers": [
        {
            "url": "https://api.c.nf"
        }
    ],
    "tags": [
        {
            "name": "public",
            "description": "Small dependable endpoints that need no account: time, address, country, exchange rates and hashes."
        },
        {
            "name": "account",
            "description": "Who a token belongs to, and what it is allowed to do."
        },
        {
            "name": "dns",
            "description": "Claim a domain, prove you control it, then manage its records."
        },
        {
            "name": "cred",
            "description": "The private credential store behind the credentials tool."
        },
        {
            "name": "files",
            "description": "Personal file storage: list, upload, edit, share and delete."
        },
        {
            "name": "cdn",
            "description": "Edge caching and traffic for the files you share."
        },
        {
            "name": "sms",
            "description": "Messages relayed from your phone, and the keys that let it in."
        },
        {
            "name": "sites",
            "description": "Upload a zip, serve a site."
        },
        {
            "name": "deploy",
            "description": "The form, webhook and shortlink endpoints you have deployed."
        },
        {
            "name": "domain",
            "description": "Your domain portfolio and its registration data."
        },
        {
            "name": "packages",
            "description": "Publish releases and read back their versions and download counts."
        },
        {
            "name": "whois",
            "description": "Registration data for a domain, cached and shared with the domain tools."
        }
    ],
    "paths": {
        "/v1/public/time": {
            "get": {
                "operationId": "public_time",
                "summary": "The current UTC time in ISO 8601, RFC 2822 and Unix form.",
                "tags": [
                    "public"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "iso8601": null,
                                        "rfc2822": null,
                                        "unix": null,
                                        "unix_ms": null,
                                        "timezone": null,
                                        "date": null,
                                        "time": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl https://api.c.nf/v1/public/time"
            }
        },
        "/v1/public/timestamp": {
            "get": {
                "operationId": "public_timestamp",
                "summary": "The current Unix timestamp, in seconds and milliseconds.",
                "tags": [
                    "public"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "unix": null,
                                        "unix_ms": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl https://api.c.nf/v1/public/timestamp"
            }
        },
        "/v1/public/ip": {
            "get": {
                "operationId": "public_ip",
                "summary": "The address this request came from.",
                "tags": [
                    "public"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "ip": null,
                                        "version": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl https://api.c.nf/v1/public/ip"
            }
        },
        "/v1/public/geo": {
            "get": {
                "operationId": "public_geo",
                "summary": "The country this request came from, as resolved at the edge.",
                "tags": [
                    "public"
                ],
                "security": [],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "country": null,
                                        "known": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl https://api.c.nf/v1/public/geo"
            }
        },
        "/v1/public/fx": {
            "get": {
                "operationId": "public_fx",
                "summary": "Exchange rates for a base currency, refreshed hourly.",
                "tags": [
                    "public"
                ],
                "security": [],
                "parameters": [
                    {
                        "name": "base",
                        "in": "query",
                        "required": false,
                        "description": "ISO 4217 base currency. Defaults to USD.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "symbols",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated ISO 4217 codes to return. Defaults to all.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "base": null,
                                        "rates": null,
                                        "fetched_at": null,
                                        "cached": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl \"https://api.c.nf/v1/public/fx?base=EUR&symbols=USD,JPY\""
            }
        },
        "/v1/public/hash": {
            "get": {
                "operationId": "public_hash",
                "summary": "Hash a string with SHA-256 or another supported algorithm.",
                "tags": [
                    "public"
                ],
                "security": [],
                "parameters": [
                    {
                        "name": "value",
                        "in": "query",
                        "required": true,
                        "description": "The string to hash. Maximum 8192 bytes.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "algo",
                        "in": "query",
                        "required": false,
                        "description": "One of sha256, sha512, sha1, md5, crc32b. Defaults to sha256.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "algo": null,
                                        "hex": null,
                                        "base64": null,
                                        "length": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl \"https://api.c.nf/v1/public/hash?value=hello&algo=sha256\""
            }
        },
        "/v1/account/me": {
            "get": {
                "operationId": "account_me",
                "summary": "The account behind the token, its scopes, and the endpoints they open.",
                "tags": [
                    "account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user": null,
                                        "token_scopes": null,
                                        "usable_endpoints": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/account/me"
            }
        },
        "/v1/account/sessions": {
            "get": {
                "operationId": "account_sessions_list",
                "summary": "Every browser session currently signed in to this account.",
                "tags": [
                    "account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "account:read"
                ],
                "description": "Requires one of: account:read.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "sessions": null,
                                        "total": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/account/sessions"
            }
        },
        "/v1/account/sessions/revoke": {
            "post": {
                "operationId": "account_sessions_revoke",
                "summary": "Sign one session out.",
                "tags": [
                    "account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "account:write"
                ],
                "description": "Requires one of: account:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The session identifier from /v1/account/sessions."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "revoked": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":9}' https://api.c.nf/v1/account/sessions/revoke"
            }
        },
        "/v1/account/sessions/revoke-all": {
            "post": {
                "operationId": "account_sessions_revoke_all",
                "summary": "Sign every session out.",
                "tags": [
                    "account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "account:write"
                ],
                "description": "Requires one of: account:write.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "revoked": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/account/sessions/revoke-all"
            }
        },
        "/v1/account/profile": {
            "post": {
                "operationId": "account_profile_update",
                "summary": "Change your display name.",
                "tags": [
                    "account"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "account:write"
                ],
                "description": "Requires one of: account:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "field": {
                                        "type": "string",
                                        "description": "Only nickname may be changed here."
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "The new display name, up to 64 characters."
                                    }
                                },
                                "required": [
                                    "field",
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "value": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"field\":\"nickname\",\"value\":\"Ada\"}' https://api.c.nf/v1/account/profile"
            }
        },
        "/v1/dns/zones": {
            "get": {
                "operationId": "dns_zones_list",
                "summary": "Every zone this account has claimed.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:read"
                ],
                "description": "Requires one of: dns:read.",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "verified, pending, or all. Defaults to all.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zones": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones"
            },
            "post": {
                "operationId": "dns_zones_claim",
                "summary": "Claim a zone. An uncontested claim is instant; a contested one gets a TXT challenge.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "zone": {
                                        "type": "string",
                                        "description": "The apex domain to claim, for example example.com."
                                    }
                                },
                                "required": [
                                    "zone"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zone": null,
                                        "status": null,
                                        "verification": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"zone\":\"example.com\"}' https://api.c.nf/v1/dns/zones"
            }
        },
        "/v1/dns/zones/{zone}": {
            "get": {
                "operationId": "dns_zones_get",
                "summary": "One zone, with its verification instructions if it is still pending.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:read"
                ],
                "description": "Requires one of: dns:read.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zone": null,
                                        "status": null,
                                        "verification": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com"
            },
            "delete": {
                "operationId": "dns_zones_unclaim",
                "summary": "Release a claim. The records themselves are left alone.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zone": null,
                                        "released": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X DELETE -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com"
            }
        },
        "/v1/dns/zones/{zone}/verify": {
            "post": {
                "operationId": "dns_zones_verify",
                "summary": "Run the verification lookup and mark the zone verified if it matches.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zone": null,
                                        "status": null,
                                        "matched": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com/verify"
            }
        },
        "/v1/dns/zones/{zone}/records": {
            "get": {
                "operationId": "dns_records_list",
                "summary": "Every record in a verified zone.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:read"
                ],
                "description": "Requires one of: dns:read.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter by record type, for example A or MX.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "zone": null,
                                        "records": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com/records"
            },
            "post": {
                "operationId": "dns_records_create",
                "summary": "Add a record to a verified zone.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "A, AAAA, CNAME, MX, TXT, NS, SRV, CAA."
                                    },
                                    "host": {
                                        "type": "string",
                                        "description": "Subdomain label. Empty or @ means the apex."
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "The record value."
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "Seconds. Defaults to 3600."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "Required for MX and SRV."
                                    }
                                },
                                "required": [
                                    "type",
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "record": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"type\":\"A\",\"host\":\"api\",\"value\":\"192.0.2.10\"}' https://api.c.nf/v1/dns/zones/example.com/records"
            }
        },
        "/v1/dns/zones/{zone}/records/{id}": {
            "get": {
                "operationId": "dns_records_get",
                "summary": "A single record.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:read"
                ],
                "description": "Requires one of: dns:read.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The record identifier.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "record": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com/records/12345"
            },
            "patch": {
                "operationId": "dns_records_update",
                "summary": "Change part of a record; whatever you omit keeps its value.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The record identifier.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "type": "string",
                                        "description": "New value."
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "New TTL in seconds."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "New priority for MX and SRV."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "record": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X PATCH -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"ttl\":300}' https://api.c.nf/v1/dns/zones/example.com/records/12345"
            },
            "delete": {
                "operationId": "dns_records_delete",
                "summary": "Remove a record.",
                "tags": [
                    "dns"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "dns:write"
                ],
                "description": "Requires one of: dns:write.",
                "parameters": [
                    {
                        "name": "zone",
                        "in": "path",
                        "required": true,
                        "description": "The zone apex.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The record identifier.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X DELETE -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/dns/zones/example.com/records/12345"
            }
        },
        "/v1/cred": {
            "get": {
                "operationId": "cred_list",
                "summary": "Stored credentials, optionally filtered by platform.",
                "tags": [
                    "cred"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "cred:read",
                    "cred:write"
                ],
                "description": "Requires one of: cred:read, cred:write.",
                "parameters": [
                    {
                        "name": "platform",
                        "in": "query",
                        "required": false,
                        "description": "Case-insensitive substring filter on the platform name.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "creds": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/cred"
            },
            "post": {
                "operationId": "cred_create",
                "summary": "Store a credential.",
                "tags": [
                    "cred"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "cred:write"
                ],
                "description": "Requires one of: cred:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "description": "Site or service name. Maximum 255 characters."
                                    },
                                    "username": {
                                        "type": "string",
                                        "description": "Login name. Maximum 255 characters."
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Secret. Maximum 4096 characters."
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Defaults to the username."
                                    },
                                    "remarks": {
                                        "type": "string",
                                        "description": "Free-text note. Maximum 2000 characters."
                                    }
                                },
                                "required": [
                                    "platform",
                                    "username",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"platform\":\"example.com\",\"username\":\"me\",\"password\":\"s3cret\"}' https://api.c.nf/v1/cred"
            }
        },
        "/v1/files": {
            "get": {
                "operationId": "files_list",
                "summary": "Your stored files, newest first.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:read",
                    "files:write"
                ],
                "description": "Requires one of: files:read, files:write.",
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Filter by category.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "visibility",
                        "in": "query",
                        "required": false,
                        "description": "private or unlisted.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "1 to 500. Defaults to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Rows to skip. Defaults to 0.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "files": null,
                                        "total": null,
                                        "bytes_used": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/files"
            }
        },
        "/v1/files/{id}": {
            "get": {
                "operationId": "files_get",
                "summary": "One file, including its share link if it has one.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:read",
                    "files:write"
                ],
                "description": "Requires one of: files:read, files:write.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The file identifier.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "file": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/files/42"
            }
        },
        "/v1/files/download": {
            "get": {
                "operationId": "files_download",
                "summary": "Download a file.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:read",
                    "files:write"
                ],
                "description": "Requires one of: files:read, files:write.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "required": true,
                        "description": "The file identifier.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The file contents.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" -O -J \"https://api.c.nf/v1/files/download?id=42\""
            }
        },
        "/v1/files/upload": {
            "post": {
                "operationId": "files_upload",
                "summary": "Upload a file.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file part. Size is capped per account."
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Optional grouping label."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optional description."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "file": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -F file=@./report.pdf https://api.c.nf/v1/files/upload"
            }
        },
        "/v1/files/update": {
            "post": {
                "operationId": "files_update",
                "summary": "Edit a file’s details, including whether it is shared.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The file identifier."
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "description": "Shown in the console and on share pages."
                                    },
                                    "original_name": {
                                        "type": "string",
                                        "description": "Filename offered on download."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free-text description."
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Grouping label."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "private or unlisted. Switching to unlisted mints a share token."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "file": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":42,\"visibility\":\"unlisted\"}' https://api.c.nf/v1/files/update"
            }
        },
        "/v1/files/rename": {
            "post": {
                "operationId": "files_rename",
                "summary": "Change the name a file downloads as.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The file identifier."
                                    },
                                    "original_name": {
                                        "type": "string",
                                        "description": "New name. No slashes. Maximum 255 characters."
                                    }
                                },
                                "required": [
                                    "id",
                                    "original_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "renamed": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":42,\"original_name\":\"q3-report.pdf\"}' https://api.c.nf/v1/files/rename"
            }
        },
        "/v1/files/delete": {
            "post": {
                "operationId": "files_delete",
                "summary": "Delete a file and its contents.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The file identifier."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":42}' https://api.c.nf/v1/files/delete"
            }
        },
        "/v1/files/upload-chunk": {
            "post": {
                "operationId": "files_upload_chunk",
                "summary": "Send one part of a large upload.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "chunk": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "One part of the file, up to about 50 MB."
                                    },
                                    "index": {
                                        "type": "integer",
                                        "description": "Zero-based part number."
                                    },
                                    "total": {
                                        "type": "integer",
                                        "description": "How many parts there are, 1 to 400."
                                    },
                                    "filename": {
                                        "type": "string",
                                        "description": "Required on the first part."
                                    },
                                    "id": {
                                        "type": "string",
                                        "description": "Upload session id; omit on the first part and reuse what comes back."
                                    }
                                },
                                "required": [
                                    "chunk",
                                    "index",
                                    "total"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": null,
                                        "received_bytes": null,
                                        "received_chunks": null,
                                        "expected_chunks": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -F index=0 -F total=3 -F filename=big.zip -F chunk=@part0 https://api.c.nf/v1/files/upload-chunk"
            }
        },
        "/v1/files/upload-finalize": {
            "post": {
                "operationId": "files_upload_finalize",
                "summary": "Assemble the parts into a file.",
                "tags": [
                    "files"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "files:write"
                ],
                "description": "Requires one of: files:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "The upload session id."
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "description": "Label shown in the console."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free-text description."
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Grouping label."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "private or unlisted."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "file": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":\"u_abc123\"}' https://api.c.nf/v1/files/upload-finalize"
            }
        },
        "/v1/cdn/stats": {
            "get": {
                "operationId": "cdn_stats",
                "summary": "Cache settings and request counts for your shared files.",
                "tags": [
                    "cdn"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "cdn:read"
                ],
                "description": "Requires one of: cdn:read.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "files": null,
                                        "totals": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/cdn/stats"
            }
        },
        "/v1/cdn/config": {
            "post": {
                "operationId": "cdn_config",
                "summary": "Set how long the edge keeps a file, or stop serving it.",
                "tags": [
                    "cdn"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "cdn:write"
                ],
                "description": "Requires one of: cdn:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file_id": {
                                        "type": "integer",
                                        "description": "One of your files, shared as unlisted."
                                    },
                                    "ttl": {
                                        "type": "integer",
                                        "description": "Edge cache lifetime in seconds, 0 to 31536000."
                                    },
                                    "enabled": {
                                        "type": "integer",
                                        "description": "1 to serve through the CDN, 0 to stop."
                                    }
                                },
                                "required": [
                                    "file_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "file_id": null,
                                        "cache_ttl": null,
                                        "enabled": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"file_id\":42,\"ttl\":3600}' https://api.c.nf/v1/cdn/config"
            }
        },
        "/v1/cdn/purge": {
            "post": {
                "operationId": "cdn_purge",
                "summary": "Drop a file from the edge cache now.",
                "tags": [
                    "cdn"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "cdn:write"
                ],
                "description": "Requires one of: cdn:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file_id": {
                                        "type": "integer",
                                        "description": "One of your files."
                                    }
                                },
                                "required": [
                                    "file_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "purged_at": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"file_id\":42}' https://api.c.nf/v1/cdn/purge"
            }
        },
        "/v1/sms/messages": {
            "get": {
                "operationId": "sms_messages",
                "summary": "Messages forwarded to your account.",
                "tags": [
                    "sms"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sms:read"
                ],
                "description": "Requires one of: sms:read.",
                "parameters": [
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "description": "Return only messages with an id above this one.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many to return.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "messages": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/sms/messages"
            }
        },
        "/v1/sms/keys": {
            "get": {
                "operationId": "sms_keys_list",
                "summary": "The forwarder keys your devices use.",
                "tags": [
                    "sms"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sms:read",
                    "sms:write"
                ],
                "description": "Requires one of: sms:read, sms:write.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "keys": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/sms/keys"
            },
            "post": {
                "operationId": "sms_keys_create",
                "summary": "Issue a forwarder key. Five at a time.",
                "tags": [
                    "sms"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sms:write"
                ],
                "description": "Requires one of: sms:write.",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "A label for the device. Five keys maximum."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "key": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"name\":\"pixel\"}' https://api.c.nf/v1/sms/keys"
            },
            "delete": {
                "operationId": "sms_keys_revoke",
                "summary": "Revoke a forwarder key.",
                "tags": [
                    "sms"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sms:write"
                ],
                "description": "Requires one of: sms:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The forwarder key identifier."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "revoked": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X DELETE -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":3}' https://api.c.nf/v1/sms/keys"
            }
        },
        "/v1/sites": {
            "get": {
                "operationId": "sites_list",
                "summary": "Your static sites, most recently deployed first.",
                "tags": [
                    "sites"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sites:read",
                    "sites:write"
                ],
                "description": "Requires one of: sites:read, sites:write.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "sites": null,
                                        "total": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/sites"
            }
        },
        "/v1/sites/deploy": {
            "post": {
                "operationId": "sites_deploy",
                "summary": "Deploy a zip as a site.",
                "tags": [
                    "sites"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sites:write"
                ],
                "description": "Requires one of: sites:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "A zip of the site, up to 50 MB. It is expanded into your storage."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "3 to 63 lowercase letters, digits or hyphens. Unique across all accounts."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name, up to 128 characters."
                                    }
                                },
                                "required": [
                                    "file",
                                    "slug",
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "site": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -F file=@./site.zip -F slug=docs -F name=Docs https://api.c.nf/v1/sites/deploy"
            }
        },
        "/v1/sites/delete": {
            "post": {
                "operationId": "sites_delete",
                "summary": "Delete a site and its files.",
                "tags": [
                    "sites"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "sites:write"
                ],
                "description": "Requires one of: sites:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The site identifier."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":4}' https://api.c.nf/v1/sites/delete"
            }
        },
        "/v1/deployments": {
            "get": {
                "operationId": "deploy_list",
                "summary": "Your deployments and how often each has been used.",
                "tags": [
                    "deploy"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "deploy:read",
                    "deploy:write"
                ],
                "description": "Requires one of: deploy:read, deploy:write.",
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deployments": null,
                                        "total": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/deployments"
            }
        },
        "/v1/deployments/toggle": {
            "post": {
                "operationId": "deploy_toggle",
                "summary": "Enable or disable a deployment.",
                "tags": [
                    "deploy"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "deploy:write"
                ],
                "description": "Requires one of: deploy:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The deployment identifier."
                                    },
                                    "enabled": {
                                        "type": "integer",
                                        "description": "1 to enable, 0 to disable."
                                    }
                                },
                                "required": [
                                    "id",
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":7,\"enabled\":0}' https://api.c.nf/v1/deployments/toggle"
            }
        },
        "/v1/deployments/delete": {
            "post": {
                "operationId": "deploy_delete",
                "summary": "Delete a deployment.",
                "tags": [
                    "deploy"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "deploy:write"
                ],
                "description": "Requires one of: deploy:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "description": "The deployment identifier."
                                    }
                                },
                                "required": [
                                    "id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"id\":7}' https://api.c.nf/v1/deployments/delete"
            }
        },
        "/v1/domains": {
            "get": {
                "operationId": "domain_list",
                "summary": "Your domains, soonest to expire first.",
                "tags": [
                    "domain"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "domain:read",
                    "domain:write"
                ],
                "description": "Requires one of: domain:read, domain:write.",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by status, for example active.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "expiring",
                        "in": "query",
                        "required": false,
                        "description": "Only domains expiring within this many days.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "1 to 1000. Defaults to 200.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Rows to skip.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "domains": null,
                                        "total": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" \"https://api.c.nf/v1/domains?expiring=30\""
            }
        },
        "/v1/domains/whois-sync": {
            "post": {
                "operationId": "domain_whois_sync",
                "summary": "Refresh one domain from its registry record.",
                "tags": [
                    "domain"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "domain:write"
                ],
                "description": "Requires one of: domain:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "udid": {
                                        "type": "string",
                                        "description": "The portfolio identifier of one of your domains."
                                    }
                                },
                                "required": [
                                    "udid"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "domain": null,
                                        "updated": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"udid\":\"d_0a1b2c\"}' https://api.c.nf/v1/domains/whois-sync"
            }
        },
        "/v1/packages": {
            "get": {
                "operationId": "packages_list",
                "summary": "Your packages, with version counts and download totals.",
                "tags": [
                    "packages"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "packages:read",
                    "packages:write"
                ],
                "description": "Requires one of: packages:read, packages:write.",
                "parameters": [
                    {
                        "name": "visibility",
                        "in": "query",
                        "required": false,
                        "description": "public, unlisted, or private.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "packages": null,
                                        "total": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/packages"
            }
        },
        "/v1/packages/{slug}": {
            "get": {
                "operationId": "packages_get",
                "summary": "One package, with every version and artifact.",
                "tags": [
                    "packages"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "packages:read",
                    "packages:write"
                ],
                "description": "Requires one of: packages:read, packages:write.",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The package slug.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "package": null,
                                        "versions": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" https://api.c.nf/v1/packages/my-tool"
            }
        },
        "/v1/packages/publish": {
            "post": {
                "operationId": "packages_publish",
                "summary": "Publish a version, creating the package if it is new.",
                "tags": [
                    "packages"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "packages:write"
                ],
                "description": "Requires one of: packages:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "slug": {
                                        "type": "string",
                                        "description": "URL-safe identifier, unique within the account."
                                    },
                                    "version": {
                                        "type": "string",
                                        "description": "Version string, for example 1.2.0."
                                    },
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The artifact to publish."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name. Defaults to the slug."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description."
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Grouping label."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "public, unlisted, or private."
                                    },
                                    "changelog": {
                                        "type": "string",
                                        "description": "Notes for this version."
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Artifact label when a version has several files."
                                    }
                                },
                                "required": [
                                    "slug",
                                    "version",
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "package": null,
                                        "version": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -F slug=my-tool -F version=1.2.0 -F file=@./my-tool-1.2.0.zip https://api.c.nf/v1/packages/publish"
            }
        },
        "/v1/packages/update": {
            "post": {
                "operationId": "packages_update",
                "summary": "Edit a package’s details.",
                "tags": [
                    "packages"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "packages:write"
                ],
                "description": "Requires one of: packages:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "slug": {
                                        "type": "string",
                                        "description": "The package slug. The slug itself cannot be changed."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Short description."
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Grouping label."
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon identifier."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "public, unlisted, or private."
                                    }
                                },
                                "required": [
                                    "slug"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "package": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"slug\":\"my-tool\",\"visibility\":\"public\"}' https://api.c.nf/v1/packages/update"
            }
        },
        "/v1/packages/delete": {
            "post": {
                "operationId": "packages_delete",
                "summary": "Delete a package, every version and every artifact.",
                "tags": [
                    "packages"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "packages:write"
                ],
                "description": "Requires one of: packages:write.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "slug": {
                                        "type": "string",
                                        "description": "The package slug."
                                    }
                                },
                                "required": [
                                    "slug"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "deleted": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -X POST -H \"Authorization: Bearer $CNF_TOKEN\" -d '{\"slug\":\"my-tool\"}' https://api.c.nf/v1/packages/delete"
            }
        },
        "/v1/whois": {
            "get": {
                "operationId": "whois_lookup",
                "summary": "Registration details for a domain.",
                "tags": [
                    "whois"
                ],
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "x-required-scopes": [
                    "whois:read"
                ],
                "description": "Requires one of: whois:read.",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "query",
                        "required": true,
                        "description": "The domain to look up. Unicode domains are punycoded for you.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "domain": null,
                                        "registrar": null,
                                        "created": null,
                                        "expires": null,
                                        "status": null,
                                        "nameservers": null
                                    },
                                    "request_id": "req_0123456789abcdef"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The token is missing, invalid, or revoked.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The token lacks the required scope, or the resource is not yours.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The request was malformed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such resource.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "x-example-curl": "curl -H \"Authorization: Bearer $CNF_TOKEN\" \"https://api.c.nf/v1/whois?domain=example.com\""
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "A key from https://console.c.nf/account/api, sent as `Authorization: Bearer cnf_<32 hex characters>`."
            }
        },
        "schemas": {
            "Success": {
                "type": "object",
                "required": [
                    "success",
                    "request_id"
                ],
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "data": {
                        "type": "object",
                        "description": "The endpoint payload."
                    },
                    "request_id": {
                        "type": "string",
                        "pattern": "^req_[0-9a-f]{16}$"
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "success",
                    "error",
                    "message",
                    "request_id"
                ],
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": false
                    },
                    "error": {
                        "type": "string",
                        "description": "Stable machine-readable code.",
                        "enum": [
                            "bad_request",
                            "unauthorized",
                            "forbidden_scope",
                            "forbidden_zone",
                            "not_found",
                            "method_not_allowed",
                            "unprocessable",
                            "upstream_error"
                        ]
                    },
                    "message": {
                        "type": "string",
                        "description": "Human description. Do not match on this."
                    },
                    "request_id": {
                        "type": "string",
                        "pattern": "^req_[0-9a-f]{16}$"
                    },
                    "details": {
                        "type": "object",
                        "description": "Present when the failure carries structured context."
                    }
                }
            }
        }
    },
    "x-scopes": {
        "dns:read": "Read DNS zones and records.",
        "dns:write": "Claim zones, verify them, and change records.",
        "cred:read": "Read stored credentials.",
        "cred:write": "Store credentials.",
        "files:read": "List and download your files.",
        "files:write": "Upload, edit, and delete your files.",
        "packages:read": "Read your packages and their versions.",
        "packages:write": "Publish, edit, and delete packages.",
        "whois:read": "Look up domain registration data.",
        "cdn:read": "Read CDN settings and traffic for your shared files.",
        "cdn:write": "Change CDN caching and purge the edge.",
        "sms:read": "Read forwarded messages and your forwarder keys.",
        "sms:write": "Create and revoke forwarder keys.",
        "sites:read": "List your static sites.",
        "sites:write": "Deploy and delete static sites.",
        "deploy:read": "List your deployments.",
        "deploy:write": "Enable, disable, and delete deployments.",
        "domain:read": "Read your domain portfolio.",
        "domain:write": "Refresh registration data on your domains.",
        "account:read": "Read your profile and active sessions.",
        "account:write": "Change your display name and revoke your sessions.",
        "*": "Every scope, including scopes added later."
    }
}