---
title: "Upload the .gh file of a capsule"
method: POST
path: "/v3/backoffice/capsule/{id}/gh"
tags: ["Knowledge Capsule"]
---

# Upload the .gh file of a capsule

`POST /v3/backoffice/capsule/{id}/gh`

## Request

- Base URL: `https://api.rhinoartisan.com`
- URL: `https://api.rhinoartisan.com/v3/backoffice/capsule/{id}/gh`
- Auth: API key in header `apikey`
- TypeScript: <https://skmtc.dev/rhinoartisan/apis/rhinoartisan-api/docs/v3/backoffice/capsule/:id/gh/post.ts> (a function with typed inputs; its response is checked against the schema)

Multipart upload of the Grasshopper definition (field "file", .gh or .ghx, up to 25 MB). Replaces the previous one. The object is stored privately and is never served by public URL.

## Path parameters

- `id` integer, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required

## Response `200`

File uploaded successfully

## Other responses

- `400`: FILE_REQUIRED, INVALID_GH_FORMAT, EMPTY_FILE, FILE_TOO_LARGE or UNREADABLE_FILE
- `401`: Unauthorized
- `403`: Access denied
- `404`: CAPSULE_NOT_FOUND

## Changes

- **2026-10-15** `598bac108453`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rhinoartisan/apis/rhinoartisan-api/changes/v3/backoffice/capsule/:id/gh/post.md)

---

[API](https://skmtc.dev/rhinoartisan/apis/rhinoartisan-api.md) - [All operations](https://skmtc.dev/rhinoartisan/apis/rhinoartisan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rhinoartisan/apis/rhinoartisan-api/revisions/f0e1d3d69cfb?raw)
