Append text to a source

October 15, 2026

Table of contents

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

Add text to the end of a source that is already in a notebook. The source keeps its id, so anything that refers to it stays valid. Use it to grow a running log or a pasted-text source instead of adding a new source each time. It works on pasted-text sources and on web page sources.

title is an optional heading for the added text. It does not appear in the source’s text, which GET /sources/source returns with content=true.

The response is the source after the change, with its updated words.

https://api.useapi.net/v1/gemini-notebook/sources/append

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5",
  "title": "Day 2",
  "text": "Mission log, day 2. The crew photographed the lunar terminator."
}
  • source is required, the source id from GET /notebooks/notebook or POST /sources. The id names its account and notebook, so no email or notebook is needed.
  • text is required, the text to add, up to 500,000 characters.
  • title is optional, a heading for the added text, up to 200 characters.
Responses
  • 200 OK

    The source after the change.

    {
      "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
      "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5",
      "title": "Mission log",
      "kind": "text",
      "status": "ready",
      "words": 38,
      "created": "2026-10-15T05:04:48.000Z"
    }
    

    A web page source:

    {
      "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
      "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:1761af94-f5aa-47f3-9539-0b4ebcd547f8",
      "title": "Apollo 11 - Wikipedia",
      "kind": "web",
      "status": "ready",
      "words": 25588,
      "url": "https://en.wikipedia.org/wiki/Apollo_11",
      "created": "2026-10-15T05:04:37.000Z"
    }
    
  • 400 Bad Request

    A missing or invalid parameter.

    {
      "error": "Parameter text is required",
      "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]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5 does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found

    The source is no longer in the notebook, the notebook was deleted, or its account is no longer configured.

    {
      "error": "Source user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5 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 the source with GET /sources/source, 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
  notebook: string
  source: string               // user:<id>-<email>-source:<notebook uuid>:<source uuid>, unchanged
  title: string
  kind: string                 // see POST /sources, "Source kinds and statuses"
  status: 'preparing' | 'processing' | 'ready' | 'error'
  words?: number               // word count, including the added text
  url?: string                 // web and YouTube sources
  mimeType?: string
  driveFileId?: string
  created?: string             // ISO 8601
  error: string                // error responses only
  code: number                 // error responses only, the HTTP status
}
Examples
  • curl -X POST "https://api.useapi.net/v1/gemini-notebook/sources/append" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5",
         "title": "Day 2",
         "text": "Mission log, day 2. The crew photographed the lunar terminator."
       }'
    
  • const token = "API token";
    const response = await fetch("https://api.useapi.net/v1/gemini-notebook/sources/append", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`
      },
      body: JSON.stringify({
        source: "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5",
        text: "Mission log, day 3. The crew prepared for lunar orbit insertion."
      })
    });
    const result = await response.json();
    console.log("response", response.status, result);
    
  • import requests
    
    token = "API token"
    response = requests.post(
        "https://api.useapi.net/v1/gemini-notebook/sources/append",
        headers={"Content-Type": "application/json", "Authorization": f"Bearer {token}"},
        json={
            "source": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:9197c51a-6c06-4ce4-8193-892d437bc8f5",
            "title": "Day 2",
            "text": "Mission log, day 2. The crew photographed the lunar terminator."
        }
    )
    print(response.status_code, response.json())
    
Try It