---
agentTools:
  projectIndex: https://shipyard.readme.io/llms.txt
---

# Upload External File

Upload a file containing the code to be executed as part of a Blueprint Vessel

### Usage

This action is a prerequisite for **Create Blueprint** and optionally for **Updated Blueprint**.

### Request Body

The provided file is uploaded as a `multipart/form-data` request. As an example, this could be a `script.py` with the contents:

```python
print('hello, world!')
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Shipyard API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.app.shipyardapp.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Shipyard-API-Key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/orgs/{org_id}/temporary_external_files": {
      "post": {
        "summary": "Upload External File",
        "description": "Upload a file containing the code to be executed as part of a Blueprint Vessel",
        "operationId": "upload-external-file",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "UUID of the Organization to upload the file into",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The file content you want to upload and run in a Vessel",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"RequestID\": \"a4709312-b67c-4f3e-b90a-b26a7a6d562e\",\n        \"ExternalFile\": \"s3://production-shipyard-uploads-tmp/tmp/organizations/TEMP/requests/a4709312-b67c-4f3e-b90a-b26a7a6d562e.sefv2_a12a6ac1-2b48-48ee-b222-fe2cfbcb39ba\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "RequestID": {
                          "type": "string",
                          "example": "a4709312-b67c-4f3e-b90a-b26a7a6d562e"
                        },
                        "ExternalFile": {
                          "type": "string",
                          "example": "s3://production-shipyard-uploads-tmp/tmp/organizations/TEMP/requests/a4709312-b67c-4f3e-b90a-b26a7a6d562e.sefv2_a12a6ac1-2b48-48ee-b222-fe2cfbcb39ba"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6572604cfc3f31000fe88156:65737b6192794f0029b2619a"
}
```