# Update Pipeline

`Update_Pipeline` updates an existing GovTribe pipeline and returns the updated pipeline resource as JSON text.

## Input Contract

* `pipeline_id`: GovTribe ID of the pipeline to update.
  * `type`: `string`
  * `required`: `yes`
  * `default`: `n/a`
* `name`: Updated pipeline name.
  * `type`: `string`
  * `required`: `yes`
  * `default`: `n/a`
  * `shape`: `max length 100`
* `description`: Updated pipeline description.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current description`
  * `shape`: `max length 1000`

## Output Contract

* Top-level keys:
  * `govtribe_id`
  * `govtribe_type`
  * `govtribe_url`
  * `name`
  * `description`
  * `created_at`
  * `updated_at`
  * `owner`
  * `creator`
  * `stages`
* Row keys:
  * `n/a`
* Relationship retrieval map:
  * `creator`
    * `resource_type`: `user`
    * `tool`: `Search_Users`
    * `filter`: `user_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `email`
  * `owner`
    * `resource_type`: `user`
    * `tool`: `Search_Users`
    * `filter`: `user_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `email`
  * `stages`
    * `resource_type`: `stage`
    * `tool`: `Search_Stages`
    * `filter`: `creator_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`, `type`

## Usage Patterns

Pattern A: Rename a pipeline and refresh its team-facing description. Tool: `Update_Pipeline`

```json
{
  "pipeline_id": "<PIPELINE_ID>",
  "name": "Federal Services Capture Pipeline",
  "description": "Primary capture workflow for federal IT and professional services pursuits."
}
```
