uploads.sh GitHub API

Pull requests, repositories and the managed PR comment.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v1/workspaces/{workspace}/pulls List pull requests #
GET /v1/workspaces/{workspace}/repos List repositories #
GET /v1/workspaces/{workspace}/scope/{owner}/{repo}/files List files for a repo or PR #
POST /v1/workspaces/{workspace}/github/comment Sync the PR comment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/uploads-sh:uploads-sh-github-api"
All apis
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.

Get an API 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 Specification

uploads-sh-github-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: uploads.sh GitHub API
  version: 1.0.0
  description: 'Workspace-scoped file hosting for agents and humans. The canonical public hierarchy is `/v1/workspaces/{workspace}/...`. Full narrative docs: https://uploads.sh/docs/api'
  contact:
    url: https://github.com/buildinternet/uploads
  license:
    name: Apache-2.0
    url: https://github.com/buildinternet/uploads/blob/main/LICENSE
servers:
- url: https://api.uploads.sh
  description: Production API
security:
- bearerAuth: []
tags:
- name: Github
  description: Pull requests, repositories and the managed PR comment.
paths:
  /v1/workspaces/{workspace}/pulls:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    get:
      operationId: listPulls
      tags:
      - Github
      security:
      - bearerAuth:
        - files:read
      summary: List pull requests
      description: PRs in this workspace with uploads, newest media first. By default only PRs with media in the last 90 days; pass `all=1` for every PR or `since` for a custom window. `type` and `surface` narrow the thumbnails, not the list.
      parameters:
      - name: repo
        in: query
        schema:
          type: string
        description: '`owner/repo`.'
      - name: state
        in: query
        schema:
          type: string
          enum:
          - open
          - closed
          - merged
      - name: all
        in: query
        schema:
          type: string
          enum:
          - '1'
      - name: since
        in: query
        schema:
          type: string
          pattern: ^[1-9]\d{0,2}d$
        description: Only media uploaded in the last N days, `1d` to `365d`.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - screenshot
          - video
          - other
      - name: surface
        in: query
        schema:
          type: string
          enum:
          - mobile
          - desktop
          - tablet
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: One page of pull requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullList'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/workspaces/{workspace}/repos:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    get:
      operationId: listRepos
      tags:
      - Github
      security:
      - bearerAuth:
        - files:read
      summary: List repositories
      description: Repos with GitHub-tagged uploads. `since` narrows the list; `type` and `surface` narrow the thumbnails. `thumbnails=0` returns names only.
      parameters:
      - name: since
        in: query
        schema:
          type: string
          pattern: ^[1-9]\d{0,2}d$
        description: Only media uploaded in the last N days, `1d` to `365d`.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - screenshot
          - video
          - other
      - name: surface
        in: query
        schema:
          type: string
          enum:
          - mobile
          - desktop
          - tablet
      - name: thumbnails
        in: query
        schema:
          type: string
          enum:
          - '0'
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50
          default: 20
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: One page of repositories.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoList'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/workspaces/{workspace}/scope/{owner}/{repo}/files:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    - name: owner
      in: path
      required: true
      schema:
        type: string
    - name: repo
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listScopeFiles
      tags:
      - Github
      security:
      - bearerAuth:
        - files:read
      summary: List files for a repo or PR
      description: Newest-first files tagged to a repo, or to one PR or issue with `number`.
      parameters:
      - name: number
        in: query
        schema:
          type: integer
          minimum: 1
      - name: since
        in: query
        schema:
          type: string
          pattern: ^[1-9]\d{0,2}d$
        description: Only media uploaded in the last N days, `1d` to `365d`.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - screenshot
          - video
          - other
      - name: surface
        in: query
        schema:
          type: string
          enum:
          - mobile
          - desktop
          - tablet
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: One page of files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScopeFiles'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/workspaces/{workspace}/github/comment:
    parameters:
    - $ref: '#/components/parameters/Workspace'
    post:
      operationId: syncGithubComment
      tags:
      - Github
      security:
      - bearerAuth:
        - files:write
      summary: Sync the PR comment
      description: Renders this workspace's files and galleries for a PR or issue and posts or updates the uploads.sh comment as the GitHub App. Call it once after uploading. Bearer token only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GithubCommentRequest'
      responses:
        '200':
          description: What happened to the comment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubCommentResult'
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Metadata:
      type: object
      additionalProperties:
        type: string
    ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - type
          - message
          properties:
            code:
              type: string
            type:
              type: string
            message:
              type: string
            details: {}
    GithubCommentResult:
      oneOf:
      - type: object
        required:
        - posted
        - action
        - count
        properties:
          posted:
            const: true
          action:
            type: string
            enum:
            - created
            - updated
            - skipped
          count:
            type: integer
            minimum: 0
          commentUrl:
            type: string
            format: uri
          held:
            type: integer
            minimum: 0
            description: Files on the PR or issue held for review.
      - type: object
        required:
        - posted
        - reason
        properties:
          posted:
            const: false
          reason:
            type: string
            enum:
            - app_unconfigured
            - not_installed
            - forbidden
            - not_authorized
            - actor_not_authorized
            - unavailable
          message:
            type: string
          fixUrl:
            type: string
            format: uri
          required:
            type: array
            items:
              type: string
      description: 'Integration problems never return 5xx. `posted: false` carries the reason so callers can fall back.'
    Thumbnail:
      type: object
      required:
      - key
      - kind
      - url
      - embedUrl
      - posterUrl
      - status
      properties:
        key:
          type: string
        kind:
          type: string
          enum:
          - screenshot
          - video
          - other
        url:
          type:
          - string
          - 'null'
          format: uri
        embedUrl:
          type:
          - string
          - 'null'
          format: uri
        posterUrl:
          type:
          - string
          - 'null'
          format: uri
        status:
          type: string
          enum:
          - available
          - missing
          - withheld
    GithubCommentRequest:
      type: object
      required:
      - repo
      - num
      - kind
      properties:
        repo:
          type: string
          description: '`owner/repo`.'
        num:
          type: integer
          minimum: 1
        kind:
          type: string
          enum:
          - pull
          - issues
        resync:
          type: boolean
          description: Force a full search for the managed comment instead of the cached id.
    ScopeFiles:
      type: object
      required:
      - repo
      - number
      - items
      - nextCursor
      - privateCount
      - liveLink
      - pull
      properties:
        repo:
          type: string
        number:
          type:
          - integer
          - 'null'
        items:
          type: array
          items:
            $ref: '#/components/schemas/FeedItem'
        nextCursor:
          type:
          - string
          - 'null'
        privateCount:
          type:
          - integer
          - 'null'
          minimum: 0
          description: Private files in the scope, first page only. Null on later pages or when counting would be too costly.
        liveLink:
          type:
          - object
          - 'null'
          required:
          - id
          - url
          - source
          description: The existing public feed for exactly this scope.
          properties:
            id:
              type: string
            url:
              type: string
              format: uri
            source:
              type:
              - string
              - 'null'
              enum:
              - comment
              - user
              - null
        pull:
          type:
          - object
          - 'null'
          required:
          - branch
          - title
          - state
          properties:
            branch:
              type:
              - string
              - 'null'
            title:
              type:
              - string
              - 'null'
            state:
              type:
              - string
              - 'null'
              enum:
              - open
              - closed
              - merged
              - null
    PullList:
      type: object
      required:
      - workspace
      - pulls
      - nextCursor
      properties:
        workspace:
          type: string
        pulls:
          type: array
          items:
            type: object
            required:
            - ref
            - repo
            - number
            - branch
            - title
            - state
            - lastMediaAt
            - thumbnails
            properties:
              ref:
                type: string
                description: Lowercased `owner/repo#number`.
              repo:
                type: string
              number:
                type: integer
                minimum: 1
              branch:
                type:
                - string
                - 'null'
              title:
                type:
                - string
                - 'null'
              state:
                type:
                - string
                - 'null'
                enum:
                - open
                - closed
                - merged
                - null
              lastMediaAt:
                type: string
                format: date-time
              thumbnails:
                type: array
                maxItems: 4
                items:
                  $ref: '#/components/schemas/Thumbnail'
        nextCursor:
          type:
          - string
          - 'null'
    VideoDimensions:
      type: object
      required:
      - width
      - height
      properties:
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
    FeedItem:
      type: object
      required:
      - id
      - filename
      - status
      - url
      - embedUrl
      properties:
        id:
          type: string
        objectKey:
          type: string
        filename:
          type: string
        status:
          type: string
          enum:
          - available
          - missing
          - withheld
        url:
          type:
          - string
          - 'null'
          format: uri
        embedUrl:
          type:
          - string
          - 'null'
          format: uri
        pageUrl:
          type: string
          format: uri
          description: Owner-only item page (`/c/<id>/<item>`).
        contentType:
          type:
          - string
          - 'null'
        size:
          type:
          - integer
          - 'null'
          minimum: 0
        uploaded:
          type:
          - string
          - 'null'
          format: date-time
        modified:
          type:
          - string
          - 'null'
          format: date-time
        path:
          type:
          - string
          - 'null'
        state:
          type:
          - string
          - 'null'
        metadata:
          $ref: '#/components/schemas/Metadata'
        posterUrl:
          type: string
          format: uri
        videoDimensions:
          $ref: '#/components/schemas/VideoDimensions'
    RepoList:
      type: object
      required:
      - workspace
      - repos
      - nextCursor
      properties:
        workspace:
          type: string
        repos:
          type: array
          items:
            type: object
            required:
            - repo
            - lastUpdatedAt
            - openPullCount
            - thumbnails
            properties:
              repo:
                type: string
              lastUpdatedAt:
                type: string
                format: date-time
              openPullCount:
                type: integer
                minimum: 0
              thumbnails:
                type: array
                items:
                  $ref: '#/components/schemas/Thumbnail'
        nextCursor:
          type:
          - string
          - 'null'
  responses:
    Unauthorized:
      description: Missing or invalid credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: The workspace rate limit or upload budget was exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Validation:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The credential lacks the required scope or role.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  parameters:
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Opaque cursor returned by the previous page.
    Workspace:
      name: workspace
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Workspace token from `uploads login` or `/account/developers`. Canonical routes can also accept an uploads.sh browser session, but public API integrations should use a workspace token. Tokens carry named scopes `files:read`, `files:write`, and `files:delete`; each operation lists the required scope as a role name on this scheme. REST v1 does not accept OAuth access tokens (those are for the hosted MCP). Scope catalog: https://api.uploads.sh/.well-known/oauth-protected-resource'
    oauth2:
      type: oauth2
      description: 'Named permission scopes for workspace tokens (this API) and for OAuth 2.1 access tokens on the hosted MCP at https://agents.uploads.sh/mcp. REST v1 authenticates with `bearerAuth` only. Request the scopes listed on each operation. Discovery: https://uploads.sh/.well-known/oauth-authorization-server and https://api.uploads.sh/.well-known/oauth-protected-resource'
      flows:
        authorizationCode:
          authorizationUrl: https://uploads.sh/api/auth/oauth2/authorize
          tokenUrl: https://auth.uploads.sh/api/auth/oauth2/token
          scopes:
            files:read: List, search, read metadata, usage, galleries, and feeds.
            files:write: Upload, update metadata, galleries, feeds, and usage reconcile.
            files:delete: Delete stored objects and purge expired objects.
x-tagGroups:
- name: Core
  tags:
  - Files
  - Review
- name: Sharing
  tags:
  - Galleries
  - Live links
  - Public
- name: Workspace
  tags:
  - GitHub
  - Usage
  - Maintenance