Upload PDF file in a page | UpdatePage by adding a PDF file | REST API v2

I have found Atlassian confluence REST API v2 via their docs :- https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-labels-id-pages-get

There I found api for working with Pages (specially for my usecase)
It includes multiple API’s, I’m using get Page by Id, create page, update pages.
I was able to do the things I wanted, like creating a page, updating a page.

But now I am stuck and doesn’t find anywhere a solution to it.

In confluence page UI, we have a option to add attachment, insert file.
Similarly, I wanted to add a PDF file in my confluence page, but using REST API multipart/form.

But unable to find a way to do so, found an api but I don’t know where it was attaching a file, I couldn’t find it anywhere in my page.

https://domainName.atlassian.net/wiki/rest/api/content/{page_id}/child/attachment
(I believe this is for confluence cloud ?)
It’s response also have some links on clicking it I was landing on a json page.

I need help if anyone here worked with uploading / adding a file in confluence page using REST API please let me know how it can be done.

Please let me know of any docs if any moderator/consultant from Atlassian is reading this.

Dear @ShivendraChouksey ,

Creating and updating attachments has not yet been migrated to the REST API v2 - it is still with v1. You may want to start with: https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-post

Best regards

Andreas