メインコンテンツへスキップ
GET /api/v1/forward/sessions 認証されたアカウント配下のセッションを一覧取得します。アーカイブ済みのセッションは既定で除外されます。

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Query parameters

ParameterTypeRequiredDefaultDescription
identity_idsstring or arrayNo-1 つ以上の Identity ID でフィルターします。カンマ区切りの文字列に対応。
template_idstringNo-Forward Template ID でフィルターします。
source_typestringNo-apiim、または schedule でフィルターします。
created_at[gt]stringNo-この RFC 3339 タイムスタンプより後に作成。
created_at[gte]stringNo-この RFC 3339 タイムスタンプ以降に作成。
created_at[lt]stringNo-この RFC 3339 タイムスタンプより前に作成。
created_at[lte]stringNo-この RFC 3339 タイムスタンプ以前に作成。
updated_at[gt]stringNo-この RFC 3339 タイムスタンプより後に更新。
updated_at[gte]stringNo-この RFC 3339 タイムスタンプ以降に更新。
updated_at[lt]stringNo-この RFC 3339 タイムスタンプより前に更新。
updated_at[lte]stringNo-この RFC 3339 タイムスタンプ以前に更新。
limitintegerNo201 ページあたりの件数。最大 100。
after_idstringNo-指定した Session ID より後のレコード用のカーソル。before_id とは併用できません。
before_idstringNo-指定した Session ID より前のレコード用のカーソル。after_id とは併用できません。
orderstringNodescソート順: desc または asc
include_archivedbooleanNofalseアーカイブ済みのセッションを含めます。

Example request

curl -s -X GET 'https://api.qoder.com/api/v1/forward/sessions?identity_ids=idn_xxx,idn_yyy&template_id=tmpl_support&source_type=im&created_at[gte]=2026-06-01T00:00:00Z&limit=20' \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "sess_xxx",
      "type": "session",
      "identity_id": "idn_xxx",
      "template": {
        "id": "tmpl_support",
        "type": "template",
        "name": "Support assistant",
        "model": "ultimate",
        "version": 3
      },
      "source_type": "im",
      "status": "idle",
      "title": "Customer support session",
      "incremental_streaming_enabled": true,
      "metadata": {
        "source": "dingtalk"
      },
      "config": {
        "environment_variables": {
          "API_KEY": "sk-xxx"
        }
      },
      "stats": {
        "active_seconds": 30,
        "duration_seconds": 3600
      },
      "usage": {
        "credits": 12.5
      },
      "archived_at": null,
      "created_at": "2026-06-22T10:00:00Z",
      "updated_at": "2026-06-22T11:00:00Z"
    }
  ],
  "first_id": "sess_xxx",
  "last_id": "sess_xxx",
  "has_more": false
}

Response fields

FieldTypeDescription
dataarray現在のページの Session オブジェクト。
first_idstring|nullこのページの最初のレコードの ID。
last_idstring|nullこのページの最後のレコードの ID。
has_morebooleanさらにレコードが残っているかどうか。

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_time_range時間フィルターが無効。
400invalid_request_errorinvalid_paginationページネーションパラメーターが無効。
401authentication_errorauthentication_requiredPAT が無効または期限切れ。

Notes

  • after_idbefore_id は併用できません。
  • 現在の設計では status によるフィルタリングはサポートしていません。
  • クレジットモジュールが有効でない場合、usage.credits は省略されることがあります。

セッションの作成

セッションの取得