g2bAPI Reference
Messages

List task messages

Returns a cursor-paginated window of durable task messages.

GET
/v1/tasks/{id}/messages

Returns a cursor-paginated window of durable task messages.

Authorization

bearerAuth
AuthorizationBearer <token>

Create an API key in g2b Settings, then send it as a Bearer token.

In: header

Path Parameters

id*string
Length1 <= length <= 256

Query Parameters

cursor?string
Lengthlength <= 1024
limit?integer
Range1 <= value <= 200
Default100

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/tasks/string/messages"
{  "messages": [    {      "id": "string",      "role": "user",      "parts": [        {          "type": "string",          "property1": null,          "property2": null        }      ],      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": "Unauthorized"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}