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

# Deploy a subgraph

> Deploy a compiled subgraph bundle as `name`/`version`.

Send `multipart/form-data` with a `bundle` file part — a zip of your `graph build` output. Bundles are limited to 50 MB compressed and 100 MB extracted.


Example: `curl -X PUT -H "authorization: Bearer $GOLDSKY_API_KEY" -F bundle=@build.zip -F description="My subgraph" https://api.goldsky.com/api/v1/subgraphs/my-subgraph/deployments/1.0.0`



## OpenAPI

````yaml https://api.goldsky.com/api/v1/docs/openapi.json put /subgraphs/{name}/deployments/{version}
openapi: 3.1.0
info:
  title: Goldsky API
  description: >-
    REST API for managing Goldsky resources — pipelines, subgraphs, and Edge
    endpoints. Create, deploy, monitor, and manage them programmatically.


    For guides and reference, see the [Goldsky
    documentation](https://docs.goldsky.com) — including
    [Subgraphs](https://docs.goldsky.com/subgraphs/introduction) and
    [Pipelines](https://docs.goldsky.com/mirror/introduction).


    ## Authentication


    Every request carries an API token as a bearer token:


    ```

    Authorization: Bearer <token>

    ```


    Create one in the [Goldsky
    dashboard](https://app.goldsky.com/dashboard/settings/project) under project
    settings. A token is scoped to the project it was created in, so the project
    is never part of a request path.


    Read operations need the Viewer role; writes need Editor.


    ## Errors


    Errors are [RFC 9457 problem
    details](https://www.rfc-editor.org/rfc/rfc9457) served as
    `application/problem+json`:


    ```json

    {
      "type": "https://api.goldsky.com/api/errors/subgraph-not-found",
      "title": "Subgraph not found",
      "status": 404,
      "detail": "No subgraph named 'my-subgraph' exists in this project.",
      "instance": "/api/v1/subgraphs/my-subgraph"
    }

    ```


    Branch on `type`, not on `title` or `detail` — the URI is stable, the prose
    is not. Every `type` dereferences to a human-readable page describing the
    cause and the fix; the full list lives at
    [api.goldsky.com/api/errors](https://api.goldsky.com/api/errors). Validation
    failures (400) add an `errors` array naming each offending field.


    ## Pagination


    List endpoints that can return unbounded results — pipelines and subgraphs —
    page with `page_size` and `page_token`:


    ```

    GET /api/v1/subgraphs?page_size=50

    GET /api/v1/subgraphs?page_size=50&page_token=<pagination.next_page_token>

    ```


    Keep following `pagination.next_page_token` until it comes back `null`. A
    page can hold fewer than `page_size` items and still have a next page, so
    treat a short page as "keep going", not as the end.
  version: 1.2.0
  contact:
    name: Goldsky Support
    email: support@goldsky.com
    url: https://docs.goldsky.com
servers:
  - url: /api/v1
    description: Current environment
security:
  - BearerAuth: []
tags:
  - name: Pipelines
    x-displayName: Create & manage
    description: >-
      Create, read, and delete pipelines. A pipeline is identified by its name
      within the project.
  - name: Pipeline Authoring
    x-displayName: Validate & preview
    description: >-
      Check a pipeline definition and see what it would produce, before creating
      anything. Neither endpoint touches an existing pipeline.
  - name: Pipeline Lifecycle
    x-displayName: Lifecycle
    description: Pause, resume, and restart a running pipeline.
  - name: Pipeline Status
    x-displayName: Status
    description: Query pipeline runtime status and per-source progress state.
  - name: Pipeline Logs
    x-displayName: Logs
    description: Retrieve pipeline execution logs and error counts.
  - name: Subgraphs
    x-displayName: Browse
    description: >-
      Read subgraphs and their versions. A subgraph is identified by
      `name`/`version`.
  - name: Subgraph Deployments
    x-displayName: Deployments
    description: >-
      Deploy a compiled subgraph bundle as a new version, or remove a deployed
      one.
  - name: Subgraph Tags
    x-displayName: Tags
    description: >-
      Point a stable alias — `production`, say — at a specific version, so
      consumers keep one URL across deploys.
  - name: Subgraph Lifecycle
    x-displayName: Lifecycle
    description: Pause and resume indexing, and update the settings of a deployed version.
  - name: Subgraph Logs
    x-displayName: Logs
    description: Retrieve subgraph indexing logs.
  - name: Subgraph Webhooks
    x-displayName: Webhooks
    description: >-
      Stream row-level changes to a subgraph entity out to a URL. Webhooks are
      project-scoped and each one targets a single entity of a single subgraph
      version.
  - name: Edge Endpoints
    x-displayName: Create & manage
    description: >-
      Create and manage Edge endpoints — RPC and Data — including rate limits
      and allowed domains.
  - name: Edge Lifecycle
    x-displayName: Lifecycle
    description: >-
      Pause and resume an endpoint. A paused endpoint rejects traffic but keeps
      its configuration and key.
  - name: Edge API Keys
    x-displayName: API keys
    description: Reveal the API key an Edge endpoint serves traffic under.
  - name: Edge Metrics
    x-displayName: Metrics
    description: Request volume and error rates for an Edge endpoint.
  - name: Catalogs
    x-displayName: Catalogs
    description: >-
      What Goldsky supports: chains you can index a subgraph on, and the
      networks and datasets an Edge endpoint can be pointed at.
      Unauthenticated-safe reads that never change per project.
paths:
  /subgraphs/{name}/deployments/{version}:
    put:
      tags:
        - Subgraph Deployments
      summary: Deploy a subgraph
      description: >-
        Deploy a compiled subgraph bundle as `name`/`version`.


        Send `multipart/form-data` with a `bundle` file part — a zip of your
        `graph build` output. Bundles are limited to 50 MB compressed and 100 MB
        extracted.



        Example: `curl -X PUT -H "authorization: Bearer $GOLDSKY_API_KEY" -F
        bundle=@build.zip -F description="My subgraph"
        https://api.goldsky.com/api/v1/subgraphs/my-subgraph/deployments/1.0.0`
      operationId: deploySubgraph
      parameters:
        - schema:
            pattern: ^[a-zA-Z][\w-]*$
            type: string
          in: path
          name: name
          required: true
        - schema:
            pattern: ^[a-zA-Z0-9][\w+.-]*$
            type: string
          in: path
          name: version
          required: true
      requestBody:
        content:
          multipart/form-data:
            schema:
              description: >-
                Send each option as an ordinary `multipart/form-data` field,
                e.g. `-F overwrite=0`. Fields appear below as `{ value }`
                because that is how a form field looks once parsed.
              type: object
              properties:
                bundle:
                  description: >-
                    Zip of the compiled subgraph build directory (`graph build`
                    output), sent as a file part.
                  type: object
                  properties:
                    encoding:
                      type: string
                    filename:
                      type: string
                    mimetype:
                      type: string
                  required:
                    - encoding
                    - filename
                    - mimetype
                overwrite:
                  description: >-
                    Deprecated. Send "0" or omit it — "1" is rejected. To
                    replace a version, delete it and deploy again, or move a tag
                    to it.
                  type: object
                  properties:
                    value:
                      pattern: ^[01]$
                      type: string
                  required:
                    - value
                remove_graft:
                  description: >-
                    Set to "1" to strip the graft from the manifest before
                    deploying.
                  type: object
                  properties:
                    value:
                      pattern: ^[01]$
                      type: string
                  required:
                    - value
                skip_graft_validation:
                  description: Set to "1" to skip validation of the graft base subgraph.
                  type: object
                  properties:
                    value:
                      pattern: ^[01]$
                      type: string
                  required:
                    - value
                start_block:
                  description: Block number to start indexing from.
                  type: object
                  properties:
                    value:
                      pattern: ^[0-9]+$
                      type: string
                  required:
                    - value
                graft_from:
                  description: >-
                    `name/version` of an existing subgraph in this project to
                    graft from.
                  type: object
                  properties:
                    value:
                      type: string
                  required:
                    - value
                description:
                  description: Human-readable description (max 500 characters).
                  type: object
                  properties:
                    value:
                      maxLength: 500
                      type: string
                  required:
                    - value
                graph_node_shard:
                  description: >-
                    Advanced: pin the deployment to a specific indexing shard.
                    Leave this unset unless Goldsky support asked you to set it.
                  type: object
                  properties:
                    value:
                      type: string
                  required:
                    - value
            example:
              bundle:
                encoding: 7bit
                filename: bundle.zip
                mimetype: application/zip
              overwrite:
                value: '0'
              description:
                value: My subgraph
        description: >-
          Send each option as an ordinary `multipart/form-data` field, e.g. `-F
          overwrite=0`. Fields appear below as `{ value }` because that is how a
          form field looks once parsed.
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  version:
                    type: string
                  tag:
                    type: object
                    properties:
                      target_version:
                        type: string
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - ACTIVE
                      - type: string
                        enum:
                          - PAUSED
                  network:
                    type: string
                  health:
                    anyOf:
                      - type: string
                        enum:
                          - HEALTHY
                      - type: string
                        enum:
                          - UNHEALTHY
                      - type: string
                        enum:
                          - FAILED
                      - type: string
                        enum:
                          - UNKNOWN
                  synced:
                    type: boolean
                  graphql_endpoint:
                    type: string
                  private_graphql_endpoint:
                    type: string
                  public_endpoint_enabled:
                    type: boolean
                  private_endpoint_enabled:
                    type: boolean
                  description:
                    anyOf:
                      - type: string
                      - type: 'null'
                  deployments:
                    type: array
                    items:
                      type: object
                      properties:
                        deployment_id:
                          type: string
                        created_at:
                          format: date-time
                          type: string
                        health:
                          anyOf:
                            - type: string
                              enum:
                                - HEALTHY
                            - type: string
                              enum:
                                - UNHEALTHY
                            - type: string
                              enum:
                                - FAILED
                            - type: string
                              enum:
                                - UNKNOWN
                        synced:
                          type: boolean
                        fatal_error:
                          anyOf:
                            - type: string
                            - type: 'null'
                        non_fatal_errors:
                          type: array
                          items:
                            type: string
                        indexing_progress:
                          type: object
                          properties:
                            network:
                              type: string
                            progress_percent:
                              type: number
                            chain_head_block:
                              type: number
                            deployment_head_block:
                              type: number
                            deployment_start_block:
                              type: number
                            synced:
                              type: boolean
                          required:
                            - network
                            - progress_percent
                            - chain_head_block
                            - deployment_head_block
                            - deployment_start_block
                            - synced
                      required:
                        - deployment_id
                        - created_at
                        - health
                        - synced
                        - fatal_error
                        - non_fatal_errors
                required:
                  - name
                  - version
                  - status
                  - network
                  - health
                  - synced
                  - graphql_endpoint
                  - private_graphql_endpoint
                  - public_endpoint_enabled
                  - private_endpoint_enabled
                  - description
                  - deployments
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token generated from the [Goldsky
        Dashboard](https://app.goldsky.com/dashboard/settings/project). Pass as:
        Authorization: Bearer <token>

````

## Related topics

- [Deploy a subgraph](/subgraphs/deploying-subgraphs.md)
- [Create no-code subgraphs](/subgraphs/guides/create-a-no-code-subgraph.md)
- [Index onchain data with Subgraphs](/subgraphs/introduction.md)
- [Agent Skills](/ai-skills.md)
- [Send subgraph-driven webhooks](/subgraphs/guides/send-subgraph-driven-webhooks.md)
