{
  "info": {
    "name": "NewHost API v1",
    "description": "NewHost public API. Set the secretKey and publicKey collection variables from Dashboard → Developers → API keys. Docs: https://docs.newhost.co.za",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{secretKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.newhost.co.za"
    },
    {
      "key": "secretKey",
      "value": "sk_live_replace_me"
    },
    {
      "key": "publicKey",
      "value": "pk_live_replace_me"
    },
    {
      "key": "appId",
      "value": ""
    },
    {
      "key": "deploymentId",
      "value": ""
    },
    {
      "key": "domainId",
      "value": ""
    },
    {
      "key": "recordId",
      "value": ""
    },
    {
      "key": "subscriptionId",
      "value": ""
    },
    {
      "key": "invoiceId",
      "value": ""
    },
    {
      "key": "webhookId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Catalogue",
      "description": "Plans, domain availability and prices. Callable with a public key from browsers.",
      "item": [
        {
          "name": "List plans",
          "request": {
            "method": "GET",
            "description": "Hosting plans currently on sale. Prices are in rand, excluding 15% VAT.\n\nWorks with a public key (pk_live_) or a secret key.",
            "auth": {
              "type": "noauth"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Public-Key",
                "value": "{{publicKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/plans?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "plans"
              ],
              "query": [
                {
                  "key": "category",
                  "value": "WEB",
                  "description": "WEB, EMAIL or APP.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Check domain availability",
          "request": {
            "method": "GET",
            "description": "Checks the name and suggests it in other popular extensions. Prices are per year, excl. VAT.\n\nWorks with a public key (pk_live_) or a secret key.",
            "auth": {
              "type": "noauth"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Public-Key",
                "value": "{{publicKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/check?q=acme.co.za",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                "check"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "acme.co.za",
                  "description": "A name or domain, e.g. acme or acme.co.za.",
                  "disabled": false
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Domain prices",
          "request": {
            "method": "GET",
            "description": "Registration, renewal and transfer prices for the featured extensions (rand per year, excl. VAT).\n\nWorks with a public key (pk_live_) or a secret key.",
            "auth": {
              "type": "noauth"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Public-Key",
                "value": "{{publicKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/pricing",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                "pricing"
              ],
              "query": [],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Account",
      "description": "The account that owns the API key.",
      "item": [
        {
          "name": "Retrieve the account",
          "request": {
            "method": "GET",
            "description": "Retrieve the account\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/account",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "account"
              ],
              "query": [],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Applications",
      "description": "Node.js / Next.js applications, their deployments and environment variables.",
      "item": [
        {
          "name": "List applications",
          "request": {
            "method": "GET",
            "description": "List applications\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Create an application",
          "request": {
            "method": "POST",
            "description": "Creates the site on a NewHost server and starts the first deployment. Counts towards your plan's app limit.\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Shop front\",\n  \"framework\": \"NEXTJS\",\n  \"repoUrl\": \"https://github.com/acme/shop.git\",\n  \"branch\": \"main\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Retrieve an application",
          "request": {
            "method": "GET",
            "description": "Retrieve an application\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            }
          }
        },
        {
          "name": "Update an application",
          "request": {
            "method": "PATCH",
            "description": "Update an application\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"branch\": \"release\",\n  \"autoDeploy\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete an application",
          "request": {
            "method": "DELETE",
            "description": "Removes the site and its files from the server. This cannot be undone.\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            }
          }
        },
        {
          "name": "Trigger a deployment",
          "request": {
            "method": "POST",
            "description": "Pulls the configured branch, installs, builds and restarts the app. Poll the deployment or subscribe to deployment.* webhooks.\n\nRequires the `deploy` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id/deployments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id",
                "deployments"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            }
          }
        },
        {
          "name": "List deployments",
          "request": {
            "method": "GET",
            "description": "List deployments\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id/deployments?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id",
                "deployments"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            }
          }
        },
        {
          "name": "Retrieve a deployment",
          "request": {
            "method": "GET",
            "description": "Includes the build log.\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/deployments/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "deployments",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{deploymentId}}",
                  "description": "The deployment ID."
                }
              ]
            }
          }
        },
        {
          "name": "Replace environment variables",
          "request": {
            "method": "PUT",
            "description": "Replaces the full set. Values are encrypted and never returned; send an empty value to keep a stored secret. Redeploy to apply.\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/apps/:id/env",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "apps",
                ":id",
                "env"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{appId}}",
                  "description": "The app ID."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"vars\": [\n    {\n      \"key\": \"DATABASE_URL\",\n      \"value\": \"postgres://...\"\n    },\n    {\n      \"key\": \"NEXT_PUBLIC_SITE\",\n      \"value\": \"https://shop.acme.co.za\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Databases",
      "description": "Managed databases attached to your applications.",
      "item": [
        {
          "name": "List databases",
          "request": {
            "method": "GET",
            "description": "List databases\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/databases?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "databases"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Domains",
      "description": "Registered domains, registration orders and DNS records.",
      "item": [
        {
          "name": "List domains",
          "request": {
            "method": "GET",
            "description": "List domains\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Retrieve a domain",
          "request": {
            "method": "GET",
            "description": "Retrieve a domain\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{domainId}}",
                  "description": "The domain ID."
                }
              ]
            }
          }
        },
        {
          "name": "Order a domain registration",
          "request": {
            "method": "POST",
            "description": "Creates an invoice. It is paid from your wallet when the balance allows, and the domain is registered once paid. Registrant details must be the domain owner's.\n\nRequires the `domains` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"domain\": \"acme-shop.co.za\",\n  \"years\": 1,\n  \"registrant\": {\n    \"name\": \"Jane Doe\",\n    \"email\": \"jane@acme.co.za\",\n    \"contactNumber\": \"+27.821234567\",\n    \"address1\": \"1 Main Road\",\n    \"city\": \"Cape Town\",\n    \"province\": \"Western Cape\",\n    \"postalCode\": \"8001\",\n    \"country\": \"ZA\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List DNS records",
          "request": {
            "method": "GET",
            "description": "List DNS records\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/:id/dns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                ":id",
                "dns"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{domainId}}",
                  "description": "The domain ID."
                }
              ]
            }
          }
        },
        {
          "name": "Add a DNS record",
          "request": {
            "method": "POST",
            "description": "Add a DNS record\n\nRequires the `domains` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/:id/dns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                ":id",
                "dns"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{domainId}}",
                  "description": "The domain ID."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"TXT\",\n  \"name\": \"_verify\",\n  \"content\": \"token-123\",\n  \"ttl\": 3600\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a DNS record",
          "request": {
            "method": "DELETE",
            "description": "Delete a DNS record\n\nRequires the `domains` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/domains/:id/dns/:recordId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "domains",
                ":id",
                "dns",
                ":recordId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{domainId}}",
                  "description": "The domain ID."
                },
                {
                  "key": "recordId",
                  "value": "{{recordId}}",
                  "description": "Record ID from List DNS records."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Web & email hosting",
      "description": "Plesk-based website and email hosting subscriptions.",
      "item": [
        {
          "name": "List hosting subscriptions",
          "request": {
            "method": "GET",
            "description": "List hosting subscriptions\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/hosting?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "hosting"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Retrieve a hosting subscription",
          "request": {
            "method": "GET",
            "description": "Includes live usage from the server and the mailbox list.\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/hosting/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "hosting",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{subscriptionId}}",
                  "description": "The subscription ID."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Billing",
      "description": "Invoices and the prepaid wallet.",
      "item": [
        {
          "name": "List invoices",
          "request": {
            "method": "GET",
            "description": "List invoices\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Items per page, 1-100 (default 50).",
                  "disabled": true
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Items to skip (default 0).",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "UNPAID",
                  "description": "UNPAID, PAID or VOID.",
                  "disabled": true
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Retrieve an invoice",
          "request": {
            "method": "GET",
            "description": "Retrieve an invoice\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{invoiceId}}",
                  "description": "The invoice ID."
                }
              ]
            }
          }
        },
        {
          "name": "Retrieve the wallet",
          "request": {
            "method": "GET",
            "description": "Retrieve the wallet\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/wallet",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "wallet"
              ],
              "query": [],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Endpoints that receive signed event notifications.",
      "item": [
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "description": "List webhook endpoints\n\nRequires the `read` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Create a webhook endpoint",
          "request": {
            "method": "POST",
            "description": "The signing secret is returned once. Use it to verify the NewHost-Signature header.\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://example.com/hooks/newhost\",\n  \"events\": [\n    \"deployment.succeeded\",\n    \"deployment.failed\"\n  ],\n  \"description\": \"Order system\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "description": "Delete a webhook endpoint\n\nRequires the `write` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "{{webhookId}}",
                  "description": "The webhook ID."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "AI gateway",
      "description": "OpenAI-compatible chat completions for Claude, GPT, Gemini and more, on NewHost credits or your own provider key.",
      "item": [
        {
          "name": "List AI models",
          "request": {
            "method": "GET",
            "description": "Models available on NewHost credits with their price in rand per million tokens, and the providers that accept your own key.\n\nWorks with a public key (pk_live_) or a secret key.",
            "auth": {
              "type": "noauth"
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "X-Public-Key",
                "value": "{{publicKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/ai/v1/models",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "ai",
                "v1",
                "models"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Create a chat completion",
          "request": {
            "method": "POST",
            "description": "OpenAI-compatible. Name the model as provider/model. Uses your saved key for that provider when you have one (billed by the provider), otherwise NewHost credits. Set stream: true for server-sent events; the last chunk carries usage. Responses are in OpenAI's format for every provider.\n\nRequires the `ai` scope.",
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{secretKey}}",
                  "type": "string"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/ai/v1/chat/completions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "ai",
                "v1",
                "chat",
                "completions"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"anthropic/claude-opus-5\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are concise.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a haiku about Table Mountain\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}