Delete an agent chat

October 16, 2026

Table of contents

  1. Request Headers
  2. Responses
  3. Examples
  4. Try It

Delete a chat’s conversation from Google. It disappears from GET /agent/chats and the Flow web app, and its chatId stops working. The images and videos the agent made stay in the project. Delete them with DELETE /assets/email if you want them gone too. A chat cannot be deleted while a turn runs in it.

https://api.useapi.net/v1/google-flow/agent/chats/chatId

Request Headers
Authorization: Bearer {API token}
Responses
  • 204 No Content

    The chat was deleted. The response has no body.

  • 400 Bad Request

    The path value is not a chatId.

    {
      "error": "Path parameter chatId (not-a-chat-id) is not a chat id from POST /agent/chats or GET /agent/chats",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

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

    The chatId belongs to another useapi.net user.

    {
      "error": "This chat belongs to another user",
      "code": 403
    }
    
  • 404 Not Found

    The chat was already deleted, or its account is not added.

    {
      "error": "Chat not found: it was deleted or never existed",
      "code": 404
    }
    
  • 409 Conflict

    A turn is running in this chat. Delete it after the turn ends.

    {
      "error": "A turn is running in this chat. Wait for it to finish",
      "code": 409
    }
    
  • 503 Service Unavailable

    Google Flow could not be reached, and nothing happened. Retry shortly.

    {
      "error": "Google Flow is not reachable right now and could not delete the chat. Retry",
      "code": 503
    }
    
Examples
  • CHATID="c-u12345-email:[email protected]:f166200a-...-chat:2586b4d7-...-bot:google-flow"
    curl -X DELETE -H "Authorization: Bearer YOUR_API_TOKEN" \
         "https://api.useapi.net/v1/google-flow/agent/chats/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$CHATID")"
    
  • const token = 'YOUR_API_TOKEN'
    const chatId = 'chatId from POST /agent/chats'
    const response = await fetch(`https://api.useapi.net/v1/google-flow/agent/chats/${encodeURIComponent(chatId)}`, {
      method: 'DELETE',
      headers: { 'Authorization': `Bearer ${token}` }
    })
    console.log(response.status)
    
  • import requests
    from urllib.parse import quote
    token = 'YOUR_API_TOKEN'
    chatId = 'chatId from POST /agent/chats'
    r = requests.delete(
        f'https://api.useapi.net/v1/google-flow/agent/chats/{quote(chatId, safe="")}',
        headers={'Authorization': f'Bearer {token}'},
    )
    print(r.status_code)
    
Try It