Create a spec
Creates an API specification in Postman's [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/). 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.
Authentication
x-api-keystring
API Key authentication via header
OR
Authorizationstring
A valid [SCIM API key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key) for calls to SCIM endpoints.
OR
AuthorizationBasic
Basic authentication of the form Basic <base64(username:password)>.
Query parameters
workspaceId
The workspace's ID.
Request
This endpoint expects an object.
name
The specification's name.
type
The type of API specification.
files
A list of the specification's files and their contents.
Response
Created
name
The API specification's name.
type
The type of API specification.
id
The specification's ID.
createdAt
The date and time at which the specification file was created.
updatedAt
The date and time at which the file was last updated.
createdBy
The user ID of the user that created the file.
updatedBy
The user ID of the user that last updated the specification file.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error