feat: add file upload API endpoints to OpenAPI spec#226
Open
deka0106 wants to merge 1 commit intomakenotion:mainfrom
Open
feat: add file upload API endpoints to OpenAPI spec#226deka0106 wants to merge 1 commit intomakenotion:mainfrom
deka0106 wants to merge 1 commit intomakenotion:mainfrom
Conversation
Add all 5 Notion File Upload API endpoints to the spec:
- POST /v1/file_uploads (create session)
- GET /v1/file_uploads (list uploads)
- GET /v1/file_uploads/{id} (retrieve upload)
- POST /v1/file_uploads/{id}/send (send file content, multipart/form-data)
- POST /v1/file_uploads/{id}/complete (finalize multi-part upload)
No source code changes needed - the existing auto-generation pipeline
handles multipart/form-data with format:binary out of the box.
|
This is a great addition, brilliant work @deka0106 - please approve soon reviewers! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add the 5 Notion File Upload API endpoints to the OpenAPI spec, auto-generating MCP tools.
New tools:
create-a-file-upload— create an upload sessionsend-file-upload-content— send local file content (multipart)complete-a-file-upload— finalize the uploadretrieve-a-file-upload— get upload statuslist-file-uploads— list uploads with filteringThe pipeline already supports
multipart/form-datawithformat: binary, so no code changes are needed.Ref: https://developers.notion.com/reference/file-upload
Closes #191
How was this change tested?
Tested the full upload flow using Claude Code as an MCP client with a local build:
Results: https://www.notion.so/deka0106/Notion-MCP-File-Upload-Test-320e72cffcec806fa72befbb8c455ecc
Screenshots