Postman API
  1. API
Postman API
  • API
    • Get all APIs
      GET
    • Create API
      POST
    • Delete an API
      DELETE
    • Single API
      GET
    • Update an API
      PUT
    • Get All API Versions
      GET
    • Create API Version
      POST
    • Delete an API Version
      DELETE
    • Get an API Version
      GET
    • Update an API Version
      PUT
    • Get contract test relations
      GET
    • Get documentation relations
      GET
    • Get environment relations
      GET
    • Get integration test relations
      GET
    • Get monitor relations
      GET
    • Get linked relations
      GET
    • Create relations
      POST
    • Create Schema
      POST
    • Get Schema
      GET
    • Update Schema
      PUT
    • Create collection from schema
      POST
    • Get test suite relations
      GET
    • Sync relations with schema
      PUT
  • Collections
    • All Collections
      GET
    • Create Collection
      POST
    • Create a Fork
      POST
    • Merge a Fork
      POST
    • Delete Collection
      DELETE
    • Single Collection
      GET
    • Update Collection
      PUT
  • Environments
    • All Environments
    • Create Environment
    • Delete Environment
    • Single Environment
    • Update Environment
  • Import
    • Import exported data
    • Import external API specification
  • User
    • API Key Owner
  • Mocks
    • All Mocks
    • Create Mock
    • Delete Mock
    • Single Mock
    • Update Mock
    • Publish Mock
    • Unpublish Mock
  • Monitors
    • All Monitors
    • Create Monitor
    • Delete Monitor
    • Single Monitor
    • Update Monitor
    • Run a Monitor
  • Webhooks
    • Create Webhook
  • Workspaces
    • All workspaces
    • Create Workspace
    • Delete Workspace
    • Single workspace
    • Update Workspace
  1. API

Create API Version

POST
/apis/{apiId}/versions
APIAPI Version
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
sourceIf 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 Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.getpostman.com/apis//versions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "version": {
        "name": "1.0",
        "source": {
            "id": "{{apiVersionId}}",
            "relations": {
                "documentation": true,
                "mock": true,
                "monitor": true
            },
            "schema": true
        }
    }
}'
Response Response Example
{
  "version": {
    "api": "2b95d07c-8379-4bd1-924f-e7e1af185284",
    "id": "d71cf403-c549-4c7c-9dc6-a6a105acf67c",
    "name": "1.0"
  }
}

Request

Path Params
apiId
string 
required
Body Params application/json
version
object 
optional
name
string 
optional
Example:
1.0
source
object 
optional
Examples

Responses

🟢200Create API version
application/json
Body
version
object 
optional
api
string 
optional
Example:
2b95d07c-8379-4bd1-924f-e7e1af185284
id
string 
optional
Example:
d71cf403-c549-4c7c-9dc6-a6a105acf67c
name
string 
optional
Example:
1.0
Previous
Get All API Versions
Next
Delete an API Version
Built with