Create a spec file
Creates a file for an OpenAPI or a protobuf 2 or 3 specification.
**Note:**
- 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.
- Creating a spec file assigns it the `DEFAULT` file type.
- Multi-file specifications can only have one root file.
- Files cannot exceed a maximum of 10 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)>.
Path parameters
specId
The spec's ID.
Request
Create Spec File
path
The file's path. Accepts JSON or YAML files.
content
The file's stringified contents.
Response
Successful Response
createdAt
The date and time at which the file was created.
createdBy
The user ID of the user that created the file.
id
The file's ID.
path
The file's path.
updatedAt
The date and time at which the file was updated.
updatedBy
The ID of the user who updated the file.
type
The type of file:
ROOT— The file containing the full OpenAPI structure. This serves as the entry point for the API spec and references other (DEFAULT) spec files. Multi-file specs can only have one root file.DEFAULT— A file referenced by theROOTfile.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error