{
    "openapi": "3.1.0",
    "info": {
        "title": "PNLCS API",
        "version": "1.0.0",
        "description": "The PNLCS billing and client management API. Every call is answered as the staff account the credential belongs to, with that account's permissions.",
        "license": {
            "name": "MIT",
            "identifier": "MIT"
        }
    },
    "servers": [
        {
            "url": "{baseUrl}",
            "variables": {
                "baseUrl": {
                    "default": "https://example.com",
                    "description": "Your PNLCS address"
                }
            }
        }
    ],
    "security": [
        {
            "apiKey": [],
            "apiSecret": []
        }
    ],
    "tags": [
        {
            "name": "Clients"
        },
        {
            "name": "Invoices & Billing"
        },
        {
            "name": "Orders"
        },
        {
            "name": "Services & Products"
        },
        {
            "name": "Domains"
        },
        {
            "name": "Support Tickets"
        },
        {
            "name": "Quotes"
        },
        {
            "name": "Projects"
        },
        {
            "name": "Affiliates"
        },
        {
            "name": "SSL Certificates"
        },
        {
            "name": "API Credentials"
        },
        {
            "name": "System"
        }
    ],
    "paths": {
        "/api/v1/acceptorder": {
            "post": {
                "operationId": "acceptorder",
                "summary": "Accept/approve a pending order",
                "tags": [
                    "Orders"
                ],
                "description": "What the Accept button does: every service on the order is created on its server (products set to manual setup included), ordered domains are registered, and the order becomes Active. A service whose server refuses stays pending and is queued for retry. Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/acceptorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/acceptorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/acceptquote": {
            "post": {
                "operationId": "acceptquote",
                "summary": "Accept a quote and raise its invoice",
                "tags": [
                    "Quotes"
                ],
                "description": "Raises the invoice, as the client Accept button does. Accepting an accepted quote changes nothing. Permission: manage_quotes.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/acceptquote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/acceptquote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such quote.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/activatemodule": {
            "post": {
                "operationId": "activatemodule",
                "summary": "Switch a module on",
                "tags": [
                    "System"
                ],
                "description": "The same switch as Setup > Modules in the admin area. Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/activatemodule"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/activatemodule"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such module is installed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The switch refused the change.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addannouncement": {
            "post": {
                "operationId": "addannouncement",
                "summary": "Create a new announcement",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_announcements.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addannouncement"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addannouncement"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addbannedip": {
            "post": {
                "operationId": "addbannedip",
                "summary": "Ban an IP address or range",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_security.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addbannedip"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addbannedip"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addbillableitem": {
            "post": {
                "operationId": "addbillableitem",
                "summary": "Add a billable item for a client",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: create_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addbillableitem"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addbillableitem"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addcancelrequest": {
            "post": {
                "operationId": "addcancelrequest",
                "summary": "Request cancellation of a service",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addcancelrequest"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addcancelrequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A request is already open for it.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The service is terminated, cancelled or fraud.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addclient": {
            "post": {
                "operationId": "addclient",
                "summary": "Create a new client account",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: create_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addclient"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addclient"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "A required field is missing, or the address is already a client or a login.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addclientnote": {
            "post": {
                "operationId": "addclientnote",
                "summary": "Add a note to a client's account",
                "tags": [
                    "Clients"
                ],
                "description": "Signed with the user name of the staff member the credential belongs to. Permission: create_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addclientnote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addclientnote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The note is empty.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addcontact": {
            "post": {
                "operationId": "addcontact",
                "summary": "Add a sub-contact to a client",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: create_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addcontact"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addcontact"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addcredit": {
            "post": {
                "operationId": "addcredit",
                "summary": "Add credit to a client's account balance",
                "tags": [
                    "Clients"
                ],
                "description": "Adds to the client credit balance and records the entry in one step. Permission: create_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addcredit"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addcredit"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addinvoicepayment": {
            "post": {
                "operationId": "addinvoicepayment",
                "summary": "Record a manual payment for an invoice",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "A part payment leaves the invoice partly paid; an overpayment becomes credit. When the invoice is paid, whatever waits on it (provisioning, unsuspension, an upgrade) runs. Permission: create_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addinvoicepayment"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addinvoicepayment"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such invoice.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The payment could not be recorded.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addorder": {
            "post": {
                "operationId": "addorder",
                "summary": "Create a new order for a client",
                "tags": [
                    "Orders"
                ],
                "description": "Built the way the shop builds an order: the services, the invoice and the order confirmation. Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No product could be ordered, or a field is not valid.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addpaymethod": {
            "post": {
                "operationId": "addpaymethod",
                "summary": "Add a stored payment method (not available)",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Always answers 501: a card is stored through the gateway's own form, with the customer there for 3-D Secure. Card numbers never pass through PNLCS. The customer adds it in the client area. Permission: create_invoices.",
                "responses": {
                    "501": {
                        "description": "Always answers 501: a card is stored through the gateway's own form, with the customer there for 3-D Secure. Card numbers never pass through PNLCS. The customer adds it in the client area.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addproduct": {
            "post": {
                "operationId": "addproduct",
                "summary": "Create a new product/package",
                "tags": [
                    "Services & Products"
                ],
                "description": "Created as the product screen creates it. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addproduct"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addproduct"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addprojectmessage": {
            "post": {
                "operationId": "addprojectmessage",
                "summary": "Add a message/comment to a project",
                "tags": [
                    "Projects"
                ],
                "description": "Signed with the user name of the staff member the credential belongs to. Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addprojectmessage"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addprojectmessage"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such project.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addprojecttask": {
            "post": {
                "operationId": "addprojecttask",
                "summary": "Add a task to a project",
                "tags": [
                    "Projects"
                ],
                "description": "Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addprojecttask"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addprojecttask"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such project.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addsslorder": {
            "post": {
                "operationId": "addsslorder",
                "summary": "Create an SSL certificate order",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Created as Awaiting Configuration. Send the CSR with configsslorder. Permission: full administrator only.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addsslorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addsslorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addticketnote": {
            "post": {
                "operationId": "addticketnote",
                "summary": "Add a staff note to a ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addticketnote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addticketnote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addticketreply": {
            "post": {
                "operationId": "addticketreply",
                "summary": "Add a reply to an existing ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "The ticket status and the notification mails follow, as for a reply from the panel. Permission: reply_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addticketreply"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addticketreply"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/addtransaction": {
            "post": {
                "operationId": "addtransaction",
                "summary": "Add a manual transaction record",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "A ledger line only. To pay an invoice, use addinvoicepayment. Permission: create_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/addtransaction"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/addtransaction"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/adduser": {
            "post": {
                "operationId": "adduser",
                "summary": "Create a client-area login",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: create_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/adduser"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/adduser"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/affiliateactivate": {
            "post": {
                "operationId": "affiliateactivate",
                "summary": "Make a client an affiliate",
                "tags": [
                    "Affiliates"
                ],
                "description": "Makes the client an affiliate on 10 percent commission; an affiliate already is left as it is. Permission: manage_affiliates.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/affiliateactivate"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/affiliateactivate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/applycredit": {
            "post": {
                "operationId": "applycredit",
                "summary": "Apply client credit to an invoice",
                "tags": [
                    "Clients"
                ],
                "description": "Spends existing credit on an invoice. To give a client credit, use addcredit. Permission: manage_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/applycredit"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/applycredit"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "clientid is not the owner of the invoice, or the amount is more than the balance.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such invoice.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/blockticketsender": {
            "post": {
                "operationId": "blockticketsender",
                "summary": "Block a ticket sender",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Adds the address to the ticket spam filter: no more tickets from it, by mail or by form. Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/blockticketsender"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/blockticketsender"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The ticket has no sender address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/cancelorder": {
            "post": {
                "operationId": "cancelorder",
                "summary": "Cancel an order",
                "tags": [
                    "Orders"
                ],
                "description": "What the Cancel button does: live accounts are terminated on their servers, the other services and the domains are cancelled, and the invoice is cancelled unless it was paid in full (what was paid becomes credit). Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/cancelorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/cancelorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/cancelsslorder": {
            "post": {
                "operationId": "cancelsslorder",
                "summary": "Revoke an SSL certificate",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Revokes the certificate at the provider. Permission: full administrator only.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/cancelsslorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/cancelsslorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The SSL provider could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/capturepayment": {
            "post": {
                "operationId": "capturepayment",
                "summary": "Charge a stored payment method (not available)",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Always answers 501: charging a stored card from the API is not implemented. The payment is taken in the client area or by the automatic payment run. Permission: manage_invoices.",
                "responses": {
                    "501": {
                        "description": "Always answers 501: charging a stored card from the API is not implemented. The payment is taken in the client area or by the automatic payment run.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/closeclient": {
            "post": {
                "operationId": "closeclient",
                "summary": "Close a client account",
                "tags": [
                    "Clients"
                ],
                "description": "Sets the status to closed. Nothing is deleted. Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/closeclient"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/closeclient"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/configsslorder": {
            "post": {
                "operationId": "configsslorder",
                "summary": "Send the CSR and details for an SSL order",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Answers result success or error with the provider message. Permission: full administrator only.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/configsslorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/configsslorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The SSL provider could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createclientinvite": {
            "post": {
                "operationId": "createclientinvite",
                "summary": "Invite someone to a client account",
                "tags": [
                    "Clients"
                ],
                "description": "The person gets an email with a link that is valid for 7 days. They create a login or sign in with theirs, and join the account with these permissions. Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createclientinvite"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createclientinvite"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "That address already has a login on the account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An unknown permission was named.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createinvoice": {
            "post": {
                "operationId": "createinvoice",
                "summary": "Create a new invoice",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Totals, tax and the client group discount are worked out as for any other invoice. Permission: create_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createinvoice"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createinvoice"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No line was sent, or a line has no amount.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createoauthcredential": {
            "post": {
                "operationId": "createoauthcredential",
                "summary": "Create an API credential",
                "tags": [
                    "API Credentials"
                ],
                "description": "The new credential belongs to the staff member whose credential made the call, with that account's permissions. Permission: manage_staff.",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createoauthcredential"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createoauthcredential"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An allowed_ips entry is not an address or a range.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createorupdatetld": {
            "post": {
                "operationId": "createorupdatetld",
                "summary": "Create or update a domain extension and its prices",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_servers.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createorupdatetld"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createorupdatetld"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createproject": {
            "post": {
                "operationId": "createproject",
                "summary": "Create a new project",
                "tags": [
                    "Projects"
                ],
                "description": "Owned by the staff member the credential belongs to. Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createproject"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createproject"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createquote": {
            "post": {
                "operationId": "createquote",
                "summary": "Create a new quote for a client",
                "tags": [
                    "Quotes"
                ],
                "description": "Created as a Draft. Send it with sendquote. Permission: manage_quotes.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createquote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createquote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/createssotoken": {
            "post": {
                "operationId": "createssotoken",
                "summary": "Create a one-time sign-in link to the client area",
                "tags": [
                    "Clients"
                ],
                "description": "The link works once and for 60 seconds. Only its hash is stored. Needs the same permission as signing in as a client from the admin area (edit_clients). Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/createssotoken"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/createssotoken"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The account has no login to sign in as.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unknown destination, or it is not on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deactivatemodule": {
            "post": {
                "operationId": "deactivatemodule",
                "summary": "Switch a module off",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deactivatemodule"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deactivatemodule"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such module is installed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "A server or SSL module that is in use stays on.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/decryptpassword": {
            "post": {
                "operationId": "decryptpassword",
                "summary": "Decrypt a value (not available)",
                "tags": [
                    "System"
                ],
                "description": "Always answers 501, for the same reason as encryptpassword. Permission: manage_settings.",
                "responses": {
                    "501": {
                        "description": "Always answers 501, for the same reason as encryptpassword.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteannouncement": {
            "post": {
                "operationId": "deleteannouncement",
                "summary": "Delete an announcement",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_announcements.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteannouncement"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteannouncement"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No announcement with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteclient": {
            "post": {
                "operationId": "deleteclient",
                "summary": "Delete a client account",
                "tags": [
                    "Clients"
                ],
                "description": "Terminate the services first, as in the admin area, so the accounts are really closed on the servers. Permission: delete_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteclient"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteclient"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The client still has services that are not terminated, or registered domains.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deletecontact": {
            "post": {
                "operationId": "deletecontact",
                "summary": "Delete a sub-contact",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: delete_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deletecontact"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deletecontact"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such contact.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteoauthcredential": {
            "post": {
                "operationId": "deleteoauthcredential",
                "summary": "Delete an API credential",
                "tags": [
                    "API Credentials"
                ],
                "description": "Permission: manage_staff.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteoauthcredential"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteoauthcredential"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such credential.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteorder": {
            "post": {
                "operationId": "deleteorder",
                "summary": "Delete an order",
                "tags": [
                    "Orders"
                ],
                "description": "Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deletepaymethod": {
            "post": {
                "operationId": "deletepaymethod",
                "summary": "Remove a stored payment method",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "PNLCS stops using it at once; the gateway is asked to forget it on the next run, as when the customer removes it. Permission: manage_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deletepaymethod"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deletepaymethod"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The client has no such payment method.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteprojecttask": {
            "post": {
                "operationId": "deleteprojecttask",
                "summary": "Delete a task from a project",
                "tags": [
                    "Projects"
                ],
                "description": "Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteprojecttask"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteprojecttask"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such task.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deletequote": {
            "post": {
                "operationId": "deletequote",
                "summary": "Delete a quote",
                "tags": [
                    "Quotes"
                ],
                "description": "Permission: manage_quotes.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deletequote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deletequote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such quote.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteticket": {
            "post": {
                "operationId": "deleteticket",
                "summary": "Delete a ticket and all its replies",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticket"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticket"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteticketnote": {
            "post": {
                "operationId": "deleteticketnote",
                "summary": "Delete a staff note from a ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticketnote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticketnote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such note.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteticketreply": {
            "post": {
                "operationId": "deleteticketreply",
                "summary": "Delete a specific ticket reply",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: reply_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticketreply"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteticketreply"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such reply.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/deleteuserclient": {
            "post": {
                "operationId": "deleteuserclient",
                "summary": "Remove a login from a client account",
                "tags": [
                    "Clients"
                ],
                "description": "Only the link goes: the login keeps any other accounts it belongs to. Permission: delete_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteuserclient"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/deleteuserclient"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such login, or it is not on that account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domaingetlockingstatus": {
            "get": {
                "operationId": "domaingetlockingstatus",
                "summary": "Get the registrar lock status of a domain",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: list_domains.",
                "parameters": [
                    {
                        "name": "domainid",
                        "in": "query",
                        "required": true,
                        "description": "The domain.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No registrar module is set on the domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The registrar could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domaingetnameservers": {
            "get": {
                "operationId": "domaingetnameservers",
                "summary": "Get the nameservers of a domain",
                "tags": [
                    "Domains"
                ],
                "description": "The nameservers PNLCS has on record. Permission: list_domains.",
                "parameters": [
                    {
                        "name": "domainid",
                        "in": "query",
                        "required": true,
                        "description": "The domain.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domaingetwhoisinfo": {
            "get": {
                "operationId": "domaingetwhoisinfo",
                "summary": "Get the contact details of a domain",
                "tags": [
                    "Domains"
                ],
                "description": "Built from the client record in PNLCS, not read from the registrar. Permission: list_domains.",
                "parameters": [
                    {
                        "name": "domainid",
                        "in": "query",
                        "required": true,
                        "description": "The domain.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainregister": {
            "post": {
                "operationId": "domainregister",
                "summary": "Register a new domain",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domainregister"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domainregister"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The name is not a domain, or the registrar is unknown.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainrelease": {
            "post": {
                "operationId": "domainrelease",
                "summary": "Release a domain to another registrar",
                "tags": [
                    "Domains"
                ],
                "description": "Always answers 501: no registrar module implements a release. Use domainrequestepp to get the transfer code. Permission: manage_domains.",
                "responses": {
                    "501": {
                        "description": "Always answers 501: no registrar module implements a release. Use domainrequestepp to get the transfer code.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainrenew": {
            "post": {
                "operationId": "domainrenew",
                "summary": "Renew an existing domain",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domainrenew"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domainrenew"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainrequestepp": {
            "get": {
                "operationId": "domainrequestepp",
                "summary": "Get the transfer (EPP) code of a domain",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: list_domains.",
                "parameters": [
                    {
                        "name": "domainid",
                        "in": "query",
                        "required": true,
                        "description": "The domain.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No registrar module, or the registrar returned no code (its message is passed on).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The registrar could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domaintoggleidprotect": {
            "post": {
                "operationId": "domaintoggleidprotect",
                "summary": "Turn ID protection on or off",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domaintoggleidprotect"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domaintoggleidprotect"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domaintransfer": {
            "post": {
                "operationId": "domaintransfer",
                "summary": "Transfer a domain to this registrar",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domaintransfer"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domaintransfer"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No registrar module is set on the domain, or the registrar refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainupdatelockingstatus": {
            "post": {
                "operationId": "domainupdatelockingstatus",
                "summary": "Lock or unlock a domain at the registrar",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domainupdatelockingstatus"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domainupdatelockingstatus"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No registrar module, or the registrar refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The registrar could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainupdatenameservers": {
            "post": {
                "operationId": "domainupdatenameservers",
                "summary": "Change the nameservers of a domain",
                "tags": [
                    "Domains"
                ],
                "description": "Sent to the registrar, as from the client area. Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/domainupdatenameservers"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/domainupdatenameservers"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The registrar did not accept them.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainupdatewhoisinfo": {
            "post": {
                "operationId": "domainupdatewhoisinfo",
                "summary": "Change the contact details of a domain (not available)",
                "tags": [
                    "Domains"
                ],
                "description": "Always answers 501: no registrar module implements a contact update. Change the contacts at the registrar. Permission: manage_domains.",
                "responses": {
                    "501": {
                        "description": "Always answers 501: no registrar module implements a contact update. Change the contacts at the registrar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/domainwhois": {
            "get": {
                "operationId": "domainwhois",
                "summary": "Check whether a domain is available to register",
                "tags": [
                    "Domains"
                ],
                "description": "The same check as the domain search in the shop. Permission: list_domains.",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "query",
                        "required": true,
                        "description": "The name to check.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The name is not a domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "No registrar or WHOIS server answered, so availability is unknown.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/encryptpassword": {
            "post": {
                "operationId": "encryptpassword",
                "summary": "Encrypt a value (not available)",
                "tags": [
                    "System"
                ],
                "description": "Always answers 501. Encrypting with the application key through the API was withdrawn: the same key protects the database. Permission: manage_settings.",
                "responses": {
                    "501": {
                        "description": "Always answers 501. Encrypting with the application key through the API was withdrawn: the same key protects the database.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/endtasktimer": {
            "post": {
                "operationId": "endtasktimer",
                "summary": "Stop a task timer",
                "tags": [
                    "Projects"
                ],
                "description": "Ending a timer that has already ended changes nothing and reports it again. Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/endtasktimer"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/endtasktimer"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such timer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/fraudorder": {
            "post": {
                "operationId": "fraudorder",
                "summary": "Mark an order as fraudulent",
                "tags": [
                    "Orders"
                ],
                "description": "What the Fraud button does: active services are suspended (on their servers), and the invoice is cancelled unless it was paid in full. Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/fraudorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/fraudorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/geninvoices": {
            "post": {
                "operationId": "geninvoices",
                "summary": "Generate the invoices that are due",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Runs the invoice generation for every service that is due, like the daily cron. It cannot be limited to one client; to bill one client, use createinvoice. Permission: manage_invoices.",
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "A filter (clientid, serviceids, domainids, addonids) was sent.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getactivitylog": {
            "get": {
                "operationId": "getactivitylog",
                "summary": "List the activity log",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_activity_log.",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Only entries from this day (YYYY-MM-DD).",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "user",
                        "in": "query",
                        "required": false,
                        "description": "Only entries written by this user name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getadmindetails": {
            "get": {
                "operationId": "getadmindetails",
                "summary": "Get a staff account (the caller by default)",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_staff.",
                "parameters": [
                    {
                        "name": "adminid",
                        "in": "query",
                        "required": false,
                        "description": "The staff account. Left out: the owner of the credential.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No staff account with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getadminusers": {
            "get": {
                "operationId": "getadminusers",
                "summary": "List the staff accounts",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_staff.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getaffiliates": {
            "get": {
                "operationId": "getaffiliates",
                "summary": "List affiliates",
                "tags": [
                    "Affiliates"
                ],
                "description": "Each affiliate carries its client. Permission: manage_affiliates.",
                "parameters": [
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getannouncements": {
            "get": {
                "operationId": "getannouncements",
                "summary": "List the published announcements",
                "tags": [
                    "System"
                ],
                "description": "Published announcements only, newest first. Permission: manage_announcements.",
                "parameters": [
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getautomationlog": {
            "get": {
                "operationId": "getautomationlog",
                "summary": "List the activity log (automation)",
                "tags": [
                    "System"
                ],
                "description": "The same log as getactivitylog. Permission: view_activity_log.",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Only entries from this day (YYYY-MM-DD).",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "user",
                        "in": "query",
                        "required": false,
                        "description": "Only entries written by this user name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getcancelledpackages": {
            "get": {
                "operationId": "getcancelledpackages",
                "summary": "List cancellation requests",
                "tags": [
                    "Services & Products"
                ],
                "description": "The cancellation requests, newest first, each with its service. Permission: list_services.",
                "parameters": [
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientgroups": {
            "get": {
                "operationId": "getclientgroups",
                "summary": "List all client groups",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientpassword": {
            "get": {
                "operationId": "getclientpassword",
                "summary": "Read a client password (not available)",
                "tags": [
                    "Clients"
                ],
                "description": "Always answers 403: passwords are stored hashed and cannot be read back. Use resetpassword to send a reset link. Permission: list_clients.",
                "parameters": [],
                "responses": {
                    "403": {
                        "description": "Always answers 403: passwords are stored hashed and cannot be read back. Use resetpassword to send a reset link.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclients": {
            "get": {
                "operationId": "getclients",
                "summary": "List clients with optional search/filtering",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Matches first name, last name, email or company name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "active, inactive or closed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "required": false,
                        "description": "Only clients in this client group.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "orderby",
                        "in": "query",
                        "required": false,
                        "description": "id (default), first_name, last_name, email, company_name, status or created_at.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sorting",
                        "in": "query",
                        "required": false,
                        "description": "ASC (default) or DESC.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientsaddons": {
            "get": {
                "operationId": "getclientsaddons",
                "summary": "Get all addons for a client",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: list_services.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's addons. userid is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "serviceid",
                        "in": "query",
                        "required": false,
                        "description": "Only this service's addons.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientsdetails": {
            "get": {
                "operationId": "getclientsdetails",
                "summary": "Get full details for a single client",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "The client. Required unless email is sent.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "Find the client by address instead.",
                        "schema": {
                            "type": "string",
                            "format": "email"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Neither clientid nor email was sent.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientsdomains": {
            "get": {
                "operationId": "getclientsdomains",
                "summary": "List domains for a specific client",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: list_domains.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's domains. userid is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "domainid",
                        "in": "query",
                        "required": false,
                        "description": "One domain.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "description": "Domains whose name contains this.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, active, grace, redemption, expired, cancelled, fraud or transferred_away.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getclientsproducts": {
            "get": {
                "operationId": "getclientsproducts",
                "summary": "List services/products for a client",
                "tags": [
                    "Services & Products"
                ],
                "description": "Each service carries its client and product. Permission: list_services.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's services. userid is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "serviceid",
                        "in": "query",
                        "required": false,
                        "description": "One service.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "pid",
                        "in": "query",
                        "required": false,
                        "description": "Only services of this product.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "required": false,
                        "description": "Only the service for this exact domain.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, active, suspended, terminated, cancelled, fraud or completed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getconfigurationvalue": {
            "get": {
                "operationId": "getconfigurationvalue",
                "summary": "Read a setting",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [
                    {
                        "name": "setting",
                        "in": "query",
                        "required": true,
                        "description": "The setting name, as stored (for example CompanyName).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The setting holds a credential: any name containing password, secret, token, key, access hash, credential or sid.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getcontacts": {
            "get": {
                "operationId": "getcontacts",
                "summary": "Get sub-contacts for a client",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's contacts.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getcredits": {
            "get": {
                "operationId": "getcredits",
                "summary": "List credit entries",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's credit history.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getcurrencies": {
            "get": {
                "operationId": "getcurrencies",
                "summary": "List all configured currencies",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: list_invoices.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getemails": {
            "get": {
                "operationId": "getemails",
                "summary": "List the mail sent to clients",
                "tags": [
                    "System"
                ],
                "description": "The log of mail sent to clients, newest first. Permission: list_clients.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only mail sent to this client.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getemailtemplates": {
            "get": {
                "operationId": "getemailtemplates",
                "summary": "List the email templates",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_email_templates.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gethealthstatus": {
            "get": {
                "operationId": "gethealthstatus",
                "summary": "Check system health and service status",
                "tags": [
                    "System"
                ],
                "description": "For an uptime monitor use GET /api/health instead: it needs no credential and answers only up or down. Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getinvoice": {
            "get": {
                "operationId": "getinvoice",
                "summary": "Get a single invoice with line items",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: list_invoices.",
                "parameters": [
                    {
                        "name": "invoiceid",
                        "in": "query",
                        "required": true,
                        "description": "The invoice.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such invoice.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getinvoices": {
            "get": {
                "operationId": "getinvoices",
                "summary": "List invoices with optional filtering",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Newest first. Each invoice carries its client. Permission: list_invoices.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's invoices.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "draft, unpaid, paid, partially_paid, overdue, cancelled, refunded, collections or payment_pending.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getmoduleconfigurationparameters": {
            "get": {
                "operationId": "getmoduleconfigurationparameters",
                "summary": "List the settings a module asks for",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [
                    {
                        "name": "moduleType",
                        "in": "query",
                        "required": true,
                        "description": "server, gateway, registrar, ssl or addon.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "moduleName",
                        "in": "query",
                        "required": true,
                        "description": "The module name.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such module is installed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getmodulequeue": {
            "get": {
                "operationId": "getmodulequeue",
                "summary": "List server actions waiting to be retried",
                "tags": [
                    "System"
                ],
                "description": "Server actions waiting to be retried. Each row carries id, service_id, action, status, attempts, max_attempts, next_attempt_at, last_error, completed_at, created_at; the payload is never returned. Permission: list_services.",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, completed, failed or cancelled. Default: pending and failed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getorders": {
            "get": {
                "operationId": "getorders",
                "summary": "List all orders with optional filtering",
                "tags": [
                    "Orders"
                ],
                "description": "Permission: list_orders.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "required": false,
                        "description": "One order.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's orders.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending, active, cancelled or fraud.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getorderstatuses": {
            "get": {
                "operationId": "getorderstatuses",
                "summary": "Get available order status options",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getpaymentmethods": {
            "get": {
                "operationId": "getpaymentmethods",
                "summary": "List the payment gateways clients can pay with",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getpaymethods": {
            "get": {
                "operationId": "getpaymethods",
                "summary": "List a client's stored payment methods",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: list_invoices.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": true,
                        "description": "The client.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getpermissionslist": {
            "get": {
                "operationId": "getpermissionslist",
                "summary": "List the staff permission keys",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getproducts": {
            "get": {
                "operationId": "getproducts",
                "summary": "List all products/packages in the system",
                "tags": [
                    "System"
                ],
                "description": "Permission: list_products.",
                "parameters": [
                    {
                        "name": "pid",
                        "in": "query",
                        "required": false,
                        "description": "One product.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "gid",
                        "in": "query",
                        "required": false,
                        "description": "Only products in this product group.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "module",
                        "in": "query",
                        "required": false,
                        "description": "Only products provisioned by this server module (for example panelica).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getproject": {
            "get": {
                "operationId": "getproject",
                "summary": "Get a single project with tasks and messages",
                "tags": [
                    "Projects"
                ],
                "description": "Permission: list_projects.",
                "parameters": [
                    {
                        "name": "projectid",
                        "in": "query",
                        "required": true,
                        "description": "The project. id is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such project.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getprojects": {
            "get": {
                "operationId": "getprojects",
                "summary": "List all projects",
                "tags": [
                    "Projects"
                ],
                "description": "Each project carries its client, tasks and messages. Permission: list_projects.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's projects.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getpromotions": {
            "get": {
                "operationId": "getpromotions",
                "summary": "List promotion codes",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_promotions.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getquotes": {
            "get": {
                "operationId": "getquotes",
                "summary": "List all quotes with optional filtering",
                "tags": [
                    "Quotes"
                ],
                "description": "Each quote carries its client and line items. Permission: list_quotes.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's quotes.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Draft, Sent, Accepted or Declined.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getregistrars": {
            "get": {
                "operationId": "getregistrars",
                "summary": "List the installed registrar modules",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_registrars.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getservers": {
            "get": {
                "operationId": "getservers",
                "summary": "List the servers",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_servers.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getsslapproveremails": {
            "get": {
                "operationId": "getsslapproveremails",
                "summary": "List the addresses that may approve a certificate",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Permission: full administrator only.",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "query",
                        "required": true,
                        "description": "The domain.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "module",
                        "in": "query",
                        "required": false,
                        "description": "The SSL module to ask. Default gogetssl.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such SSL module.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No domain was sent.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The SSL provider could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getsslorder": {
            "get": {
                "operationId": "getsslorder",
                "summary": "Get one SSL order",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Permission: full administrator only.",
                "parameters": [
                    {
                        "name": "order_id",
                        "in": "query",
                        "required": true,
                        "description": "The SSL order. id is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getsslorders": {
            "get": {
                "operationId": "getsslorders",
                "summary": "List SSL orders",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Permission: full administrator only.",
                "parameters": [
                    {
                        "name": "client_id",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's certificates.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Only this status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 100. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number. Default 1.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getstaffonline": {
            "get": {
                "operationId": "getstaffonline",
                "summary": "List the staff signed in during the last 15 minutes",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_staff.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getstats": {
            "get": {
                "operationId": "getstats",
                "summary": "Count clients, services, domains, invoices, orders, tickets and staff",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getsupportdepartments": {
            "get": {
                "operationId": "getsupportdepartments",
                "summary": "List all support departments",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getsupportstatuses": {
            "get": {
                "operationId": "getsupportstatuses",
                "summary": "List the ticket statuses",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticket": {
            "get": {
                "operationId": "getticket",
                "summary": "Get a single ticket with replies",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [
                    {
                        "name": "ticketid",
                        "in": "query",
                        "required": true,
                        "description": "The ticket.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticketattachment": {
            "get": {
                "operationId": "getticketattachment",
                "summary": "List or download the files on a ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [
                    {
                        "name": "ticketid",
                        "in": "query",
                        "required": true,
                        "description": "The ticket.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "attachmentindex",
                        "in": "query",
                        "required": false,
                        "description": "Which file. Left out, the files are listed instead.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket, or no file at that index.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticketcounts": {
            "get": {
                "operationId": "getticketcounts",
                "summary": "Count tickets by status",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticketnotes": {
            "get": {
                "operationId": "getticketnotes",
                "summary": "List the staff notes on a ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [
                    {
                        "name": "ticketid",
                        "in": "query",
                        "required": true,
                        "description": "The ticket.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticketpredefinedcats": {
            "get": {
                "operationId": "getticketpredefinedcats",
                "summary": "List the canned reply categories",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getticketpredefinedreplies": {
            "get": {
                "operationId": "getticketpredefinedreplies",
                "summary": "List canned replies",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: list_tickets.",
                "parameters": [
                    {
                        "name": "catid",
                        "in": "query",
                        "required": false,
                        "description": "Only this category.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gettickets": {
            "get": {
                "operationId": "gettickets",
                "summary": "List support tickets with optional filtering",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Most recently active first. Permission: list_tickets.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's tickets. userid is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "deptid",
                        "in": "query",
                        "required": false,
                        "description": "Only this department.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "A ticket status, such as Open, Answered, Customer-Reply or Closed.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gettldpricing": {
            "get": {
                "operationId": "gettldpricing",
                "summary": "Get the prices of the enabled domain extensions",
                "tags": [
                    "Domains"
                ],
                "description": "Permission: list_domains.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gettodoitems": {
            "get": {
                "operationId": "gettodoitems",
                "summary": "List to-do items",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Only items with this status.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gettodoitemstatuses": {
            "get": {
                "operationId": "gettodoitemstatuses",
                "summary": "List the to-do statuses",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/gettransactions": {
            "get": {
                "operationId": "gettransactions",
                "summary": "List payment transactions with optional filtering",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: list_invoices.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only this client's transactions. userid is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "invoiceid",
                        "in": "query",
                        "required": false,
                        "description": "Only this invoice's transactions.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getuserpermissions": {
            "get": {
                "operationId": "getuserpermissions",
                "summary": "Get what a login may do on a client account",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: list_clients.",
                "parameters": [
                    {
                        "name": "userid",
                        "in": "query",
                        "required": true,
                        "description": "The login. user_id is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": true,
                        "description": "The client account. client_id is accepted too.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The login is not on that account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/getusers": {
            "get": {
                "operationId": "getusers",
                "summary": "List client-area logins",
                "tags": [
                    "Clients"
                ],
                "description": "A login (user) can open several client accounts; a client account can have several logins. Permission: list_clients.",
                "parameters": [
                    {
                        "name": "clientid",
                        "in": "query",
                        "required": false,
                        "description": "Only the logins on this client account.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitstart",
                        "in": "query",
                        "required": false,
                        "description": "Where the page starts. Default 0.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "limitnum",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 250. Default 25.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/listoauthcredentials": {
            "get": {
                "operationId": "listoauthcredentials",
                "summary": "List the API credentials",
                "tags": [
                    "API Credentials"
                ],
                "description": "Permission: manage_staff.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/logactivity": {
            "post": {
                "operationId": "logactivity",
                "summary": "Write an entry in the activity log",
                "tags": [
                    "System"
                ],
                "description": "The entry is signed with the user name of the staff member the credential belongs to. Permission: view_activity_log.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/logactivity"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/logactivity"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/mergeticket": {
            "post": {
                "operationId": "mergeticket",
                "summary": "Merge one ticket into another",
                "tags": [
                    "Support Tickets"
                ],
                "description": "The replies and staff notes move to mergeid; ticketid is closed and points to it. Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/mergeticket"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/mergeticket"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Either ticket does not exist.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The two ids are the same.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/modulechangepackage": {
            "post": {
                "operationId": "modulechangepackage",
                "summary": "Run Change Package on a service module",
                "tags": [
                    "Services & Products"
                ],
                "description": "Changes the plan on the server only; billing is not touched. To bill the difference, use upgradeproduct. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/modulechangepackage"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/modulechangepackage"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The server module refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service or product.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/modulechangepw": {
            "post": {
                "operationId": "modulechangepw",
                "summary": "Change the account password on the server",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/modulechangepw"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/modulechangepw"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No password was sent, or the server module refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/modulecreate": {
            "post": {
                "operationId": "modulecreate",
                "summary": "Run the module Create function for a service",
                "tags": [
                    "Services & Products"
                ],
                "description": "Creates the account on the server through the product's server module. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/modulecreate"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/modulecreate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The server module refused; message says why.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/modulecustom": {
            "post": {
                "operationId": "modulecustom",
                "summary": "Run a custom function of a server module",
                "tags": [
                    "Services & Products"
                ],
                "description": "None of the built-in server modules offers a custom function; this is for third-party modules. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/modulecustom"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/modulecustom"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service, or its module offers no function by that name (the message lists the ones it offers).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The function ran and reported a failure.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The function failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/modulesuspend": {
            "post": {
                "operationId": "modulesuspend",
                "summary": "Suspend a hosting service",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/modulesuspend"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/modulesuspend"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The server module refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/moduleterminate": {
            "post": {
                "operationId": "moduleterminate",
                "summary": "Run the module Terminate function",
                "tags": [
                    "Services & Products"
                ],
                "description": "Deletes the account on the server. It cannot be undone. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/moduleterminate"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/moduleterminate"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The server module refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/moduleunsuspend": {
            "post": {
                "operationId": "moduleunsuspend",
                "summary": "Unsuspend/reactivate a service",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/moduleunsuspend"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/moduleunsuspend"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "The server module refused.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/openticket": {
            "post": {
                "operationId": "openticket",
                "summary": "Open a new support ticket",
                "tags": [
                    "Support Tickets"
                ],
                "description": "The acknowledgement to the sender and the alert to support go out as for any new ticket. Permission: reply_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/openticket"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/openticket"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/orderfraudcheck": {
            "post": {
                "operationId": "orderfraudcheck",
                "summary": "Score an order for fraud",
                "tags": [
                    "Orders"
                ],
                "description": "Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/orderfraudcheck"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/orderfraudcheck"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/pendingorder": {
            "post": {
                "operationId": "pendingorder",
                "summary": "Set an order back to pending",
                "tags": [
                    "Orders"
                ],
                "description": "Puts the order back to Pending. Permission: manage_orders.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/pendingorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/pendingorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/pnlcsdetails": {
            "get": {
                "operationId": "pnlcsdetails",
                "summary": "Get installation details (version, company name)",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/reissuesslorder": {
            "post": {
                "operationId": "reissuesslorder",
                "summary": "Reissue an SSL certificate",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Permission: full administrator only.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/reissuesslorder"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/reissuesslorder"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No CSR was sent.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The SSL provider could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/resendsslvalidation": {
            "post": {
                "operationId": "resendsslvalidation",
                "summary": "Resend the SSL validation email",
                "tags": [
                    "SSL Certificates"
                ],
                "description": "Permission: full administrator only.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/resendsslvalidation"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/resendsslvalidation"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "The SSL provider could not be reached.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/resetpassword": {
            "post": {
                "operationId": "resetpassword",
                "summary": "Send a client login the password reset link",
                "tags": [
                    "System"
                ],
                "description": "Sends the same link as the Forgot password form. The password itself is never set or returned. Permission: edit_clients.",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/resetpassword"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/resetpassword"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No client login has that address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/sendadminemail": {
            "post": {
                "operationId": "sendadminemail",
                "summary": "Send an email to the staff",
                "tags": [
                    "System"
                ],
                "description": "Goes to every active staff member with an email address, or to those assigned to deptid. Permission: manage_email_templates.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/sendadminemail"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/sendadminemail"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/sendemail": {
            "post": {
                "operationId": "sendemail",
                "summary": "Send a client a template or custom email",
                "tags": [
                    "System"
                ],
                "description": "A template mail is built exactly as the event that normally sends it builds it, in the client language. Mail switched off in the settings stays off. Permission: manage_email_templates.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/sendemail"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/sendemail"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No record with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The template cannot be sent on demand, or the client has no email address.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/sendquote": {
            "post": {
                "operationId": "sendquote",
                "summary": "Mark a quote as sent to the client",
                "tags": [
                    "Quotes"
                ],
                "description": "Marks it Sent, as the Send button in the admin area does, so the client can see and accept it in the client area. No email is sent. Permission: manage_quotes.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/sendquote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/sendquote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such quote.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/setconfigurationvalue": {
            "post": {
                "operationId": "setconfigurationvalue",
                "summary": "Change a setting",
                "tags": [
                    "System"
                ],
                "description": "The setting stays in the group its settings screen reads it from; a new name is created in the general group. Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/setconfigurationvalue"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/setconfigurationvalue"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The setting holds a credential (see getconfigurationvalue).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/starttasktimer": {
            "post": {
                "operationId": "starttasktimer",
                "summary": "Start a task timer",
                "tags": [
                    "Projects"
                ],
                "description": "The timer belongs to the staff member the credential belongs to. Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/starttasktimer"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/starttasktimer"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such task (in that project).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A timer is already running for this task and staff member.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/triggernotificationevent": {
            "post": {
                "operationId": "triggernotificationevent",
                "summary": "Send a custom notification",
                "tags": [
                    "System"
                ],
                "description": "Delivered through the channels set up for the api.custom event under Setup > Notification Channels (email, Slack, webhook, Telegram). With no rule for it, nothing is sent and rules is 0. Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/triggernotificationevent"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/triggernotificationevent"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateadminnotes": {
            "post": {
                "operationId": "updateadminnotes",
                "summary": "Replace the admin notes on a client",
                "tags": [
                    "System"
                ],
                "description": "Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateadminnotes"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateadminnotes"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No client with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateannouncement": {
            "post": {
                "operationId": "updateannouncement",
                "summary": "Update an announcement",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_announcements.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateannouncement"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateannouncement"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No announcement with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateclient": {
            "post": {
                "operationId": "updateclient",
                "summary": "Update an existing client's details",
                "tags": [
                    "Clients"
                ],
                "description": "Only the fields you send are changed. Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclient"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclient"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such client.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateclientaddon": {
            "post": {
                "operationId": "updateclientaddon",
                "summary": "Update a service addon",
                "tags": [
                    "Services & Products"
                ],
                "description": "Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientaddon"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientaddon"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such addon.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateclientdomain": {
            "post": {
                "operationId": "updateclientdomain",
                "summary": "Update a domain record",
                "tags": [
                    "Domains"
                ],
                "description": "Changes the record only; nothing is sent to the registrar. Permission: manage_domains.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientdomain"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientdomain"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such domain.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateclientproduct": {
            "post": {
                "operationId": "updateclientproduct",
                "summary": "Update a client's hosting service record",
                "tags": [
                    "Services & Products"
                ],
                "description": "Changes the record only; nothing is sent to the server. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientproduct"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateclientproduct"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatecontact": {
            "post": {
                "operationId": "updatecontact",
                "summary": "Update a sub-contact",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatecontact"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatecontact"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such contact.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateinvoice": {
            "post": {
                "operationId": "updateinvoice",
                "summary": "Update an existing invoice",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "status=paid records the payment the way the admin area does (transaction, paid event, provisioning). status=cancelled hands back any credit applied. Other statuses only change the label. Permission: manage_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateinvoice"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateinvoice"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such invoice.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatemoduleconfiguration": {
            "post": {
                "operationId": "updatemoduleconfiguration",
                "summary": "Change a module's settings",
                "tags": [
                    "System"
                ],
                "description": "A blank value for a password field keeps the stored one, as on the settings screen. Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatemoduleconfiguration"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatemoduleconfiguration"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "The staff account lacks the permission the module settings screen asks for: manage_gateways, manage_registrars, manage_servers (SSL) or manage_products (addons).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such module is installed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "moduleType is server.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateoauthcredential": {
            "post": {
                "operationId": "updateoauthcredential",
                "summary": "Update an API credential",
                "tags": [
                    "API Credentials"
                ],
                "description": "Permission: manage_staff.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateoauthcredential"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateoauthcredential"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such credential.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An allowed_ips entry is not an address or a range.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatepaymethod": {
            "post": {
                "operationId": "updatepaymethod",
                "summary": "Rename a stored payment method or make it the default",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: manage_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatepaymethod"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatepaymethod"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The client has no such payment method.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateproject": {
            "post": {
                "operationId": "updateproject",
                "summary": "Update a project's details",
                "tags": [
                    "Projects"
                ],
                "description": "Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateproject"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateproject"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such project.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateprojecttask": {
            "post": {
                "operationId": "updateprojecttask",
                "summary": "Update a project task",
                "tags": [
                    "Projects"
                ],
                "description": "Permission: manage_projects.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateprojecttask"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateprojecttask"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such task.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatequote": {
            "post": {
                "operationId": "updatequote",
                "summary": "Update an existing quote",
                "tags": [
                    "Quotes"
                ],
                "description": "Permission: manage_quotes.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatequote"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatequote"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such quote.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateticket": {
            "post": {
                "operationId": "updateticket",
                "summary": "Update ticket status or details",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: manage_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateticket"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateticket"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateticketreply": {
            "post": {
                "operationId": "updateticketreply",
                "summary": "Edit a ticket reply",
                "tags": [
                    "Support Tickets"
                ],
                "description": "Permission: reply_tickets.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateticketreply"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateticketreply"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such reply.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatetodoitem": {
            "post": {
                "operationId": "updatetodoitem",
                "summary": "Update a to-do item",
                "tags": [
                    "System"
                ],
                "description": "Permission: manage_settings.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatetodoitem"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatetodoitem"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No item with that id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updatetransaction": {
            "post": {
                "operationId": "updatetransaction",
                "summary": "Update a transaction",
                "tags": [
                    "Invoices & Billing"
                ],
                "description": "Permission: manage_invoices.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updatetransaction"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updatetransaction"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such transaction.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateuser": {
            "post": {
                "operationId": "updateuser",
                "summary": "Update a client-area login",
                "tags": [
                    "Clients"
                ],
                "description": "Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateuser"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateuser"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No such login.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/updateuserpermissions": {
            "post": {
                "operationId": "updateuserpermissions",
                "summary": "Change what a login may do on a client account",
                "tags": [
                    "Clients"
                ],
                "description": "Enforced in the client area: a login without a permission cannot open that part of the account. Permission: edit_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/updateuserpermissions"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/updateuserpermissions"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The login is not on that account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The login is the account owner (who always has everything), or an unknown permission was named.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/upgradeproduct": {
            "post": {
                "operationId": "upgradeproduct",
                "summary": "Move a service to another product, billing the difference",
                "tags": [
                    "Services & Products"
                ],
                "description": "The same upgrade the client area offers: the difference is billed, and the server is changed once it is paid. Permission: manage_services.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/upgradeproduct"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/upgradeproduct"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The change is not allowed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/validatelogin": {
            "post": {
                "operationId": "validatelogin",
                "summary": "Validate client login credentials",
                "tags": [
                    "System"
                ],
                "description": "Permission: view_clients.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/validatelogin"
                            }
                        },
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/validatelogin"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "The address and password do not match a client login.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/whmcsdetails": {
            "get": {
                "operationId": "whmcsdetails",
                "summary": "Get installation details (WHMCS name)",
                "tags": [
                    "System"
                ],
                "description": "The same call as pnlcsdetails, under the name WHMCS clients use. Permission: view_system.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "result is success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Success"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key",
                "description": "The credential identifier."
            },
            "apiSecret": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Secret",
                "description": "The credential secret."
            }
        },
        "schemas": {
            "Success": {
                "type": "object",
                "properties": {
                    "result": {
                        "type": "string",
                        "const": "success"
                    }
                },
                "required": [
                    "result"
                ],
                "additionalProperties": true
            },
            "Error": {
                "type": "object",
                "properties": {
                    "result": {
                        "type": "string",
                        "const": "error"
                    },
                    "message": {
                        "type": "string"
                    }
                },
                "required": [
                    "result",
                    "message"
                ]
            },
            "acceptorder": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "acceptquote": {
                "type": "object",
                "properties": {
                    "quoteid": {
                        "type": "integer",
                        "description": "The quote."
                    }
                },
                "required": [
                    "quoteid"
                ]
            },
            "activatemodule": {
                "type": "object",
                "properties": {
                    "moduleType": {
                        "type": "string",
                        "description": "server, gateway, registrar, ssl or addon."
                    },
                    "moduleName": {
                        "type": "string",
                        "description": "The module name, for example stripe."
                    }
                },
                "required": [
                    "moduleType",
                    "moduleName"
                ]
            },
            "addannouncement": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "announcement": {
                        "type": "string",
                        "description": "The text."
                    },
                    "published": {
                        "type": "boolean",
                        "description": "Default true. Send 0 to save it unpublished."
                    }
                },
                "required": [
                    "title",
                    "announcement"
                ]
            },
            "addbannedip": {
                "type": "object",
                "properties": {
                    "ip": {
                        "type": "string",
                        "description": "An IPv4 or IPv6 address, or a prefix ending in * such as 203.0.113.*"
                    },
                    "reason": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    }
                },
                "required": [
                    "ip"
                ]
            },
            "addbillableitem": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "description": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "amount": {
                        "type": "number",
                        "description": "The amount."
                    },
                    "duedate": {
                        "type": "string",
                        "format": "date",
                        "description": "When to bill it."
                    }
                },
                "required": [
                    "clientid",
                    "description",
                    "amount"
                ]
            },
            "addcancelrequest": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "type": {
                        "type": "string",
                        "description": "Immediate, or End of Billing Period (the default)."
                    },
                    "reason": {
                        "type": "string",
                        "description": "Up to 1000 characters."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "addclient": {
                "type": "object",
                "properties": {
                    "firstname": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "lastname": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Must not belong to another client."
                    },
                    "password2": {
                        "type": "string",
                        "description": "At least 8 characters. When sent, a client-area login is created with it. password is accepted too."
                    },
                    "companyname": {
                        "type": "string",
                        "description": "Company name."
                    },
                    "address1": {
                        "type": "string",
                        "description": "Street address."
                    },
                    "city": {
                        "type": "string",
                        "description": "City."
                    },
                    "state": {
                        "type": "string",
                        "description": "State or region."
                    },
                    "postcode": {
                        "type": "string",
                        "description": "Postal code."
                    },
                    "country": {
                        "type": "string",
                        "description": "Two-letter country code. Default US."
                    },
                    "phonenumber": {
                        "type": "string",
                        "description": "Phone number."
                    }
                },
                "required": [
                    "firstname",
                    "lastname",
                    "email"
                ]
            },
            "addclientnote": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The client. clientid is accepted too."
                    },
                    "note": {
                        "type": "string",
                        "description": "The note. notes and message are accepted too."
                    },
                    "sticky": {
                        "type": "boolean",
                        "description": "Pin it to the top of the client summary."
                    }
                },
                "required": [
                    "userid",
                    "note"
                ]
            },
            "addcontact": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "firstname": {
                        "type": "string",
                        "description": "First name."
                    },
                    "lastname": {
                        "type": "string",
                        "description": "Last name."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Address."
                    },
                    "phonenumber": {
                        "type": "string",
                        "description": "Phone number."
                    }
                },
                "required": [
                    "clientid",
                    "firstname",
                    "lastname",
                    "email"
                ]
            },
            "addcredit": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "description": {
                        "type": "string",
                        "description": "What the credit is for."
                    },
                    "amount": {
                        "type": "number",
                        "description": "At least 0.01."
                    }
                },
                "required": [
                    "clientid",
                    "description",
                    "amount"
                ]
            },
            "addinvoicepayment": {
                "type": "object",
                "properties": {
                    "invoiceid": {
                        "type": "integer",
                        "description": "The invoice."
                    },
                    "transid": {
                        "type": "string",
                        "description": "The payment reference. The same reference is never recorded twice."
                    },
                    "amount": {
                        "type": "number",
                        "description": "At least 0.01."
                    },
                    "gateway": {
                        "type": "string",
                        "description": "The gateway it came through. Default banktransfer."
                    }
                },
                "required": [
                    "invoiceid",
                    "transid",
                    "amount"
                ]
            },
            "addorder": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "pid": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Product ids: pid[0], pid[1], ... At least one."
                    },
                    "billingcycle": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "One per product: monthly (default), quarterly, semiannually, annually, biennially, triennially or onetime. A cycle the product is not sold on is skipped."
                    },
                    "domain": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "One per product: the domain the service is for."
                    },
                    "priceoverride": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "One per product: a price instead of the product price (0 or more)."
                    },
                    "paymentmethod": {
                        "type": "string",
                        "description": "A gateway installed here. Default banktransfer."
                    },
                    "promocode": {
                        "type": "string",
                        "description": "A promotion code."
                    }
                },
                "required": [
                    "clientid",
                    "pid"
                ]
            },
            "addproduct": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "gid": {
                        "type": "integer",
                        "description": "The product group."
                    },
                    "type": {
                        "type": "string",
                        "description": "hostingaccount, reselleraccount, server or other (hosting, reseller, vps, ssl, other are accepted too)."
                    },
                    "paytype": {
                        "type": "string",
                        "description": "free, onetime or recurring."
                    },
                    "description": {
                        "type": "string",
                        "description": "Description."
                    },
                    "module": {
                        "type": "string",
                        "description": "The server module that provisions it, for example panelica."
                    },
                    "servergroupid": {
                        "type": "integer",
                        "description": "The server group."
                    },
                    "autosetup": {
                        "type": "string",
                        "description": "order (set up when ordered; on is accepted too), payment, or manual."
                    },
                    "package_name": {
                        "type": "string",
                        "description": "The package on the server."
                    },
                    "pricing": {
                        "type": "object",
                        "description": "pricing[currencyid][cycle]=price, cycles monthly to triennially; -1 means not sold on that cycle."
                    }
                },
                "required": [
                    "name",
                    "gid",
                    "type",
                    "paytype"
                ]
            },
            "addprojectmessage": {
                "type": "object",
                "properties": {
                    "projectid": {
                        "type": "integer",
                        "description": "The project. project_id is accepted too."
                    },
                    "message": {
                        "type": "string",
                        "description": "The message."
                    }
                },
                "required": [
                    "projectid",
                    "message"
                ]
            },
            "addprojecttask": {
                "type": "object",
                "properties": {
                    "projectid": {
                        "type": "integer",
                        "description": "The project. project_id is accepted too."
                    },
                    "task": {
                        "type": "string",
                        "description": "The task, up to 255 characters. title is accepted too."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Details. description is accepted too."
                    },
                    "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    }
                },
                "required": [
                    "projectid",
                    "task"
                ]
            },
            "addsslorder": {
                "type": "object",
                "properties": {
                    "client_id": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "module": {
                        "type": "string",
                        "description": "An SSL module installed here, for example gogetssl."
                    },
                    "service_id": {
                        "type": "integer",
                        "description": "A service of this client."
                    },
                    "cert_type": {
                        "type": "string",
                        "description": "The certificate product at the provider."
                    },
                    "domain": {
                        "type": "string",
                        "description": "The name it is for; *.example.com for a wildcard."
                    }
                },
                "required": [
                    "client_id",
                    "module"
                ]
            },
            "addticketnote": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket."
                    },
                    "message": {
                        "type": "string",
                        "description": "The note. Staff only; the client never sees it."
                    }
                },
                "required": [
                    "ticketid",
                    "message"
                ]
            },
            "addticketreply": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket."
                    },
                    "message": {
                        "type": "string",
                        "description": "The reply."
                    },
                    "adminusername": {
                        "type": "string",
                        "description": "Any value: the reply is from staff, signed by the staff member the credential belongs to. Left out, the reply is the client's."
                    },
                    "userid": {
                        "type": "integer",
                        "description": "For a client reply: which client. Default: the ticket's client."
                    }
                },
                "required": [
                    "ticketid",
                    "message"
                ]
            },
            "addtransaction": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "description": {
                        "type": "string",
                        "description": "What the transaction is."
                    },
                    "amountin": {
                        "type": "number",
                        "description": "Money received."
                    },
                    "amountout": {
                        "type": "number",
                        "description": "Money paid out."
                    },
                    "invoiceid": {
                        "type": "integer",
                        "description": "An invoice of this client."
                    },
                    "transid": {
                        "type": "string",
                        "description": "The reference."
                    },
                    "gateway": {
                        "type": "string",
                        "description": "The gateway."
                    }
                },
                "required": [
                    "userid",
                    "description"
                ]
            },
            "adduser": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Must not belong to another login."
                    },
                    "password": {
                        "type": "string",
                        "description": "At least 8 characters."
                    },
                    "first_name": {
                        "type": "string",
                        "description": "First name."
                    },
                    "last_name": {
                        "type": "string",
                        "description": "Last name."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "Attach the new login to this client account."
                    }
                },
                "required": [
                    "email",
                    "password",
                    "first_name",
                    "last_name"
                ]
            },
            "affiliateactivate": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    }
                },
                "required": [
                    "clientid"
                ]
            },
            "applycredit": {
                "type": "object",
                "properties": {
                    "invoiceid": {
                        "type": "integer",
                        "description": "The invoice to pay from credit."
                    },
                    "amount": {
                        "type": "number",
                        "description": "At least 0.01, and no more than the client credit balance."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "When sent, must be the owner of the invoice."
                    }
                },
                "required": [
                    "invoiceid",
                    "amount"
                ]
            },
            "blockticketsender": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket whose sender to block."
                    },
                    "delete": {
                        "type": "boolean",
                        "description": "Delete the ticket as well."
                    }
                },
                "required": [
                    "ticketid"
                ]
            },
            "cancelorder": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "cancelsslorder": {
                "type": "object",
                "properties": {
                    "order_id": {
                        "type": "integer",
                        "description": "The SSL order."
                    },
                    "reason": {
                        "type": "string",
                        "description": "Why."
                    }
                },
                "required": [
                    "order_id"
                ]
            },
            "closeclient": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    }
                },
                "required": [
                    "clientid"
                ]
            },
            "configsslorder": {
                "type": "object",
                "properties": {
                    "order_id": {
                        "type": "integer",
                        "description": "The SSL order."
                    },
                    "csr": {
                        "type": "string",
                        "description": "The certificate signing request."
                    },
                    "webserver_type": {
                        "type": "string",
                        "description": "As the provider names it."
                    },
                    "validation_method": {
                        "type": "string",
                        "description": "email, dns or http."
                    },
                    "approver_email": {
                        "type": "string",
                        "format": "email",
                        "description": "For email validation (see getsslapproveremails)."
                    },
                    "domain": {
                        "type": "string",
                        "description": "The main name."
                    },
                    "domains": {
                        "type": "string",
                        "description": "Extra names (SAN)."
                    },
                    "admin_first_name": {
                        "type": "string",
                        "description": "Contact details the provider asks for: admin_first_name, admin_last_name, admin_email, admin_phone, admin_org, admin_address, admin_city, admin_state, admin_zip, admin_country."
                    }
                },
                "required": [
                    "order_id"
                ]
            },
            "createclientinvite": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client account. client_id is accepted too."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Who to invite."
                    },
                    "permissions": {
                        "type": "string",
                        "description": "all (the default), or a comma-separated list of: profile, contacts, products, manageproducts, productsso, domains, managedomains, invoices, quotes, tickets, affiliates, emails, orders."
                    }
                },
                "required": [
                    "clientid",
                    "email"
                ]
            },
            "createinvoice": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The lines: items[0][description], items[0][amount], items[0][taxed] (default true). Or send itemdescription1, itemamount1, itemtaxed1, itemdescription2, ... (up to 50). At least one line is required."
                    },
                    "date": {
                        "type": "string",
                        "format": "date",
                        "description": "Invoice date. Default today."
                    },
                    "duedate": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    },
                    "paymentmethod": {
                        "type": "string",
                        "description": "A gateway module name."
                    },
                    "status": {
                        "type": "string",
                        "description": "draft, unpaid or paid."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Notes printed on the invoice."
                    }
                },
                "required": [
                    "userid"
                ]
            },
            "createoauthcredential": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "allowed_ips": {
                        "type": "string",
                        "description": "The addresses it may be used from: IPv4 or IPv6 addresses and CIDR ranges, separated by commas (or an array). Left out, it works from anywhere."
                    }
                }
            },
            "createorupdatetld": {
                "type": "object",
                "properties": {
                    "extension": {
                        "type": "string",
                        "description": "The extension, with or without the dot: .com or com."
                    },
                    "register_price": {
                        "type": "number",
                        "description": "0 or more."
                    },
                    "transfer_price": {
                        "type": "number",
                        "description": "0 or more."
                    },
                    "renew_price": {
                        "type": "number",
                        "description": "0 or more."
                    },
                    "enabled": {
                        "type": "boolean",
                        "description": "Offered in the domain search."
                    },
                    "sort_order": {
                        "type": "integer",
                        "description": "0 or more."
                    }
                },
                "required": [
                    "extension"
                ]
            },
            "createproject": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "status": {
                        "type": "string",
                        "description": "pending (default), in_progress, completed or cancelled."
                    },
                    "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    },
                    "description": {
                        "type": "string",
                        "description": "Description."
                    }
                },
                "required": [
                    "title",
                    "clientid"
                ]
            },
            "createquote": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The client. clientid is accepted too."
                    },
                    "subject": {
                        "type": "string",
                        "description": "Default Quote."
                    },
                    "validuntil": {
                        "type": "string",
                        "format": "date",
                        "description": "Default 30 days from today."
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The lines: items[0][description], items[0][quantity] (default 1), items[0][unit_price], items[0][discount], items[0][taxable]."
                    }
                },
                "required": [
                    "userid"
                ]
            },
            "createssotoken": {
                "type": "object",
                "properties": {
                    "client_id": {
                        "type": "integer",
                        "description": "The client account. clientid is accepted too."
                    },
                    "user_id": {
                        "type": "integer",
                        "description": "Which login to sign in as. Default: the account owner. userid is accepted too."
                    },
                    "destination": {
                        "type": "string",
                        "description": "clientarea:homepage (default), clientarea:invoices, clientarea:services, clientarea:domains, clientarea:tickets, clientarea:product_details (with service_id), clientarea:domain_details (with domain_id) or sso:custom_redirect (with sso_redirect_path)."
                    },
                    "service_id": {
                        "type": "integer",
                        "description": "For clientarea:product_details; must be on the account."
                    },
                    "domain_id": {
                        "type": "integer",
                        "description": "For clientarea:domain_details; must be on the account."
                    },
                    "sso_redirect_path": {
                        "type": "string",
                        "description": "For sso:custom_redirect: a path inside the client area, such as /client/invoices."
                    }
                },
                "required": [
                    "client_id"
                ]
            },
            "deactivatemodule": {
                "type": "object",
                "properties": {
                    "moduleType": {
                        "type": "string",
                        "description": "server, gateway, registrar, ssl or addon."
                    },
                    "moduleName": {
                        "type": "string",
                        "description": "The module name."
                    }
                },
                "required": [
                    "moduleType",
                    "moduleName"
                ]
            },
            "deleteannouncement": {
                "type": "object",
                "properties": {
                    "announcementid": {
                        "type": "integer",
                        "description": "The announcement."
                    }
                },
                "required": [
                    "announcementid"
                ]
            },
            "deleteclient": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    }
                },
                "required": [
                    "clientid"
                ]
            },
            "deletecontact": {
                "type": "object",
                "properties": {
                    "contactid": {
                        "type": "integer",
                        "description": "The contact."
                    }
                },
                "required": [
                    "contactid"
                ]
            },
            "deleteoauthcredential": {
                "type": "object",
                "properties": {
                    "credentialid": {
                        "type": "integer",
                        "description": "The credential."
                    }
                },
                "required": [
                    "credentialid"
                ]
            },
            "deleteorder": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "deletepaymethod": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "paymethodid": {
                        "type": "integer",
                        "description": "One of that client's stored methods."
                    }
                },
                "required": [
                    "clientid",
                    "paymethodid"
                ]
            },
            "deleteprojecttask": {
                "type": "object",
                "properties": {
                    "taskid": {
                        "type": "integer",
                        "description": "The task."
                    }
                },
                "required": [
                    "taskid"
                ]
            },
            "deletequote": {
                "type": "object",
                "properties": {
                    "quoteid": {
                        "type": "integer",
                        "description": "The quote."
                    }
                },
                "required": [
                    "quoteid"
                ]
            },
            "deleteticket": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket."
                    }
                },
                "required": [
                    "ticketid"
                ]
            },
            "deleteticketnote": {
                "type": "object",
                "properties": {
                    "noteid": {
                        "type": "integer",
                        "description": "The note."
                    }
                },
                "required": [
                    "noteid"
                ]
            },
            "deleteticketreply": {
                "type": "object",
                "properties": {
                    "replyid": {
                        "type": "integer",
                        "description": "The reply."
                    }
                },
                "required": [
                    "replyid"
                ]
            },
            "deleteuserclient": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The login."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "The client account to take it off."
                    }
                },
                "required": [
                    "userid",
                    "clientid"
                ]
            },
            "domainregister": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "domain": {
                        "type": "string",
                        "description": "The domain name."
                    },
                    "years": {
                        "type": "integer",
                        "description": "1 to 10. Default 1."
                    },
                    "registrar": {
                        "type": "string",
                        "description": "A registrar module installed here. Default manual."
                    }
                },
                "required": [
                    "clientid",
                    "domain"
                ]
            },
            "domainrenew": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain."
                    },
                    "years": {
                        "type": "integer",
                        "description": "1 to 10. Default 1."
                    }
                },
                "required": [
                    "domainid"
                ]
            },
            "domaintoggleidprotect": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain."
                    },
                    "idprotect": {
                        "type": "boolean",
                        "description": "The state you want. Left out, the current state is flipped."
                    }
                },
                "required": [
                    "domainid"
                ]
            },
            "domaintransfer": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain record."
                    },
                    "eppcode": {
                        "type": "string",
                        "description": "The transfer code from the current registrar."
                    }
                },
                "required": [
                    "domainid",
                    "eppcode"
                ]
            },
            "domainupdatelockingstatus": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain."
                    },
                    "lockstatus": {
                        "type": "boolean",
                        "description": "1 to lock, 0 to unlock."
                    }
                },
                "required": [
                    "domainid",
                    "lockstatus"
                ]
            },
            "domainupdatenameservers": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain."
                    },
                    "ns1": {
                        "type": "string",
                        "description": "First nameserver."
                    },
                    "ns2": {
                        "type": "string",
                        "description": "Second nameserver."
                    },
                    "ns3": {
                        "type": "string",
                        "description": "Third nameserver."
                    },
                    "ns4": {
                        "type": "string",
                        "description": "Fourth nameserver."
                    },
                    "ns5": {
                        "type": "string",
                        "description": "Fifth nameserver."
                    }
                },
                "required": [
                    "domainid",
                    "ns1"
                ]
            },
            "endtasktimer": {
                "type": "object",
                "properties": {
                    "timerid": {
                        "type": "integer",
                        "description": "The timer."
                    }
                },
                "required": [
                    "timerid"
                ]
            },
            "fraudorder": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "logactivity": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "description": "The entry, up to 1000 characters."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "The client the entry is about."
                    }
                },
                "required": [
                    "description"
                ]
            },
            "mergeticket": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket to merge away."
                    },
                    "mergeid": {
                        "type": "integer",
                        "description": "The ticket to merge into."
                    }
                },
                "required": [
                    "ticketid",
                    "mergeid"
                ]
            },
            "modulechangepackage": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "packageid": {
                        "type": "integer",
                        "description": "The product to move the account to."
                    }
                },
                "required": [
                    "serviceid",
                    "packageid"
                ]
            },
            "modulechangepw": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "servicepassword": {
                        "type": "string",
                        "description": "The new password, at least 6 characters. password is accepted too."
                    }
                },
                "required": [
                    "serviceid",
                    "servicepassword"
                ]
            },
            "modulecreate": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "modulecustom": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "func_name": {
                        "type": "string",
                        "description": "A function the service's server module lists in customFunctions()."
                    }
                },
                "required": [
                    "serviceid",
                    "func_name"
                ]
            },
            "modulesuspend": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "reason": {
                        "type": "string",
                        "description": "Stored as the suspension reason and passed to the server module."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "moduleterminate": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "moduleunsuspend": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "openticket": {
                "type": "object",
                "properties": {
                    "deptid": {
                        "type": "integer",
                        "description": "The support department."
                    },
                    "subject": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "message": {
                        "type": "string",
                        "description": "The first message."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The sender address."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "The client, when the sender is one. userid is accepted too."
                    },
                    "name": {
                        "type": "string",
                        "description": "The sender name, for a guest."
                    },
                    "priority": {
                        "type": "string",
                        "description": "low, medium (default), high or critical."
                    },
                    "adminusername": {
                        "type": "string",
                        "description": "Any value: the ticket is opened by staff."
                    }
                },
                "required": [
                    "deptid",
                    "subject",
                    "message",
                    "email"
                ]
            },
            "orderfraudcheck": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "pendingorder": {
                "type": "object",
                "properties": {
                    "orderid": {
                        "type": "integer",
                        "description": "The order."
                    }
                },
                "required": [
                    "orderid"
                ]
            },
            "reissuesslorder": {
                "type": "object",
                "properties": {
                    "order_id": {
                        "type": "integer",
                        "description": "The SSL order."
                    },
                    "csr": {
                        "type": "string",
                        "description": "The new certificate signing request."
                    }
                },
                "required": [
                    "order_id",
                    "csr"
                ]
            },
            "resendsslvalidation": {
                "type": "object",
                "properties": {
                    "order_id": {
                        "type": "integer",
                        "description": "The SSL order."
                    }
                },
                "required": [
                    "order_id"
                ]
            },
            "resetpassword": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The client login. Required unless id is sent."
                    },
                    "id": {
                        "type": "integer",
                        "description": "The login (user) id. Required unless email is sent."
                    }
                }
            },
            "sendadminemail": {
                "type": "object",
                "properties": {
                    "customsubject": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "custommessage": {
                        "type": "string",
                        "description": "The body."
                    },
                    "deptid": {
                        "type": "integer",
                        "description": "Only the staff who handle this support department."
                    }
                },
                "required": [
                    "customsubject",
                    "custommessage"
                ]
            },
            "sendemail": {
                "type": "object",
                "properties": {
                    "messagename": {
                        "type": "string",
                        "description": "A template, one of: invoice created, invoice payment confirmation, invoice reminder, invoice overdue, service welcome email, service suspension, service unsuspension, service termination, order confirmation, domain registration confirmation, domain renewal reminder, account signup email. Required unless customsubject is sent."
                    },
                    "id": {
                        "type": "integer",
                        "description": "The record the mail is about: an invoice, service, order, domain or client id, as the template or customtype needs."
                    },
                    "customsubject": {
                        "type": "string",
                        "description": "Write the mail yourself instead of using a template. Required unless messagename is sent."
                    },
                    "custommessage": {
                        "type": "string",
                        "description": "The body, when customsubject is sent."
                    },
                    "customtype": {
                        "type": "string",
                        "description": "What id points at for a custom mail: general (a client, the default), invoice, product (a service) or domain."
                    }
                },
                "required": [
                    "id"
                ]
            },
            "sendquote": {
                "type": "object",
                "properties": {
                    "quoteid": {
                        "type": "integer",
                        "description": "The quote."
                    }
                },
                "required": [
                    "quoteid"
                ]
            },
            "setconfigurationvalue": {
                "type": "object",
                "properties": {
                    "setting": {
                        "type": "string",
                        "description": "The setting name."
                    },
                    "value": {
                        "type": "string",
                        "description": "The new value."
                    }
                },
                "required": [
                    "setting",
                    "value"
                ]
            },
            "starttasktimer": {
                "type": "object",
                "properties": {
                    "taskid": {
                        "type": "integer",
                        "description": "The task."
                    },
                    "projectid": {
                        "type": "integer",
                        "description": "When sent, the task must belong to this project."
                    }
                },
                "required": [
                    "taskid"
                ]
            },
            "triggernotificationevent": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "message": {
                        "type": "string",
                        "description": "Up to 4000 characters."
                    },
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "A link to add to the notification."
                    },
                    "notification_identifier": {
                        "type": "string",
                        "description": "Your own label for the notification."
                    }
                },
                "required": [
                    "title",
                    "message"
                ]
            },
            "updateadminnotes": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "notes": {
                        "type": "string",
                        "description": "The admin notes. Replaces what was there."
                    }
                },
                "required": [
                    "clientid"
                ]
            },
            "updateannouncement": {
                "type": "object",
                "properties": {
                    "announcementid": {
                        "type": "integer",
                        "description": "The announcement."
                    },
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "announcement": {
                        "type": "string",
                        "description": "The text."
                    },
                    "published": {
                        "type": "boolean",
                        "description": "Publish or unpublish."
                    }
                },
                "required": [
                    "announcementid"
                ]
            },
            "updateclient": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "firstname": {
                        "type": "string",
                        "description": "Cannot be empty."
                    },
                    "lastname": {
                        "type": "string",
                        "description": "Cannot be empty."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Must not belong to another client."
                    },
                    "companyname": {
                        "type": "string",
                        "description": "Company name."
                    },
                    "address1": {
                        "type": "string",
                        "description": "Street address."
                    },
                    "city": {
                        "type": "string",
                        "description": "City."
                    },
                    "state": {
                        "type": "string",
                        "description": "State or region."
                    },
                    "postcode": {
                        "type": "string",
                        "description": "Postal code."
                    },
                    "country": {
                        "type": "string",
                        "description": "Two-letter country code."
                    },
                    "phonenumber": {
                        "type": "string",
                        "description": "Phone number."
                    },
                    "status": {
                        "type": "string",
                        "description": "active, inactive or closed."
                    }
                },
                "required": [
                    "clientid"
                ]
            },
            "updateclientaddon": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "The service addon."
                    },
                    "status": {
                        "type": "string",
                        "description": "pending, active, suspended, terminated, cancelled, fraud or completed. cancelled stops its billing too."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Notes."
                    }
                },
                "required": [
                    "id"
                ]
            },
            "updateclientdomain": {
                "type": "object",
                "properties": {
                    "domainid": {
                        "type": "integer",
                        "description": "The domain."
                    },
                    "status": {
                        "type": "string",
                        "description": "pending, active, grace, redemption, expired, cancelled, fraud or transferred_away."
                    },
                    "expirydate": {
                        "type": "string",
                        "format": "date",
                        "description": "Expiry date."
                    },
                    "nextduedate": {
                        "type": "string",
                        "format": "date",
                        "description": "Next due date."
                    },
                    "regdate": {
                        "type": "string",
                        "format": "date",
                        "description": "Registration date."
                    },
                    "registrar": {
                        "type": "string",
                        "description": "A registrar module installed here."
                    },
                    "paymentmethod": {
                        "type": "string",
                        "description": "A gateway installed here."
                    },
                    "dns_management": {
                        "type": "boolean",
                        "description": "DNS management add-on."
                    },
                    "email_forwarding": {
                        "type": "boolean",
                        "description": "Email forwarding add-on."
                    },
                    "id_protection": {
                        "type": "boolean",
                        "description": "ID protection add-on."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Admin notes."
                    }
                },
                "required": [
                    "domainid"
                ]
            },
            "updateclientproduct": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "status": {
                        "type": "string",
                        "description": "pending, active, suspended, terminated, cancelled, fraud or completed."
                    },
                    "domain": {
                        "type": "string",
                        "description": "A domain name."
                    },
                    "username": {
                        "type": "string",
                        "description": "The account user name on the server."
                    },
                    "password": {
                        "type": "string",
                        "description": "The account password as stored in PNLCS. This does not change it on the server; use modulechangepw for that."
                    },
                    "next_due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Next due date."
                    },
                    "billing_cycle": {
                        "type": "string",
                        "description": "onetime, monthly, quarterly, semiannually, annually, biennially or triennially."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Admin notes."
                    }
                },
                "required": [
                    "serviceid"
                ]
            },
            "updatecontact": {
                "type": "object",
                "properties": {
                    "contactid": {
                        "type": "integer",
                        "description": "The contact."
                    },
                    "firstname": {
                        "type": "string",
                        "description": "Cannot be empty."
                    },
                    "lastname": {
                        "type": "string",
                        "description": "Cannot be empty."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Address."
                    }
                },
                "required": [
                    "contactid"
                ]
            },
            "updateinvoice": {
                "type": "object",
                "properties": {
                    "invoiceid": {
                        "type": "integer",
                        "description": "The invoice."
                    },
                    "status": {
                        "type": "string",
                        "description": "draft, unpaid, paid, partially_paid, overdue, cancelled, refunded, collections or payment_pending."
                    },
                    "date": {
                        "type": "string",
                        "format": "date",
                        "description": "Invoice date."
                    },
                    "duedate": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    },
                    "paymentmethod": {
                        "type": "string",
                        "description": "A gateway installed here."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Notes."
                    },
                    "transid": {
                        "type": "string",
                        "description": "With status=paid: the payment reference."
                    },
                    "gateway": {
                        "type": "string",
                        "description": "With status=paid: the gateway it was paid through. Default manual."
                    }
                },
                "required": [
                    "invoiceid"
                ]
            },
            "updatemoduleconfiguration": {
                "type": "object",
                "properties": {
                    "moduleType": {
                        "type": "string",
                        "description": "gateway, registrar, ssl or addon. Server modules keep their settings on each server."
                    },
                    "moduleName": {
                        "type": "string",
                        "description": "The module name."
                    },
                    "parameters": {
                        "type": "object",
                        "description": "parameters[name]=value for each setting to change, up to 50, each a string of at most 8192 characters."
                    }
                },
                "required": [
                    "moduleType",
                    "moduleName",
                    "parameters"
                ]
            },
            "updateoauthcredential": {
                "type": "object",
                "properties": {
                    "credentialid": {
                        "type": "integer",
                        "description": "The credential."
                    },
                    "description": {
                        "type": "string",
                        "description": "Description."
                    },
                    "active": {
                        "type": "boolean",
                        "description": "Switch it on or off."
                    },
                    "allowed_ips": {
                        "type": "string",
                        "description": "Replace the addresses it may be used from (see createoauthcredential). Send it empty to allow anywhere."
                    }
                },
                "required": [
                    "credentialid"
                ]
            },
            "updatepaymethod": {
                "type": "object",
                "properties": {
                    "clientid": {
                        "type": "integer",
                        "description": "The client."
                    },
                    "paymethodid": {
                        "type": "integer",
                        "description": "One of that client's stored methods."
                    },
                    "set_as_default": {
                        "type": "boolean",
                        "description": "Make it the default."
                    },
                    "description": {
                        "type": "string",
                        "description": "Rename it."
                    }
                },
                "required": [
                    "clientid",
                    "paymethodid"
                ]
            },
            "updateproject": {
                "type": "object",
                "properties": {
                    "projectid": {
                        "type": "integer",
                        "description": "The project. id is accepted too."
                    },
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "description": {
                        "type": "string",
                        "description": "Description."
                    },
                    "status": {
                        "type": "string",
                        "description": "pending, in_progress, completed or cancelled."
                    },
                    "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    }
                },
                "required": [
                    "projectid"
                ]
            },
            "updateprojecttask": {
                "type": "object",
                "properties": {
                    "taskid": {
                        "type": "integer",
                        "description": "The task."
                    },
                    "task": {
                        "type": "string",
                        "description": "Up to 255 characters. title is accepted too."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Details. description is accepted too."
                    },
                    "completed": {
                        "type": "boolean",
                        "description": "Mark it done or not done."
                    },
                    "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Due date."
                    }
                },
                "required": [
                    "taskid"
                ]
            },
            "updatequote": {
                "type": "object",
                "properties": {
                    "quoteid": {
                        "type": "integer",
                        "description": "The quote."
                    },
                    "status": {
                        "type": "string",
                        "description": "Draft, Sent, Accepted or Declined (exactly as written)."
                    },
                    "validuntil": {
                        "type": "string",
                        "format": "date",
                        "description": "Valid until."
                    },
                    "notes": {
                        "type": "string",
                        "description": "Admin notes."
                    },
                    "customer_notes": {
                        "type": "string",
                        "description": "Notes shown to the client."
                    },
                    "proposal": {
                        "type": "string",
                        "description": "The proposal text."
                    }
                },
                "required": [
                    "quoteid"
                ]
            },
            "updateticket": {
                "type": "object",
                "properties": {
                    "ticketid": {
                        "type": "integer",
                        "description": "The ticket."
                    },
                    "status": {
                        "type": "string",
                        "description": "One of the ticket statuses configured here (any letter case)."
                    },
                    "subject": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "priority": {
                        "type": "string",
                        "description": "low, medium, high or critical."
                    },
                    "deptid": {
                        "type": "integer",
                        "description": "Move it to this department."
                    },
                    "flag": {
                        "type": "integer",
                        "description": "Assign it to this staff account (admin id)."
                    }
                },
                "required": [
                    "ticketid"
                ]
            },
            "updateticketreply": {
                "type": "object",
                "properties": {
                    "replyid": {
                        "type": "integer",
                        "description": "The reply."
                    },
                    "message": {
                        "type": "string",
                        "description": "The new text. Cannot be empty."
                    }
                },
                "required": [
                    "replyid"
                ]
            },
            "updatetodoitem": {
                "type": "object",
                "properties": {
                    "itemid": {
                        "type": "integer",
                        "description": "The to-do item."
                    },
                    "title": {
                        "type": "string",
                        "description": "Up to 255 characters."
                    },
                    "description": {
                        "type": "string",
                        "description": "The details."
                    },
                    "status": {
                        "type": "string",
                        "description": "New, In Progress, Completed or Deferred (any letter case)."
                    },
                    "due_date": {
                        "type": "string",
                        "format": "date",
                        "description": "YYYY-MM-DD, or empty to clear it."
                    },
                    "admin": {
                        "type": "string",
                        "description": "The staff member it is assigned to."
                    }
                },
                "required": [
                    "itemid"
                ]
            },
            "updatetransaction": {
                "type": "object",
                "properties": {
                    "transactionid": {
                        "type": "integer",
                        "description": "The transaction."
                    },
                    "description": {
                        "type": "string",
                        "description": "What the transaction is."
                    },
                    "amount": {
                        "type": "number",
                        "description": "The amount received."
                    }
                },
                "required": [
                    "transactionid"
                ]
            },
            "updateuser": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The login."
                    },
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Must not belong to another login."
                    },
                    "first_name": {
                        "type": "string",
                        "description": "First name."
                    },
                    "last_name": {
                        "type": "string",
                        "description": "Last name."
                    },
                    "password": {
                        "type": "string",
                        "description": "At least 8 characters."
                    }
                },
                "required": [
                    "userid"
                ]
            },
            "updateuserpermissions": {
                "type": "object",
                "properties": {
                    "userid": {
                        "type": "integer",
                        "description": "The login. user_id is accepted too."
                    },
                    "clientid": {
                        "type": "integer",
                        "description": "The client account. client_id is accepted too."
                    },
                    "permissions": {
                        "type": "string",
                        "description": "all, or a comma-separated list (see createclientinvite)."
                    }
                },
                "required": [
                    "userid",
                    "clientid",
                    "permissions"
                ]
            },
            "upgradeproduct": {
                "type": "object",
                "properties": {
                    "serviceid": {
                        "type": "integer",
                        "description": "The service."
                    },
                    "packageid": {
                        "type": "integer",
                        "description": "The new product."
                    }
                },
                "required": [
                    "serviceid",
                    "packageid"
                ]
            },
            "validatelogin": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email",
                        "description": "The client login."
                    },
                    "password2": {
                        "type": "string",
                        "description": "The password to check."
                    }
                },
                "required": [
                    "email",
                    "password2"
                ]
            }
        }
    }
}
