Skip to main content
POST
/
sessions
/
{session_id}
/
messages
cURL
curl -X POST 'https://api.gumloop.com/api/v1/sessions/sess_xYz789AbCd/messages' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"input": "Now write a follow-up email."}'
{
  "session": {
    "id": "sess_xYz789AbCd",
    "agent_id": "abc123DEFghiJKL",
    "messages": [
      {
        "id": "msg_a1b2c3",
        "role": "user",
        "content": "Research Acme Corp and draft a brief.",
        "created_at": "2026-05-15T14:32:00Z",
        "creator_id": "user_2b9d71f0",
        "parts": null
      },
      {
        "id": "msg_d4e5f6",
        "role": "assistant",
        "content": "Here is what I found about Acme Corp...",
        "created_at": "2026-05-15T14:32:09Z",
        "creator_id": null,
        "parts": null
      },
      {
        "id": "msg_g7h8i9",
        "role": "user",
        "content": "Now write a follow-up email.",
        "created_at": "2026-05-15T14:35:00Z",
        "creator_id": "user_2b9d71f0",
        "parts": null
      }
    ],
    "created_at": "2026-05-15T14:32:00Z",
    "state": "processing",
    "agent_name": "Sales research agent",
    "agent_team_id": "team_4f8c92ab",
    "agent_creator_user_id": "user_2b9d71f0",
    "agent_icon_url": null,
    "agent_tools": [],
    "participants": {
      "user_2b9d71f0": {
        "first_name": "Ada",
        "last_name": "Lovelace"
      }
    },
    "creator": {
      "id": "user_2b9d71f0",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "email": "ada@example.com",
      "profile_picture": null
    }
  },
  "queue_position": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.gumloop.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

A personal API key or an OAuth 2.0 access token. Personal API keys also require the x-auth-key header with your user ID.

Path Parameters

session_id
string
required

ID of the session to continue.

Body

application/json
input
string
required

The next user message. Required. Also accepted as message for backwards compatibility.

Example:

"Now write a follow-up email."

stream
boolean
default:false

Must be false (or omitted) when calling api.gumloop.com. Set to true only when calling ws.gumloop.com (see the streaming section above).

Response

Message was enqueued. queue_position is set only when the session was queued behind concurrent runs.

session
object
queue_position
integer | null

Position in the per-agent queue. Populated only when the session was queued; otherwise null.

Example:

null