Skip to main content
Glama

updateSpecFile

Modify API specification files in Postman by updating content, renaming files, or changing file types to manage OpenAPI documentation structure.

Instructions

Updates an API specification's file.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specIdYesThe spec's ID.
filePathYesThe path to the file.
nameNoThe file's name.
typeNoThe 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 the `ROOT` file.
contentNoThe specification's stringified contents.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/postmanlabs/postman-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server