> For the complete documentation index, see [llms.txt](https://developers.bump.sh/doc/workspace/llms.txt)

# Update an existing preview

> PUT /previews/{preview_id}
> 
> Update a preview with the given documentation file. The preview will stay active for 30 minutes after the last update.



## Servers
- Production: https://bump.sh/api/v1 ()



## Parameters

### Path parameters

- **preview_id** (string)
  UUID of an existing preview you wish to update.



### Body: application/json (object)
The preview creation request object
- **definition** (string)
  <small>==**REQUIRED**==</small> if `url` is not present.

  Serialized definition. This should be an OpenAPI 2.x, 3.x
  or AsyncAPI 2.x file serialized as a string, in YAML or
  JSON.

- **references** (array[object])
  Import external references used by `definition`. It's usually resources not accessible by Bump.sh servers, like local files or internal URLs.

- **url** (string(uri))
  <small>==**REQUIRED**==</small> if `definition` is not present.

  Target definition URL. It should be accessible through
  HTTP by Bump.sh servers.



## Responses
### 200
Success

#### Body: application/json (object)
- **id** (string)
  Unique id for the preview URL: `https://bump.sh/preview/:id`.

- **expires_at** (string(date-time))
  Preview expiration date and time.

- **public_url** (string)
  The public URL where the preview will be visible.


### 422
Definition is not valid.

#### Body: application/json (object)
- **message** (string)
  Human readable error message.

- **errors** (object)
  Hash of invalid attributes with their error messages.



[Powered by Bump.sh](https://bump.sh)
