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

# Get a download link for a tool's code

> Get a short-lived link that downloads the code a tool your team built runs now, as a zip of its live version's files, for a coding agent or anything else you give it to.

<Accordion title="Details">
  * Business accounts only.

  * download\_url needs no sign-in. It downloads the zip once, and stops working 30 minutes after it was made, at expires\_at. Until then anyone with the link can download the code, so share it only with whoever should read it.

  * The zip is the one code.export answers. start\_with names the files to read first.

  * Each call makes a new link.

  * **Callers:** an API key, an MCP OAuth token or a Dashboard session.

  * **Permission:** `tools:read`.

  * **Effect:** Creates or changes something.

  * **Errors:** [`business_account_required`](/errors#business_account_required), [`not_found`](/errors#not_found), and the [errors any request can get](/errors).
</Accordion>


## OpenAPI

````yaml /api-reference/openapi.json post /v1/code/{id}/export-link
openapi: 3.1.0
info:
  title: Pomerado API
  version: '1'
  description: >-
    Run and build website tools, follow their jobs, and manage logins, API keys
    and webhooks. Authenticate with a Pomerado API key (pom_…), an MCP OAuth
    token or a Dashboard session as a Bearer token.
servers:
  - url: https://api.pomerado.ai
security: []
tags:
  - name: account
    x-group: Account
  - name: api_keys
    x-group: API keys
  - name: connected_apps
    x-group: Connected apps
  - name: usage
    x-group: Usage
  - name: quota
    x-group: Quota
  - name: billing
    x-group: Billing
  - name: integrations
    x-group: Integrations
  - name: connect
    x-group: Connect
  - name: code
    x-group: Code
  - name: logins
    x-group: Saved logins
  - name: two_factor
    x-group: 2FA
  - name: login_access
    x-group: Login access
  - name: tools
    x-group: Tools
  - name: webhooks
    x-group: Webhooks
  - name: runs
    x-group: Runs
  - name: builds
    x-group: Builds
  - name: jobs
    x-group: Jobs
  - name: files
    x-group: Files
  - name: team
    x-group: Team
paths:
  /v1/code/{id}/export-link:
    post:
      tags:
        - code
      summary: Get a download link for a tool's code
      description: >-
        Get a short-lived link that downloads the code a tool your team built
        runs now, as a zip of its live version's files, for a coding agent or
        anything else you give it to.
      operationId: code.export_link
      parameters:
        - name: id
          in: path
          required: true
          description: 'a tool ID: tool_ and 32 lowercase hex digits'
          schema:
            type: string
            examples:
              - tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
      responses:
        '200':
          description: The link to the zip
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeExportLink'
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized, reauthentication_required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: business_account_required, forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: internal_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: temporarily_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    CodeExportLink:
      type: object
      required:
        - download_url
        - expires_at
        - file_name
        - size
        - tool_name
        - integration_name
        - site_url
        - editable
        - start_with
      properties:
        download_url:
          type: string
          description: >-
            A link to the zip that needs no sign-in: one GET downloads it,
            before expires_at
        expires_at:
          $ref: '#/components/schemas/DateFromString'
        file_name:
          type: string
          description: A name to save it under, such as acme-travel-search-flights-v7.zip
        size:
          type: integer
          description: The zip's size in bytes
        tool_name:
          type: string
          description: The tool's name
        integration_name:
          type: string
          description: The integration's name
        site_url:
          anyOf:
            - type: string
            - type: 'null'
          description: The website's https origin, or null for an offline tool
        editable:
          type: boolean
          description: >-
            Whether code.save_draft can save changes to the tool's draft: false
            for a public tool, whose code is read only
        start_with:
          type: array
          items:
            type: string
          description: >-
            Where to start reading: the paths of your team's files the tool
            runs, such as src/tool.mjs
      additionalProperties: false
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - docs_url
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            docs_url:
              type: string
            details:
              type: object
              required: []
              properties: {}
              additionalProperties:
                $id: /schemas/unknown
          additionalProperties: false
      additionalProperties: false
    DateFromString:
      type: string
      description: a string to be decoded into a Date
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.