Share a notebook
September 29, 2026
Table of contents
Change who can open a notebook, the same as saving the Share dialog of the Gemini Notebook web app. One call can combine all four changes:
peopleadds a person as avieweroreditor, changes their role, or removes them (remove).linkopens the notebook to anyone with the link (public) or limits it to the people listed (restricted).allowCopiessets whether people who open the public link may copy the notebook. It applies to a public link only, so it cannot be sent withlink: "restricted". Switching the link torestrictedresets it to allowed, as the web app does.viewLevelsets what viewers of the shared notebook get: the full notebook (full) or its chat only (chat). Google allows it on paid plans only, and a free account answers403.
The owner (the account the notebook lives on) cannot be changed. Listing the owner in people returns 400.
By default Google emails every person you add or change, like the “Notify people” box in the web app. Send notify: false to skip the email.
The response is the notebook’s sharing after the change, in the shape of GET /sharing. Google’s sharing read does not include the view level, so viewLevel is in the response only when you set it, echoing the value you sent.
https://api.useapi.net/v1/gemini-notebook/sharing
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API tokenis required, see Setup useapi.net for details.
Request Body
{
"notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
"people": [
{ "email": "[email protected]", "role": "editor" }
],
"link": "public",
"allowCopies": false,
"notify": false
}
notebookis required, the notebook id returned by POST /notebooks or GET /notebooks. The id names its account, so noemailis needed.peopleis optional, an array of1to50{ email, role }objects.
rolesupported values:viewer,editor,remove.linkis optional, the link access.
Supported values:public,restricted.allowCopiesis optional,trueorfalse, whether people with the public link may copy the notebook. Not accepted together withlink: "restricted".notifyis optional,falseskips Google’s share email to the people inpeople.
Default:true.viewLevelis optional, what viewers of the shared notebook can open. Paid Google plans only.
Supported values:full(the whole notebook),chat(chat only).
Provide people, link, allowCopies, viewLevel or any combination.
Responses
-
The sharing after the change.
{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "people": [ { "email": "[email protected]", "role": "owner", "name": "Jane Doe" }, { "email": "[email protected]", "role": "editor", "name": "colleague" } ], "link": "public", "allowCopies": false } -
A missing or malformed parameter, nothing to change,
allowCopieswith a restricted link, or a change to the owner. With nothing to change the message isProvide people, link, allowCopies and/or viewLevel.{ "error": "[email protected] owns this notebook; its role cannot change", "code": 400 }{ "error": "allowCopies applies to a public link only", "code": 400 }{ "error": "Parameter people role of [email protected] must be one of editor, viewer, remove", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The notebook id was issued to a different API token, or Google does not allow the change on the account’s plan.
viewLevelis refused on a free account.{ "error": "Not allowed on account [email protected]'s plan (Google s0tc2d grpc 7)", "code": 403 }{ "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55 does not belong to this API token", "code": 403 } -
The notebook was deleted, or its account is no longer configured.
{ "error": "Account [email protected] of user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55 is not configured", "code": 404 } -
596 Account Error
Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.
{ "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.", "code": 596 }{ "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook", "code": 596 } -
Google is temporarily unavailable or is challenging our network. Retry in a few minutes. A
502means Google answered with an unexpected error.{ "error": "Google is temporarily unavailable (QDyure grpc 14), please retry", "code": 503 }
Model
The sharing, as in GET /sharing.
{ // TypeScript, all fields are optional
notebook: string
people: {
email: string
role: string // owner | editor | viewer
name: string | null // the person's Google display name
}[]
link: 'public' | 'restricted'
allowCopies: boolean
viewLevel?: 'full' | 'chat' // only when set in this call, echoing the request
error: string // error responses only
code: number // error responses only, the HTTP status
}
Examples
-
curl -X POST "https://api.useapi.net/v1/gemini-notebook/sharing" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "people": [{ "email": "[email protected]", "role": "viewer" }] }' -
const token = "API token"; const apiUrl = "https://api.useapi.net/v1/gemini-notebook/sharing"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ notebook: "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", link: "restricted", people: [{ email: "[email protected]", role: "remove" }] }) }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" apiUrl = "https://api.useapi.net/v1/gemini-notebook/sharing" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "link": "public", "allowCopies": False } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())