Update a collection

October 15, 2026

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Rename a collection, change its emoji, or add notebooks to it and remove notebooks from it, in one request. A rename keeps the collection’s current emoji unless you send a new one. The collection id does not change. Removing a notebook from a collection does not delete the notebook.

Google takes one change per call, so the API sends them one after another: the name and emoji first, then each notebook to add, then each notebook 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 /collections shows the collection now)). Check GET /collections before you send the rest again.

The response is the collection as stored after all changes.

https://api.useapi.net/v1/gemini-notebook/collections/collection

  • collection is required, the collection id from GET /collections or POST /collections, URL-encoded in the path (it contains : and @). The id names its account, so no email is needed.
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "name": "Space history",
  "emoji": "🚀",
  "addNotebooks": [
    "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"
  ]
}
  • name is optional, the new name.
    Length: 1 to 100 characters.
  • emoji is optional, the new emoji.
    Length: 1 to 16 characters.
  • addNotebooks is optional, an array of 1 to 100 notebook ids of the collection’s account to add to the collection.
  • removeNotebooks is optional, an array of 1 to 100 notebook ids to remove from the collection. The notebooks themselves stay.

Provide name, emoji, addNotebooks, removeNotebooks or any combination.

Responses
  • 200 OK

    The collection after the change.

    {
      "collection": "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43",
      "email": "[email protected]",
      "name": "Space history",
      "emoji": "🚀",
      "notebooks": [
        "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"
      ]
    }
    
  • 400 Bad Request

    A malformed parameter, nothing to change, or a notebook on another account.

    {
      "error": "Provide name, emoji, addNotebooks and/or removeNotebooks",
      "code": 400
    }
    
    {
      "error": "notebook user:[email protected]:5b7e2a41-9c0d-4e8f-a1b3-6d2c8f0e7a95 is on another account than collection user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden

    The id was issued to a different API token.

    {
      "error": "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43 does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found

    The collection no longer exists, or its account is no longer configured.

    {
      "error": "Collection user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43 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
    }
    
  • 503 Service Unavailable

    Google is temporarily unavailable or is challenging our network. Check GET /collections, then retry in a few minutes. A 502 means Google answered with an unexpected error.

    {
      "error": "GOOGLE_BOT_CHECK: Google is challenging our network right now, please retry in a few minutes",
      "code": 503
    }
    
Model
{ // TypeScript, all fields are optional
  collection: string           // user:<id>-<email>-collection:<collection id>
  email: string
  name: string
  emoji?: string
  notebooks: string[]          // notebook ids in this collection
  error: string                // error responses only
  code: number                 // error responses only, the HTTP status
}
Examples
  • COLLECTION="user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43"
    curl -X POST "https://api.useapi.net/v1/gemini-notebook/collections/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$COLLECTION")" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{ "name": "Space history", "addNotebooks": ["user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"] }'
    
  • const token = "API token";
    const collection = "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43";
    const apiUrl = `https://api.useapi.net/v1/gemini-notebook/collections/${encodeURIComponent(collection)}`;
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        removeNotebooks: ["user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55"]
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests, urllib.parse
    token = "API token"
    collection = "user:[email protected]:7f3b9e21-4c8a-4d6f-b2e5-1a9c0d8e6f43"
    apiUrl = "https://api.useapi.net/v1/gemini-notebook/collections/" + urllib.parse.quote(collection, safe="")
    headers = {
        "Content-Type": "application/json",
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "emoji": "🌕"
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It