Builds the site's docs from its docs branch and publishes them. The build runs after the call returns: follow
it at the url in the response. Needs a key with the deploy scope. A key may start 10 deploys a minute.
Authorization
AuthorizationheaderrequiredBearer token
Path parameters
idstringrequiredThe site's ID, which is in its dashboard address.
Responses
application/json
The build has started.
buildobjectrequired
application/json
The key is missing, malformed, unknown or revoked.
errorstringrequiredWhat went wrong.
application/json
The key can't be used on this site, or doesn't have the scope this call needs.
errorstringrequiredWhat went wrong.
application/json
Too many requests from your address, or with this key. Wait a minute.
errorstringrequiredWhat went wrong.
Request
curl --request POST \ --url 'https://app.specly.xyz/api/sites/{id}/deploy' \ --header 'Authorization: Bearer <token>'const options = { method: 'POST', headers: { "Authorization": "Bearer <token>" }};
fetch('https://app.specly.xyz/api/sites/{id}/deploy', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));import requests
url = "https://app.specly.xyz/api/sites/{id}/deploy"
headers = { "Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import ( "fmt" "io" "net/http")
func main() { url := "https://app.specly.xyz/api/sites/{id}/deploy"
req, _ := http.NewRequest("POST", 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))}Response
{ "build": { "id": "5b0e6c3a-1f4d-4c1e-9a53-0d8f6f2f7a10", "url": "https://app.specly.xyz/sites/2f6c1b8e-7d3a-4e55-b1c9-3a9d0c4e8f12/deploys/5b0e6c3a-1f4d-4c1e-9a53-0d8f6f2f7a10" }}{ "error": "That key is unknown or revoked."}{ "error": "That key may not start a deploy."}{ "error": "Too many requests with this key. Wait a minute."}