Logo
30 days of Postman - for developers API Documentation

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:

name Required. Name of the API Version
source If specified, it will copy the contents of the specified api version to create a new api verison.
id Required. Id of the apiversion from where the details are to be copied
schema Boolean. If true then copies the schema from the specified api version
relations Object. {"<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.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status OK

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



Curl
curl -X POST 'https://api.getpostman.com/apis/undefined/versions' -H 'Content-Type: application/json' -d '{"version":{"name":"1.0","source":{"id":"undefined","schema":true,"relations":{"monitor":true,"mock":true,"documentation":true}}}}'

ENDPOINTS