# Overview (https://developer.godaddy.com/en/docs/references/rest/nodejs-hosting)



## Overview

The Node.js Hosting API lets you build, deploy, and operate Node.js apps on GoDaddy's hosting platform without touching a dashboard. Each app has two variants — `preview` and `publish` — so you can iterate safely and promote when you're ready.

Long-running operations (create app, upload source, publish, rollback) return immediately with a job or deployment record. Create app responds with `202 Accepted`. Upload, publish, and rollback respond with `200 OK`. Poll until each operation reaches a terminal state. See [Concepts](https://developer.godaddy.com/docs/hosting/concepts) for the full pattern.

<Callout type="info" title="Auth">
  Every endpoint is authenticated with an **OAuth 2.0 client-credentials** access token. Get a token, send it as `Authorization: Bearer <token>`, and request only the scopes each operation requires. See [Authentication](https://developer.godaddy.com/docs/hosting/authentication).
</Callout>

## Endpoint groups

<Cards>
  <Card href="/docs/references/rest/nodejs-hosting/apps" title="Apps" description="Create, read, update, and delete apps. Create is async — poll the returned job until the app is ready." />

  <Card href="/docs/references/rest/nodejs-hosting/source" title="Source" description="Upload application source as a zip file. Returns a jobId you poll until the upload is processed." />

  <Card href="/docs/references/rest/nodejs-hosting/deployments" title="Deployments" description="Publish the latest uploaded source, list past deployments, roll back to a previous deployment, and read variant runtime status." />

  <Card href="/docs/references/rest/nodejs-hosting/secrets" title="Secrets" description="Manage environment secrets per variant. Values are never returned — only names, metadata, and update operations." />

  <Card href="/docs/references/rest/nodejs-hosting/logs" title="Logs" description="Read application and build logs for the preview or publish variant." />
</Cards>

## Typical flow

```
POST /apps                              → 202, job id
GET  /apps/jobs/{jobId}                 → poll until app is ready

POST /apps/{appId}/source               → 200, upload jobId (multipart/form-data)
GET  /apps/{appId}/source/status?jobId  → poll until upload is processed

POST /apps/{appId}/deployments          → 200, deployment record
GET  /apps/{appId}/deployments          → list past deployments
GET  /apps/{appId}/status               → runtime status per variant

POST /apps/{appId}/rollback             → 200, rollback started
```

## Conventions

| Convention    | Detail                                                                                                                                                                                                   |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Base URL      | Gateway-relative: `/v1/hosting/nodejs` (host determined by the GoDaddy API gateway)                                                                                                                      |
| Async writes  | Create app returns `202 Accepted` with a job id. Upload, publish, and rollback return `200 OK` with a job or deployment record. Poll the relevant endpoint until the operation reaches a terminal state. |
| Variants      | Every app has `preview` and `publish` variants. Filter per endpoint: `/secrets?variant=…`, `/logs?target=…`. `/status` returns both.                                                                     |
| Auth          | OAuth 2.0 client credentials — token URL `https://oauth.api.godaddy.com/v2/oauth2/token`                                                                                                                 |
| Secret values | Never returned by any endpoint. Only names and metadata are readable.                                                                                                                                    |
| Rate limits   | Enforced by the API gateway. Not currently surfaced in schemas.                                                                                                                                          |
