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

# Update Blueprint

Update an existing Blueprint in the target Organization

### Request Body

The same payload options in **Create Blueprint** maybe be used in **Update Blueprint** however `pallet_type` cannot change. The `pallet_config` field `temp` may be updated with new `id` and `url` values if a new external file has been generated via **Upload External File**.

Any fields omitted from the payload will not be updated on the Blueprint. In order to update the `spec_list`, you will need to include the `id` key and `value` from the **Create Blueprint** response in the relevant `spec_list` object. Any `spec_list` objects in the array that do not include an `id` field will be attempted to be added as new input variables.

# 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}/blueprints/{blueprint_id}": {
      "post": {
        "summary": "Update Blueprint",
        "description": "Update an existing Blueprint in the target Organization",
        "operationId": "update-blueprint",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "UUID of the Organization the Blueprint to update is in",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "blueprint_id",
            "in": "path",
            "description": "UUID of the target Blueprint to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "string",
                    "description": "The content of the Blueprint definition in string-encoded JSON format"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data_kind\": \"blueprint\",\n    \"data\": {\n        \"org_id\": \"TEMP\",\n        \"id\": \"TEMP\",\n        \"created_by\": {\n            \"id\": \"TEMP\",\n            \"email\": \"\"\n        },\n        \"updated_by\": {\n            \"id\": \"TEMP\",\n            \"email\": \"\"\n        },\n        \"created_at\": \"2023-12-08T21:01:42.297618768Z\",\n        \"updated_at\": \"2023-12-08T21:01:42.297618768Z\",\n        \"name\": \"Test Blueprint\",\n        \"synopsis\": \"Example synopsis\",\n        \"description\": \"Example description\",\n        \"image_url\": \"\",\n        \"state\": 3,\n        \"pallet_type\": 2,\n        \"pallet_config\": {\n            \"version\": \"3.7\",\n            \"env_vars\": [],\n            \"packages\": [],\n            \"system_packages\": [],\n            \"external_file_url\": \"s3://production-shipyard-uploads/organizations/TEMP/blueprints/TEMP/config/external_files/script.py.sefv2_8082ff1c-30ce-4fe0-b583-96bc21c30a6b?versionId=null\",\n            \"command\": {\n                \"program\": \"python3\",\n                \"file_to_run\": \"script.py\"\n            },\n            \"github\": null\n        },\n        \"spec_list\": [\n            {\n                \"default\": \"example_value\",\n                \"description\": \"A first input\",\n                \"display_name\": \"First Input\",\n                \"id\": \"TEMP\",\n                \"name\": \"FIRST_INPUT\",\n                \"placeholder\": \"Enter a first input\",\n                \"required\": false,\n                \"type\": 1,\n                \"type_spec\": {\n                    \"multiline\": false\n                }\n            }\n        ],\n        \"retry_strategy\": {\n            \"ttr\": 900,\n            \"number_of_retries\": 3\n        },\n        \"category_ids\": null,\n        \"runtime_timeout\": 2700,\n        \"dep_count\": 0,\n        \"exclude_exit_code_ranges\": [\n            [\n                1,\n                1\n            ],\n            [\n                3,\n                5\n            ]\n        ],\n        \"is_free\": false\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data_kind": {
                      "type": "string",
                      "example": "blueprint"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "org_id": {
                          "type": "string",
                          "example": "TEMP"
                        },
                        "id": {
                          "type": "string",
                          "example": "TEMP"
                        },
                        "created_by": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "TEMP"
                            },
                            "email": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "updated_by": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "TEMP"
                            },
                            "email": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2023-12-08T21:01:42.297618768Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2023-12-08T21:01:42.297618768Z"
                        },
                        "name": {
                          "type": "string",
                          "example": "Test Blueprint"
                        },
                        "synopsis": {
                          "type": "string",
                          "example": "Example synopsis"
                        },
                        "description": {
                          "type": "string",
                          "example": "Example description"
                        },
                        "image_url": {
                          "type": "string",
                          "example": ""
                        },
                        "state": {
                          "type": "integer",
                          "example": 3,
                          "default": 0
                        },
                        "pallet_type": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        },
                        "pallet_config": {
                          "type": "object",
                          "properties": {
                            "version": {
                              "type": "string",
                              "example": "3.7"
                            },
                            "env_vars": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "packages": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "system_packages": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "external_file_url": {
                              "type": "string",
                              "example": "s3://production-shipyard-uploads/organizations/TEMP/blueprints/TEMP/config/external_files/script.py.sefv2_8082ff1c-30ce-4fe0-b583-96bc21c30a6b?versionId=null"
                            },
                            "command": {
                              "type": "object",
                              "properties": {
                                "program": {
                                  "type": "string",
                                  "example": "python3"
                                },
                                "file_to_run": {
                                  "type": "string",
                                  "example": "script.py"
                                }
                              }
                            },
                            "github": {}
                          }
                        },
                        "spec_list": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "default": {
                                "type": "string",
                                "example": "example_value"
                              },
                              "description": {
                                "type": "string",
                                "example": "A first input"
                              },
                              "display_name": {
                                "type": "string",
                                "example": "First Input"
                              },
                              "id": {
                                "type": "string",
                                "example": "TEMP"
                              },
                              "name": {
                                "type": "string",
                                "example": "FIRST_INPUT"
                              },
                              "placeholder": {
                                "type": "string",
                                "example": "Enter a first input"
                              },
                              "required": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "type": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "type_spec": {
                                "type": "object",
                                "properties": {
                                  "multiline": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  }
                                }
                              }
                            }
                          }
                        },
                        "retry_strategy": {
                          "type": "object",
                          "properties": {
                            "ttr": {
                              "type": "integer",
                              "example": 900,
                              "default": 0
                            },
                            "number_of_retries": {
                              "type": "integer",
                              "example": 3,
                              "default": 0
                            }
                          }
                        },
                        "category_ids": {},
                        "runtime_timeout": {
                          "type": "integer",
                          "example": 2700,
                          "default": 0
                        },
                        "dep_count": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "exclude_exit_code_ranges": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            }
                          }
                        },
                        "is_free": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6572604cfc3f31000fe88156:6573894604543b0038b835e2"
}
```