# Create a new version **POST /versions** Deploy a new version for a given documentation, which will become the current version. ## Servers ## Authentication methods - Basic token - Authorization token ## Parameters ### Body: (object) 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 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 - **unpublished** (boolean) Whether you want the new version to be unpublished or not. By default a new version will be published to your documentation. ## Responses ### 204 Documentation is unchanged ### 422 Definition is not valid. #### Body: (object) - **message** (string) Human readable error message. - **errors** (object) Hash of invalid attributes with their error messages. ### 201 Documentation version successfully created #### Body: (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. [Powered by Bump.sh](https://bump.sh)