Integrations & Third-Party Services

Connect Hostwares with your existing apps, CI/CD pipelines, and third-party services using our REST API and webhooks.

Overview

Hostwares exposes a full REST API that lets you programmatically manage every aspect of your infrastructure. With an API key, you can deploy sites, manage databases, control services, configure domains, and monitor resources from any programming language, CI/CD pipeline, or automation tool.

Use cases include:

  • Automated deployments from CI/CD (GitHub Actions, GitLab CI, Jenkins)
  • Infrastructure-as-Code with Terraform
  • Custom dashboards and monitoring
  • Slack/Discord notifications on deploy events
  • Integrating with existing project management tools
  • Building custom deployment workflows with n8n or Zapier

API Key Setup

Before integrating, generate an API key from your dashboard:

  1. Navigate to Dashboard → API Keys
  2. Click Create New Key and give it a descriptive name (e.g., "GitHub Actions Production")
  3. Copy the key immediately — it starts with sk_ and won't be shown again
  4. Store it as an environment secret in your CI/CD system
# Example: Store as GitHub Secret
# Settings → Secrets → Actions → New repository secret
# Name: HOSTWARES_API_KEY
# Value: sk_abc123def456...

Security best practices:

  • Never commit API keys to version control
  • Use separate keys for development, staging, and production
  • Rotate keys every 90 days
  • Delete unused keys promptly

GitHub Actions Integration

Auto-deploy to Hostwares on every push to main:

# .github/workflows/deploy.yml
name: Deploy to Hostwares

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Trigger Deploy
        run: |
          curl -X PATCH \
            https://hostwares.com/api/sites/${{ secrets.HOSTWARES_SITE_ID }} \
            -H "Authorization: Bearer ${{ secrets.HOSTWARES_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d '{"action": "deploy"}'

      - name: Wait for deployment
        run: |
          sleep 10
          STATUS=$(curl -s \
            https://hostwares.com/api/sites/${{ secrets.HOSTWARES_SITE_ID }} \
            -H "Authorization: Bearer ${{ secrets.HOSTWARES_API_KEY }}" \
            | jq -r '.status')
          echo "Deployment status: $STATUS"
          if [ "$STATUS" = "FAILED" ]; then exit 1; fi

GitLab CI Integration

# .gitlab-ci.yml
deploy:
  stage: deploy
  only:
    - main
  script:
    - |
      curl -X PATCH \
        "https://hostwares.com/api/sites/$HOSTWARES_SITE_ID" \
        -H "Authorization: Bearer $HOSTWARES_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"action": "deploy"}'

Migrate from Vercel

Moving from Vercel to Hostwares is straightforward:

  1. Create a site on Hostwares with the same GitHub repo
  2. Copy your environment variables from Vercel to Hostwares
  3. Update your domain DNS to point to Hostwares
  4. Remove the Vercel integration from GitHub
# Bulk import environment variables via API
curl -X POST https://hostwares.com/api/sites/SITE_ID/env \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "variables": [
      {"key": "DATABASE_URL", "value": "postgres://..."},
      {"key": "NEXT_PUBLIC_API_URL", "value": "https://api.example.com"}
    ]
  }'

Terraform Provider

Manage Hostwares infrastructure as code (coming soon):

# main.tf (preview - coming Q3 2026)
terraform {
  required_providers {
    hostwares = {
      source = "hostwares/hostwares"
    }
  }
}

provider "hostwares" {
  api_key = var.hostwares_api_key
}

resource "hostwares_site" "api" {
  name       = "my-api-backend"
  repository = "github.com/myorg/api"
  branch     = "main"
  port       = 8080
  
  environment = {
    NODE_ENV     = "production"
    DATABASE_URL = var.database_url
  }
}

resource "hostwares_database" "postgres" {
  name = "production-db"
  type = "postgresql"
}

Node.js SDK

Install the official SDK:

npm install @hostwares/sdk
import { Hostwares } from '@hostwares/sdk';

const hw = new Hostwares({ apiKey: process.env.HOSTWARES_API_KEY });

// List all sites
const sites = await hw.sites.list();

// Deploy a site
await hw.sites.deploy('site_id');

// Create a one-click service
await hw.services.create({
  type: 'wordpress-with-mariadb',
  name: 'my-blog',
  pack: 'standard',
  autoScale: true,
});

// Get service credentials
const creds = await hw.services.getCredentials('service_uuid');
console.log(creds.loginUrl);

Python SDK

pip install hostwares
from hostwares import Hostwares

hw = Hostwares(api_key="sk_...")

# List sites
sites = hw.sites.list()

# Trigger deployment
hw.sites.deploy("site_id")

# Create database
db = hw.databases.create(name="analytics-db", type="postgresql")
print(db.connection_string)

Zapier / n8n Automation

Use our REST API with any automation platform:

  • Zapier: Use the Webhooks by Zapier module with our API endpoints
  • n8n: Use the HTTP Request node to call Hostwares API
  • Make (Integromat): Create custom HTTP modules

Example workflow: Deploy on Jira ticket moved to "Ready for Deploy"

// n8n HTTP Request Node
Method: PATCH
URL: https://hostwares.com/api/sites/{{siteId}}
Headers:
  Authorization: Bearer {{$credentials.hostwaresApiKey}}
Body (JSON):
  { "action": "deploy" }

Monitoring Tools Integration

Forward Hostwares metrics to your monitoring stack:

  • Grafana: Use our metrics endpoint with a JSON datasource plugin
  • Datadog: Forward logs and metrics via our webhook system
  • PagerDuty: Set up alert webhooks for downtime notifications
  • Uptime Kuma: Monitor your Hostwares sites from self-hosted Uptime Kuma

Slack & Discord Notifications

Get notified on deployments, failures, and status changes:

// Webhook payload sent to your Slack/Discord webhook URL
{
  "event": "deployment.completed",
  "site": {
    "id": "cm1234",
    "name": "my-app",
    "status": "RUNNING"
  },
  "deployment": {
    "id": "dep_abc",
    "duration": 12.5,
    "commit": "feat: add user profiles"
  },
  "timestamp": "2026-05-23T14:30:00Z"
}

Configure webhooks in Dashboard → Settings → Notifications.