Create a collection

October 15, 2026

Table of contents

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

Create an empty collection, a folder that groups an account’s notebooks in the Gemini Notebook web app. Add notebooks to it with POST /collections/collection, and list collections with GET /collections.

A collection belongs to one account. Pass email when your API token has more than one account.

If Google creates the collection but does not accept its emoji, the call still answers 201, without emoji and with a warning that says why.

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

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "email": "[email protected]",
  "name": "Space history",
  "emoji": "🚀"
}
  • email is optional, the account to create the collection on. Required when your API token has more than one account.
  • name is required, the collection’s name.
    Length: 1 to 100 characters.
  • emoji is optional, an emoji shown before the name.
    Length: 1 to 16 characters.
Responses
  • 201 Created

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

    A missing or invalid parameter, or no email while the API token has several accounts.

    {
      "error": "email is required: this API token has several accounts",
      "code": 400
    }
    
    {
      "error": "Parameter name is required",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    The email is not one of your configured accounts.

    {
      "error": "Account [email protected] is not configured",
      "code": 404
    }
    
  • 502 Bad Gateway

    Google accepted the collection but did not list it yet. Check GET /collections before you create it again.

    {
      "error": "Google accepted the collection but does not list it yet: check GET /collections before creating it again",
      "code": 502
    }
    
  • 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.

    {
      "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, [] for a new collection
  warning?: string             // the collection was created, but its emoji was not set
  error: string                // error responses only
  code: number                 // error responses only, the HTTP status
}
Examples
  • curl -X POST "https://api.useapi.net/v1/gemini-notebook/collections" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{ "email": "[email protected]", "name": "Space history", "emoji": "🚀" }'
    
  • const token = "API token";
    const apiUrl = "https://api.useapi.net/v1/gemini-notebook/collections";
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        email: "[email protected]",
        name: "Space history"
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    apiUrl = "https://api.useapi.net/v1/gemini-notebook/collections"
    headers = {
        "Content-Type": "application/json",
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "email": "[email protected]",
        "name": "Space history",
        "emoji": "🚀"
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It