Delete a source
September 29, 2026
Table of contents
Remove a source from its notebook on Google. Chat answers and Studio artifacts created afterwards no longer use it. The rest of the notebook is not touched. To delete the whole notebook use DELETE /notebooks/notebook.
https://api.useapi.net/v1/gemini-notebook/sources/
source
sourceis the source id, URL-encoded in the path (it contains:and@). Source ids are returned by POST /sources, POST /sources/upload and GET /notebooks/notebook. The id names its account, so noemailis needed.
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Responses
-
The source was deleted. No body.
-
The path does not hold a valid source id, for example it holds a notebook id.
{ "error": "Path parameter source (user%3A12345-user%40example.com-notebook%3Ad02c903b-17f8-4241-a263-2be9e7359d55) is not a valid source id", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The source id was issued to a different API token.
{ "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9df5b3d2-0afd-4ea7-9c20-e42c4af17d46 does not belong to this API token", "code": 403 } -
The account named in the source id is no longer configured, or Google reports the source or its notebook as not found.
{ "error": "Account [email protected] of user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9df5b3d2-0afd-4ea7-9c20-e42c4af17d46 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 (tGMBJ grpc 14), please retry", "code": 503 }
Model
A successful delete returns 204 No Content with no body. Error responses carry a JSON { error, code }.
{ // TypeScript, all fields are optional
error: string
code: number
}
Examples
-
SOURCE="user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9df5b3d2-0afd-4ea7-9c20-e42c4af17d46" curl -X DELETE -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/gemini-notebook/sources/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$SOURCE")" -
const token = "API token"; const source = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9df5b3d2-0afd-4ea7-9c20-e42c4af17d46"; const response = await fetch(`https://api.useapi.net/v1/gemini-notebook/sources/${encodeURIComponent(source)}`, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` } }); console.log("response", response.status); -
import requests, urllib.parse token = "API token" source = "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9df5b3d2-0afd-4ea7-9c20-e42c4af17d46" response = requests.delete("https://api.useapi.net/v1/gemini-notebook/sources/" + urllib.parse.quote(source, safe=""), headers={"Authorization": f"Bearer {token}"}) print(response.status_code) # 204