createSpec
Create an API specification in Postman's Spec Hub. Supports OpenAPI, AsyncAPI, protobuf, GraphQL, and Smithy formats with single or multi-file specifications.
Instructions
Creates an API specification in Postman's Spec Hub. Specifications can be single or multi-file.
Note:
Postman supports OpenAPI (2.0, 3.0, and 3.1), AsyncAPI (2.0 and 3.0), protobuf (2 and 3), GraphQL, and Smithy specifications.
If the file path contains a `/` (forward slash) character, then a folder is created. For example, if the path is the `components/schemas.json` value, then a `components` folder is created with the `schemas.json` file inside.
Multi-file specifications can only have one root file.
Files cannot exceed a maximum of 12 MB in size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | The workspace's ID. | |
| name | Yes | The specification's name. | |
| type | Yes | The type of API specification. | |
| files | Yes | A list of the specification's files and their contents. |