canonical: https://jentic.com/apis/firebasehosting.googleapis.com/firebase-hosting

# Google Firebase Hosting API

The Firebase Hosting REST API enables programmatic management and deployment of Firebase-hosted sites. It lets developers and agents create sites, manage preview channels, upload file versions, populate file content, and roll out releases. The 17 endpoints cover the full deploy lifecycle - versions, files, releases, channels, domains - and are the same surface used by the firebase-tools CLI, suitable for custom CI/CD agents and preview-environment automation.

## For AI agents

Programmatically deploy static sites to Firebase Hosting - create versions, upload files, manage preview channels, and roll out releases.

## Scope

Does not handle Firestore, Cloud Functions deploys, or Firebase Authentication - use for static site versions, releases, channels, and domain management only.

## Capabilities

- Create and list Firebase Hosting sites under a project via /v1beta1/{parent}/sites
- Create new versions and populate them with hashed file content via /v1beta1/{parent}:populateFiles
- Roll out a version by creating a release on a site or preview channel
- Manage preview channels with TTLs to share PR-style previews with stakeholders
- List file manifests for a version via /v1beta1/{parent}/files
- Manage custom domains attached to a site through /v1beta1/{parent}/domains
- Clone an existing version into a new version for safe rollback or branching

## Use cases

### Custom CI/CD Deploys

Replace the firebase-tools CLI in CI with direct REST calls when you need fine-grained control. Create a version via POST /v1beta1/{parent}/versions, populate file hashes via /v1beta1/{parent}:populateFiles, upload missing files, finalize, then create a release. The flow integrates cleanly into bespoke pipelines and agent-driven deploys.

Example prompt: Create a new version for site 'my-app', populate files with the SHA256 manifest, upload missing files, finalize the version, and create a release on the live channel

### Preview Channels for PR Reviews

Spin up isolated preview URLs per pull request via POST /v1beta1/{parent}/channels with a TTL. Each channel has its own release stream so reviewers see exactly the build under review without affecting production. Channels are auto-expired when their TTL elapses, removing manual cleanup.

Example prompt: POST /v1beta1/{parent}/channels with channelId='pr-482' and ttl='604800s', then create a release on that channel pointing to the PR build version

### Safe Rollback via Version Clone

Use POST /v1beta1/{parent}/versions:clone to copy a known-good version into a new editable version, then create a release pointing to it. This avoids re-uploading files and gives rollback in seconds. Useful for incident response runbooks an agent can execute end-to-end.

Example prompt: POST /v1beta1/{parent}/versions:clone targeting the last known-good version, then create a release on the live channel using the cloned version

### AI Agent Deploy Operations

Use Firebase Hosting through Jentic so a release agent can ship builds, open preview channels, and roll back without invoking firebase-tools. Jentic exposes the 17 REST endpoints as discoverable tools while keeping the OAuth2 access token in the vault, suitable for ChatOps deploy bots. Get started with Jentic One, the self-hosted execution layer

Example prompt: Through Jentic, search 'create a Firebase Hosting preview channel', load the /v1beta1/{parent}/channels schema, and execute with channelId='preview-feature-x' and ttl='86400s'

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1beta1/{parent}/sites | List sites under a project |
| POST | /v1beta1/{parent}/versions | Create a new version |
| POST | /v1beta1/{parent}:populateFiles | Populate file hashes for a version |
| POST | /v1beta1/{parent}/releases | Create a release on a channel |
| POST | /v1beta1/{parent}/channels | Create a preview channel |
| POST | /v1beta1/{parent}/versions:clone | Clone a version for rollback or branching |
| POST | /v1beta1/{parent}/domains | Add a custom domain to a site |

## Key resources

- **Sites** — Sites under a Firebase project, each with channels, versions, and releases
- **Versions** — Immutable file bundles created, populated, and finalized for release
- **Releases** — A version pinned to a channel - live, preview, or otherwise
- **Channels** — Named release streams including preview channels with TTLs
- **Domains** — Custom domains attached to a site
- **Files** — File manifests within a version, looked up by SHA256

## Why Jentic

- **Setup:** Wiring the Firebase Hosting API by hand means running the Google OAuth2 flow for the right cloud-platform or firebase scope, spreading calls across 17 versioned site, version, release, and channel endpoints, and handling retries yourself. Through Jentic you install once, import Firebase Hosting from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Firebase Hosting puts the parent resource in the URL path (/v1beta1/{parent}/...), so a rule can pin your agent to one site: it can create versions and releases for that site and nothing else. You choose the operations it may call, so actions like domain creation are not included unless you add them.
- **Credential handling:** Your Google OAuth2 credential is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Firebase Hosting release' or 'create a preview channel', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Firebase Auth REST API** — Authenticates the end users of the site you deploy with Firebase Hosting
- **Fire Financial Services Business API** — Different domain - financial services API rather than hosting
- **Fitbit Web API** — Backs the data layer of a hosted consumer app deployed via Firebase Hosting

## FAQ

### What authentication does the Firebase Hosting API use?

The API uses OAuth 2.0 (both implicit and authorization-code flows are supported in the spec). Most server agents use a service account with scopes that include `https://www.googleapis.com/auth/firebase`. Through Jentic, the access token is held in the vault and injected at execution time.

### Can I create preview channels with the Firebase Hosting API?

Yes. POST /v1beta1/{parent}/channels creates a named channel with an optional TTL, and POST /v1beta1/{parent}/releases pins a version to that channel. Preview URLs are returned in the channel resource.

### What are the rate limits for the Firebase Hosting API?

Firebase Hosting applies per-project quotas - typical defaults allow several deploys per minute per site. The API returns standard 429 responses; project-specific quotas are visible in the Google Cloud console under the firebasehosting.googleapis.com service.

### How do I deploy a build through Jentic?

Search Jentic for 'create a Firebase Hosting version', load the /v1beta1/{parent}/versions schema, and execute against your site. Then call /v1beta1/{parent}:populateFiles, upload any missing files, finalize the version, and create a release on the live channel.

### Can I rollback a Firebase Hosting deploy via the API?

Yes. Use POST /v1beta1/{parent}/versions:clone to clone a previous good version, then create a release on the live channel pointing to the cloned version. The rollback applies near-instantly.

### Does the Firebase Hosting API support custom domains?

Yes. /v1beta1/{parent}/domains lists, creates, and updates custom domain mappings on a site. SSL certificates are provisioned automatically by Firebase.

### Can I limit what my agent is allowed to do with the Firebase Hosting API?

Yes. Because you run Jentic One yourself, your own rules decide which of the 17 operations and which credential your agent may use. Since Firebase Hosting puts the parent resource in the URL path (/v1beta1/{parent}/...), you can pin the agent to a single site so it only creates versions and releases there, and you pick the exact operations it may call, so actions like custom domain creation via /v1beta1/{parent}/domains stay off unless you add them.
