Update a spec file
Updates a file for an OpenAPI or protobuf 2 or 3 specification.
**Note:**
- This endpoint does not accept an empty request body. You must pass one of the accepted values.
- This endpoint does not accept multiple request body properties in a single call. For example, you cannot pass both the `content` and `type` property at the same time.
- Multi-file specifications can only have one root file.
- When updating a file type to `ROOT`, the previous root file is updated to the `DEFAULT` file type.
- 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.
filePath
The path to the file.
Request
Update Spec File
name
The file's name.
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.
content
The specification'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