Tuqo Git API
Git CD: connect a repository, manual deploy, webhook.
Git CD: connect a repository, manual deploy, webhook.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tuqo-ru:tuqo-ru-git-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Tuqo Ru Git API
version: '2026-11-14'
contact:
name: Tuqo Support
url: https://tuqo.ru/support/
license:
name: Tuqo Public Offer
url: https://tuqo.ru/legal/offer/
termsOfService: https://tuqo.ru/legal/
description: 'Operations tagged git across 2 of this provider''s published API definitions: openapi.json, tuqo-ru-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.tuqo.ru
description: Production
security:
- apiKey: []
tags:
- name: Git
description: 'Git CD: connect a repository, manual deploy, webhook.'
paths:
/api/v1/sites/{id}/git:
get:
tags:
- Git
operationId: get_site_git
summary: Get the repository connection
description: Current repository connection of the site (without secrets). If no repository is connected — 404.
x-scope: readonly
x-permission: 'code: view'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SiteGit'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
put:
tags:
- Git
operationId: configure_site_git
summary: Connect or update a repository (generic)
description: 'Configures Git CD: https URL of the repository, branch (default main), optionally `auth_user`/`token` for a private repository (the token is encrypted and never returned) and build commands. The URL is checked against SSRF (https only, public addresses). A repeated PUT updates the connection. For a site connected in the dashboard (GitHub/GitFlic/GitLab/Gitea/GitVerse): with the same `clone_url` the connection, provider and webhook are kept, so this is safe for changing build settings; a different `clone_url` (compared byte for byte — send it exactly as GET /git returns it) detaches the site from that connection (saved as `generic`) and removes its auto-created webhook. To change only the branch, use PUT /git/branch.'
x-scope: editor
x-permission: 'code: edit (publish)'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitConfigInput'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SiteGit'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'500':
$ref: '#/components/responses/InternalError'
delete:
tags:
- Git
operationId: unlink_site_git
summary: Disconnect the repository
description: Removes the connection (and the webhook secret). The webhook auto-created for a dashboard connection is removed from the provider too.
x-scope: editor
x-permission: 'code: edit (publish)'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/OkResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
servers:
- url: https://api.tuqo.ru
description: Production
/api/v1/sites/{id}/git/branch:
put:
tags:
- Git
operationId: set_site_git_branch
summary: Change the live branch
description: 'Changes only the live branch of the connected repository: the provider, OAuth connection, webhook and build settings stay as they are, so it also works for sites connected in the dashboard via GitHub/GitFlic/GitLab/Gitea/GitVerse (unlike PUT /git with a new `clone_url`, which detaches the site from its connection). If a webhook is configured and `auto_deploy` is on, pushes to the new branch trigger a deploy; pushes to other branches are ignored. Does not start a deploy — call POST /git/deploy to publish the branch now. Use the short branch name (not `HEAD` or `refs/heads/…`); it must be a valid git branch name (no spaces, `..`, `~^:?*[\`, leading `-`, invisible characters; at most 255 bytes in UTF-8), otherwise 400. No repository connected — 400.'
x-scope: editor
x-permission: 'code: edit (publish)'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitBranchInput'
example:
branch: production
responses:
'200':
description: The connection with the new branch.
content:
application/json:
schema:
$ref: '#/components/schemas/SiteGit'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'500':
$ref: '#/components/responses/InternalError'
servers:
- url: https://api.tuqo.ru
description: Production
/api/v1/sites/{id}/git/deploy:
post:
tags:
- Git
operationId: deploy_site_git
summary: Deploy from the repository
description: 'Manual trigger: the build-runner clones the current HEAD of the branch (from the body or the live branch of the connection) and builds/publishes it. No repository connected — 400. Gates: storage quota (409), deploy rate / build minutes (429), suspension (402). The body is required (may be `{}`).'
x-scope: editor
x-permission: 'code: edit (publish)'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitDeployInput'
example:
branch: main
responses:
'200':
description: The deploy is queued (source_kind=git, status=queued).
content:
application/json:
schema:
$ref: '#/components/schemas/Deploy'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalError'
servers:
- url: https://api.tuqo.ru
description: Production
/api/v1/sites/{id}/git/webhook:
post:
tags:
- Git
operationId: enable_site_git_webhook
summary: Enable the push-to-deploy webhook
description: '(Re)generates the webhook secret and returns the URL + secret to configure at the git provider (GitVerse — Authorization: Bearer ; GitLab — Secret token; GitHub/Gitea — X-Hub-Signature-256). The secret is shown ONCE. No repository connected — 400. No request body.'
x-scope: editor
x-permission: 'code: edit (publish)'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
description: Site id (UUID). The site must belong to the key's project, otherwise 404.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
servers:
- url: https://api.tuqo.ru
description: Production
components:
responses:
PayloadTooLarge:
description: 'Request body exceeds the route limit (axum, text/plain). Limits: JSON routes — 2 MB by default; deploys/deploy-files/blobs — 50 MB; autoreply/files — 52 MB.'
content:
text/plain:
schema:
type: string
Unauthorized:
description: 'Missing/invalid `Authorization: Bearer tqk_...` header, key revoked or expired. After 30 failed attempts from one IP within 60 s — 401 without checking the key.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: 'Authorization: Bearer tqk_... header is required'
InternalError:
description: Internal error (database, Redis, S3).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: internal error
PaymentRequired:
description: The feature or limit requires another plan/option, or the project is suspended for non-payment.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: build preview is available from the Start plan.
UnsupportedMediaType:
description: 'JSON route without `Content-Type: application/json` (axum, text/plain).'
content:
text/plain:
schema:
type: string
UnprocessableEntity:
description: 'JSON is syntactically valid but does not match the schema: missing required field or wrong type (axum, text/plain).'
content:
text/plain:
schema:
type: string
NotFound:
description: 'Resource not found or belongs to another project (tenant isolation: resources of other projects are indistinguishable from missing ones).'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: not found
BadRequest:
description: 'Invalid data: body/parameter validation failed (JSON error `{message}`). axum also returns 400 as text/plain for syntactically invalid JSON, an invalid UUID in the path or invalid query parameters.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: site name is required
Forbidden:
description: 'Not allowed. For a key with section permissions the message names the missing permission (for example “Form submissions: read”) or the site outside the key''s list; the project owner or an administrator changes permissions in Tuqo → project → AI & API without reissuing the key. Older keys get the previous text (“insufficient permissions”). Also returned for a blocked account or site.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: insufficient permissions
TooManyRequests:
description: 'Rate limit exceeded: deploys per day (beyond it deploys are taken from a one-off deploy pack if the account has one; the message names the plan and the pack), at most 60 deploys per hour per site (a guard against runaway scripts on every plan, not a plan limit), build minutes per month, domain DNS checks (once per 10 s).'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: domain check was run recently, please wait
Conflict:
description: State conflict (subdomain taken, storage/site/domain quota, invalid deploy status, etc.).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: subdomain 'moe-portfolio' is already taken
schemas:
GitBranchInput:
type: object
required:
- branch
properties:
branch:
type: string
description: New live branch, e.g. `main`, `production`, `release/2026.10`. Short name, valid git branch name, at most 255 bytes in UTF-8.
example:
branch: production
SiteGit:
type: object
properties:
site_id:
type: string
format: uuid
provider:
type: string
description: '`generic` for connections made via REST; `github`, `gitlab`, `gitea`, `gitverse` or `gitflic` for sites connected in the dashboard.'
clone_url:
type: string
branch:
type: string
auth_user:
type:
- string
- 'null'
connection_id:
type:
- string
- 'null'
format: uuid
install_command:
type:
- string
- 'null'
build_command:
type:
- string
- 'null'
output_dir:
description: 'Build output folder inside the project (relative to root_dir, or to the repository root when root_dir is empty): no leading /, no .., no backslash. It must contain index.html (or TanStack Start''s _shell.html, which becomes index.html); otherwise the deploy fails and the previous version, if any, stays live. Empty: auto-detect (dist, dist/client, build, build/client, out, .vitepress/dist, .output/public, _site, site, storybook-static, public as a fallback), preferring the first folder with a home page.'
type:
- string
- 'null'
root_dir:
description: 'Project subfolder inside the repository (monorepo), relative to the repository root: no leading /, no .., no backslash. Empty: the repository root.'
type:
- string
- 'null'
auto_deploy:
type: boolean
preview_enabled:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
required:
- site_id
- provider
- clone_url
- branch
- auth_user
- connection_id
- install_command
- build_command
- output_dir
- root_dir
- auto_deploy
- preview_enabled
- created_at
- updated_at
description: Site repository connection (`shared::model::SiteGit`; secrets are not returned).
Deploy:
type: object
properties:
id:
type: string
format: uuid
site_id:
type: string
format: uuid
status:
type: string
enum:
- queued
- building
- ready
- active
- failed
- superseded
- skipped
description: 'Lifecycle: queued → building → ready → active (or failed); replaced as live — superseded. skipped — a Git CD push that was not published because of a plan limit (reason in `error`, consecutive pushes merged into one record, see `skip_count`); not a deploy.'
source_ref:
type: string
description: S3 key of the sources/manifest (internal).
source_kind:
type: string
description: 'How it was created: "sources" — a full file set or archive (including deploy-files), "manifest" — a manifest deploy from blobs, "git" — Git CD. The value "dist" is mentioned in a model comment but never assigned by code (legacy).'
enum:
- sources
- manifest
- git
build_mode:
type:
- string
- 'null'
enum:
- static
- build
- null
description: 'How it was actually published (written by the build-runner): `static` — as is, no build minutes; `build` — a build ran. null until it reaches ready.'
commit_sha:
type:
- string
- 'null'
size_bytes:
type: integer
artifacts_purged:
type: boolean
description: Artifacts were purged by retention or deletion — the copy cannot be activated.
error:
type:
- string
- 'null'
description: Error text when status=failed.
created_by:
type:
- string
- 'null'
format: uuid
description: Creating user (null for an API key).
created_via:
type:
- string
- 'null'
enum:
- panel
- api_key
- oauth
- git
- instant
- null
description: 'How the deploy was created: panel, API key, OAuth app, Git CD push webhook (`git`), or Tuqo Drop draft (`instant`).'
creator_label:
type:
- string
- 'null'
description: Key name / `tqk_…` prefix or OAuth app name.
branch:
type:
- string
- 'null'
description: Branch (for source_kind=git).
is_preview:
type: boolean
description: Built without publishing (`activate:false`) — the live URL was not changed.
has_preview_link:
type: boolean
description: Whether a preview link has been issued (the secret itself is not returned).
content_hold:
type: boolean
description: 'The version waits for a decision after a layout change: built but not activated, because the new markup loses content. Only on ready versions with files; omitted when false.'
content_warnings:
type: array
items:
type: object
properties:
level:
type: string
enum:
- info
- advice
- danger
code:
type: string
key:
type: string
message:
type: string
description: In the request language.
rename:
type: object
description: Suggested mapping for the `renames` of a content edit.
properties:
list:
type: string
from:
type: string
to:
type: string
description: 'Activating this version loses content: the differences between its markup and the content. Activation needs `accept_content_warnings=true`. Also on a version that no longer waits (a newer layout is live) and on a build without publishing. Omitted when no confirmation is needed.'
content:
type: object
description: 'Only in `GET /api/v1/deploys/{id}`, on sites with the content editor: `revision` of the content, markup `issues`, `changes` of the layout against the content, `overridden` values, `hold` (waits for a decision) and `hint` — what to do next.'
pr_number:
type:
- integer
- 'null'
skipped_paths:
type: array
items:
type: string
description: 'Paths that were not published, PHP files first: PHP (`.php`, `.phtml`, … — Tuqo never runs server code; use Tuqo Forms for contact forms) and service paths (`.git`, `.env`, `/__tuqo/…`, `/.well-known/acme-challenge/…`); the list is truncated.'
skip_count:
type: integer
format: int32
minimum: 0
description: 'For `skipped`: how many consecutive pushes were not published (`created_at` — the first, `finished_at` — the last). 0 for other statuses.'
from_pack:
type: boolean
description: The deploy went beyond the plan's daily deploy limit and was paid from the account's one-off deploy pack (bought in the panel). A failed build returns it to the pack.
created_at:
type: string
format: date-time
started_at:
type:
- string
- 'null'
format: date-time
finished_at:
type:
- string
- 'null'
format: date-time
recommendations:
$ref: '#/components/schemas/Recommendations'
required:
- id
- site_id
- status
- source_ref
- source_kind
- build_mode
- commit_sha
- size_bytes
- artifacts_purged
- error
- created_by
- created_via
- creator_label
- branch
- is_preview
- has_preview_link
- pr_number
- skipped_paths
- skip_count
- from_pack
- created_at
- started_at
- finished_at
description: Site deploy (`shared::model::Deploy`). The `recommendations` field appears only in deploy-files and deploys/manifest responses when checks are enabled and there are findings.
example:
id: c0ffee00-1234-4abc-8def-0123456789ab
site_id: 2b1d6a7e-0c1f-4b6e-9a2d-5f3c8e7d1a20
status: queued
source_ref: ''
source_kind: manifest
build_mode: null
commit_sha: null
size_bytes: 0
artifacts_purged: false
error: null
created_by: null
created_via: api_key
creator_label: ci-key
branch: null
is_preview: false
has_preview_link: false
pr_number: null
skipped_paths: []
skip_count: 0
from_pack: false
created_at: '2026-09-07T12:00:00Z'
started_at: null
finished_at: null
OkResponse:
type: object
properties:
ok:
type: boolean
description: Always true.
required:
- ok
example:
ok: true
WebhookResponse:
type: object
properties:
webhook_url:
type: string
format: uri
secret:
type: string
description: Webhook secret — shown ONCE.
hint:
type: string
description: How to configure the webhook at the provider (GitVerse/GitLab/GitHub/Gitea).
required:
- webhook_url
- secret
- hint
example:
webhook_url: https://api.tuqo.ru/git/webhook/2b1d6a7e-0c1f-4b6e-9a2d-5f3c8e7d1a20
secret: 0123…
hint: 'Add a webhook in the repository: URL = webhook_url, method POST, format application/json, event push …'
GitDeployInput:
type: object
properties:
branch:
type:
- string
- 'null'
description: Override the branch (default — the live branch of the connection). Must be a short, valid git branch name (git check-ref-format, not `HEAD`/`refs/…`), otherwise 400.
example: {}
GitConfigInput:
type: object
properties:
clone_url:
type: string
format: uri
description: https URL of the repository (required). https only, no userinfo; the host must resolve to public addresses (anti-SSRF), otherwise 400.
branch:
type:
- string
- 'null'
default: main
description: Live branch (default `main`). Must be a short, valid git branch name (git check-ref-format, not `HEAD`/`refs/…`), otherwise 400.
auth_user:
type:
- string
- 'null'
description: User name for HTTP Basic (default oauth2). Not needed for a public repository.
token:
type:
- string
- 'null'
description: PAT/token for a private repository. Encrypted on the server, never returned. Empty → public repository.
install_command:
type:
- string
- 'null'
build_command:
type:
- string
- 'null'
output_dir:
description: 'Build output folder inside the project (relative to root_dir, or to the repository root when root_dir is empty): no leading /, no .., no backslash. It must contain index.html (or TanStack Start''s _shell.html, which becomes index.html); otherwise the deploy fails and the previous version, if any, stays live. Empty: auto-detect (dist, dist/client, build, build/client, out, .vitepress/dist, .output/public, _site, site, storybook-static, public as a fallback), preferring the first folder with a home page.'
type:
- string
- 'null'
root_dir:
description: 'Project subfolder inside the repository (monorepo), relative to the repository root: no leading /, no .., no backslash. Empty: the repository root.'
type:
- string
- 'null'
required:
- clone_url
example:
clone_url: https://gitverse.ru/user/site.git
branch: main
token: glpat-…
build_command: npm run build
output_dir: dist
Recommendations:
type: object
properties:
summary:
type: object
properties:
fix:
type: integer
improve:
type: integer
description: Number of findings of each level in the whole report.
items:
type: array
items:
$ref: '#/components/schemas/Finding'
description: First 5 items (most important first).
more:
type: integer
description: Number of items not shown.
note:
type: string
description: 'Reminder: these are suggestions about files, not errors — the site is published and working.'
required:
- summary
- items
- more
- note
description: Recommendations for the latest publish (`shared::checks::recommendations`). Present only if the site's `checks_enabled` switch is on and the report is not empty.
Finding:
type: object
properties:
code:
type: string
description: Machine-readable finding code.
level:
type: string
enum:
- fix
- improve
description: '`fix` — worth fixing, `improve` — a suggestion.'
title:
type: string
why:
type: string
description: Why it matters.
how:
type: string
description: How to fix it.
where:
type: array
items:
type: string
description: File paths where it was found.
required:
- code
- level
- title
- why
- how
- where
description: A site checks recommendation item (`shared::checks::Finding`).
Error:
type: object
properties:
message:
type: string
description: 'Human-readable error message in the language of the `Accept-Language` header: English for `en`, otherwise Russian.'
required:
- message
description: 'Common REST API error format: `{"message": "..."}`. Codes: 400 — invalid data (validation), 401 — key missing/invalid/revoked/expired, 402 — the feature or limit requires a paid plan/option, 403 — the key lacks the permission named in the message, or the site is outside the key''s list, 404 — resource not found or belongs to another project (resources of other projects are indistinguishable from missing ones), 409 — state conflict (subdomain taken, storage quota, deploy cannot be activated, etc.), 429 — rate limit exceeded (deploys per day, the 60-deploys-per-hour-per-site guard against runaway scripts, build minutes, DNS checks), 500 — internal error, 503 — service/storage unavailable.'
example:
message: not found
securitySchemes:
apiKey:
type: http
scheme: bearer
bearerFormat: tqk_<prefix>_<secret>
description: 'Project API key in the `tqk_<prefix>_<secret>` format — issued in the panel app.tuqo.ru on the project''s “AI & API” tab (shown once). Passed in the `Authorization: Bearer tqk_...` header. Permissions are set per key by section — create_sites, delete_sites (true/false), code, content, leads, visitors, domains (none/view/edit), stats (none/view) — and by site (all project sites or selected ones); presets: full, developer, content, crm, readonly. The permission each operation needs is in the `x-permission` extension; `GET /api/v1/whoami` returns the key''s own (`access`). Older keys (`access.legacy = true`) are checked by their scope: `full` ⊃ `editor` ⊃ `readonly`, the level is in `x-scope`. A key is bound to ONE project; projects, keys, members and billing are managed only in the panel.'
x-refined-from:
- openapi.json
- tuqo-ru-openapi.json