# Create a new version **POST /versions** Deploy a new version for a given documentation, which will become the current version. ## Servers - https://bump.sh/api/v1: https://bump.sh/api/v1 () ## Authentication methods - Authorization token - Basic token ## Parameters ## Body parameters Content-type: application/json The version creation request object - **documentation** (string) UUID or slug of the documentation. - **hub** (string) UUID or slug of the hub if the documentation is part of a hub. - **documentation_name** (string) Name of the documentation to create. Used only if `auto_create_documentation` is set. - **auto_create_documentation** (boolean) Create the documentation if it does not exist yet. Must be used with a `hub` and a `documentation`. - **definition** (string) Serialized definition of the version. 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. - **branch_name** (string) Select a branch for this new version (branch will be created if it doesn't exist). *Defaults to the main branch*. - **previous_version_id** (string) UUID of a previously deployed version - **temporary** (boolean) Whether you want the new version to be temporary or not. By default a new version will be permanent to your documentation. Temporary versions have a time to live of 7 days after which they are removed. - **unpublished** (boolean) Alias for temporary property. ## Responses ### 201: Documentation version successfully created #### Body Parameters: application/json (object) - **id** (string) Unique id of your version. - **doc_id** (string) Unique id of your documentation. - **doc_public_url** (string) The public URL of your documentation. ### 204: Documentation is unchanged ### 400: Bad request #### Body Parameters: application/json (object) - **message** (string) Human readable error message for status 400. ### 422: Definition is not valid. #### Body Parameters: 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)