Update a source label
September 29, 2026
Table of contents
Rename a label, change its emoji, or add sources to it and remove sources from it, in one request. A rename keeps the label’s current emoji unless you send a new one. The label id does not change.
Google takes one change per call, so the API sends them one after another: the name and emoji first, then each source to add, then each source to remove. If Google refuses a change after some went through, the call answers with Google’s error, and its message says how many changes were applied (for example (the first 2 of 3 changes were applied; GET /labels shows the label now)). Check GET /labels before you send the rest again.
The response is the label as stored after all changes.
https://api.useapi.net/v1/gemini-notebook/labels/
label
labelis required, the label id from GET /labels or POST /labels, URL-encoded in the path (it contains:and@). The id names its account and notebook, so noemailornotebookis needed.
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"name": "The landing",
"addSources": [
"user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:1761af94-f5aa-47f3-9539-0b4ebcd547f8"
]
}
nameis optional, the new name.
Length:1to100characters.emojiis optional, the new emoji.
Length:1to16characters.addSourcesis optional, an array of1to300source ids of the label’s notebook to add to the label.removeSourcesis optional, an array of1to300source ids to remove from the label. The sources stay in the notebook.
Provide name, emoji, addSources, removeSources or any combination.
Responses
-
The label after the change.
{ "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55", "label": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad", "name": "The landing", "emoji": "🚀", "sources": [ "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:1761af94-f5aa-47f3-9539-0b4ebcd547f8" ] } -
A malformed parameter, nothing to change, or a source from another notebook.
{ "error": "Provide name, emoji, addSources and/or removeSources", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The id was issued to a different API token.
{ "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad does not belong to this API token", "code": 403 } -
The label is no longer in the notebook, the notebook was deleted, or its account is no longer configured.
{ "error": "Label user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad not found", "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 (le8sX grpc 14), please retry", "code": 503 }
Model
{ // TypeScript, all fields are optional
notebook: string
label: string // user:<id>-<email>-label:<notebook uuid>:<label uuid>
name: string
emoji?: string
sources: string[] // source ids with this label
error: string // error responses only
code: number // error responses only, the HTTP status
}
Examples
-
LABEL="user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad" curl -X POST "https://api.useapi.net/v1/gemini-notebook/labels/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$LABEL")" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "name": "The landing", "addSources": ["user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:1761af94-f5aa-47f3-9539-0b4ebcd547f8"] }' -
const token = "API token"; const label = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad"; const apiUrl = `https://api.useapi.net/v1/gemini-notebook/labels/${encodeURIComponent(label)}`; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ removeSources: ["user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:1761af94-f5aa-47f3-9539-0b4ebcd547f8"] }) }); const result = await response.json(); console.log("response", {response, result}); -
import requests, urllib.parse token = "API token" label = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:5973ba2b-845e-41b5-97b2-ef855d5746ad" apiUrl = "https://api.useapi.net/v1/gemini-notebook/labels/" + urllib.parse.quote(label, safe="") headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "emoji": "🌕" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())