curl --request GET \
--url https://app.goosybear.ai/api/pages/{siteId}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.goosybear.ai/api/pages/{siteId}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.goosybear.ai/api/pages/{siteId}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.goosybear.ai/api/pages/{siteId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.goosybear.ai/api/pages/{siteId}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.goosybear.ai/api/pages/{siteId}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.goosybear.ai/api/pages/{siteId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>""<string>""<string>""<string>""<string>"Download a site's code project as a zip
Streams the site’s code project as the zip it would build from: a site you brought as a finished bundle gives back its newest staged revision (the platform’s own bundle.json left out and its migration relocation undone, so the zip re-imports as it is); a site built here gives back its current source tree. The bytes are built on the way out and never stored, auth is re-checked on every call, and the zip is deterministic for a given revision. X-Goosy-Export-Ref names the revision or source ref the zip is byte-identical to. The site’s database, storage, media and data tables are not part of the code project and are not in the zip. Pulling a site’s code is recorded on the audit ledger and is not metered.
curl --request GET \
--url https://app.goosybear.ai/api/pages/{siteId}/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.goosybear.ai/api/pages/{siteId}/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.goosybear.ai/api/pages/{siteId}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.goosybear.ai/api/pages/{siteId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.goosybear.ai/api/pages/{siteId}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.goosybear.ai/api/pages/{siteId}/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.goosybear.ai/api/pages/{siteId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>""<string>""<string>""<string>""<string>"Authorizations
An API key minted at Settings › API & MCP. Send it as Authorization: Bearer <key>. A key carries its holder's own permissions, resolved on every call — revoking a membership closes the key's reach immediately. Keep it in an environment variable (GOOSY_API_KEY), never in a committed file.
Path Parameters
The UUID of a site in the resolved workspace.
Query Parameters
Which workspace to act in — its slug or id. The SAME argument every workspace-scoped tool takes, resolved the same way: an account-wide key may select any workspace its holder currently reaches, a workspace-pinned key may only name its own, and a call that names nothing falls through to your default. It is a QUERY parameter rather than a body field on purpose: this endpoint's body is a multipart upload, and reading a field out of it would decode that body before the bearer and the rate limiter had run.
1Response
The zip. Content-Disposition: attachment; filename="<site>-<ref>.zip", X-Goosy-Export-Kind (managed or bundle) and X-Goosy-Export-Ref (the ref the zip is byte-identical to).
The response is of type file.