Create API Version

POST https://api.getpostman.com/apis/{{apiId}}/versions

This call creates a new API version in the specified API.

Request body should contain a version object which should have fields:

nameRequired. Name of the API Version
source If specified, it will copy the contents of the specified api version to create a new api verison.
idRequired. Id of the apiversion from where the details are to be copied
schemaBoolean. If true then copies the schema from the specified api version
relationsObject. {"<relationType>": true/false}. Allowed relation types are `mock`, `monitor`, `documentation`, `contracttest`, `integrationtest`, `testsuite`, `environment` Relation types which should be copied over to the new api verison

Response contains a version object with all the details related to the created API Version, namely, id, name, api.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

Request Body

{"version"=>{"name"=>"1.0", "source"=>{"id"=>"{{apiVersionId}}", "schema"=>true, "relations"=>{"monitor"=>true, "mock"=>true, "documentation"=>true}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;version&quot;:{&quot;id&quot;:&quot;d71cf403-c549-4c7c-9dc6-a6a105acf67c&quot;,&quot;name&quot;:&quot;1.0&quot;,&quot;api&quot;:&quot;2b95d07c-8379-4bd1-924f-e7e1af185284&quot;}}