LogoFreestyle
API Reference/Web

Deploy a Website

Deploy a website. Files is a map of file paths to file contents. Configuration is optional and contains additional information about the deployment.

POST
/web/v1/deployment

Request Body

application/jsonRequired
sourceRequiredFiles | Tar | Git
configRequiredobject

Response Body

200

successfully deployed

responseRequiredobject | object

400

Possible errors: WebDeploymentBadRequest, InvalidDomains, EntrypointNotFound, NoEntrypointFound

errorRequiredstring

Error code in SCREAMING_SNAKE_CASE

messageRequiredstring

Human-readable error message

403

Possible errors: Forbidden, NoDomainOwnership

errorRequiredstring

Error code in SCREAMING_SNAKE_CASE

messageRequiredstring

Human-readable error message

404

Error: DeploymentNotFound

errorRequiredstring

Error code in SCREAMING_SNAKE_CASE

messageRequiredstring

Human-readable error message

500

Error: Internal

errorRequiredstring

Error code in SCREAMING_SNAKE_CASE

messageRequiredstring

Human-readable error message

curl -X POST "https://api.freestyle.sh/web/v1/deployment" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {
      "files": {
        "property1": {
          "content": "string",
          "encoding": "string"
        },
        "property2": {
          "content": "string",
          "encoding": "string"
        }
      },
      "kind": "files"
    },
    "config": {
      "domains": [
        "string"
      ],
      "entrypoint": "string",
      "envVars": {
        "property1": "string",
        "property2": "string"
      },
      "nodeModules": {
        "property1": "string",
        "property2": "string"
      },
      "timeout": 0,
      "serverStartCheck": true,
      "networkPermissions": [
        {
          "query": "string",
          "behavior": "regex",
          "action": "allow"
        }
      ],
      "build": {},
      "await": true
    }
  }'

successfully deployed

{
  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "domains": [
    "string"
  ],
  "entrypoint": "string"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.