> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instacloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a backup of the postgres service root branch

> **Token scope:** `account` · `org` · `project` — read-only tokens refused (not a GET).



## OpenAPI

````yaml /openapi/project.json post /projects/{projectId}/backups
openapi: 3.1.0
info:
  title: InstaCloud API — Project level
  version: 0.1.0
  description: >-
    Endpoints under `/projects/{projectId}`: branches, services, deploys,
    secrets, databases, storage, cron, observability, governance. Callable with
    any token whose binding covers the project.


    Generated from the platform's own OpenAPI document
    (https://api.instacloud.com/openapi.json); see the [API
    overview](/reference/api/overview) for authentication and token scopes.
servers:
  - url: https://api.instacloud.com
    description: InstaCloud
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Projects inside an organization.
  - name: Branches
    description: >-
      Branch environments of a project: isolated database, storage and compute
      per branch.
  - name: Services
    description: 'Services on a branch: compute, postgres, storage and managed databases.'
  - name: Deploy
    description: Deploy an image or a source to a compute service.
  - name: Compute
    description: Build output of a compute service.
  - name: Secrets
    description: User secrets, service credentials and how they bind into compute env.
  - name: Database
    description: Postgres databases, extensions, credentials and ad-hoc SQL.
  - name: Storage
    description: Objects in a storage service.
  - name: Backups
    description: Database backups and restores.
  - name: Cron
    description: Scheduled HTTP calls against a service or an external URL.
  - name: Observability
    description: Logs, metrics, deploy events and database insight.
  - name: Governance
    description: Per-project agent policy and the approval queue.
  - name: Audit
    description: The project's event timeline, including agent-ingested events.
  - name: Domains
    description: >-
      Domains bought through InstaCloud, bring-your-own zones and their DNS
      records.
  - name: Billing
    description: Usage, cycles, invoices and credits.
  - name: Templates
    description: Deploy a template into a project.
paths:
  /projects/{projectId}/backups:
    post:
      tags:
        - Backups
      summary: Create a backup of the postgres service root branch
      description: >-
        **Token scope:** `account` · `org` · `project` — read-only tokens
        refused (not a GET).
      operationId: createBackup
      parameters:
        - schema:
            type: string
          in: query
          name: name
          required: false
          description: snapshot name
        - schema:
            type: string
            enum:
              - manual
          in: query
          name: type
          required: false
          description: manual backup tag; createBackup always creates manual backups
        - schema:
            type: string
          in: query
          name: expiresAt
          required: false
          description: RFC3339 expiry; omitted = keep until deleted
        - schema:
            type: string
          in: query
          name: timestamp
          required: false
          description: RFC3339 past point within the history window; omitted = now
        - schema:
            type: string
          in: query
          name: group
          required: false
          description: 'postgres service name (default: the sole postgres service)'
        - schema:
            format: uuid
            type: string
          in: path
          name: projectId
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DbSnapshot'
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  approvalId:
                    type: string
                  action:
                    type: string
                  actions:
                    type: array
                    items:
                      type: string
                  message:
                    type: string
                  url:
                    type: string
                required:
                  - status
                  - approvalId
                  - action
                  - actions
                  - message
                  - url
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DbSnapshot:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          description: provider backup type, such as full or incr
          type: string
        tags:
          description: >-
            provider backup tags; tags.type=manual marks user-created manual
            backups
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
        timestamp:
          type: string
        sizeBytes:
          type: number
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Session access JWT or an API token (`insta_<prefix>_<secret>`).

````