Creates a Forward session by binding an Identity to a Template.
HTTP 200 OK
Request headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Content-Type | Yes | application/json |
Idempotency-Key | No | Idempotency key for requests with side effects. |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
identity_id | string | Yes | Forward Identity ID. |
template_id | string | Yes | Forward Template ID. |
title | string | No | Session title. |
incremental_streaming_enabled | boolean | No | Enables incremental streaming for assistant events. Defaults to false. |
metadata | object | No | Custom metadata. |
config | object | No | Per-session configuration override. Only allowlisted fields are accepted. |
config.environment_variables | object | No | Session environment variables as key-value pairs. |
resources | array | No | Session-level resources. Currently supports file mounts only. |
resources[].type | string | Yes when resources is used | Resource type. Currently only file is supported. |
resources[].file_id | string | Yes when resources is used | File ID from the Files API. |
resources[].mount_path | string | No | Mount path inside the agent container. If omitted, Forward derives the path from the filename. |
Example request
Example response
HTTP 200 OK
Response fields
Field | Type | Description |
| string | Session ID. |
| string | Always |
| string | Forward Identity ID. |
| object | Template summary. |
| string | How the session was created. Direct API creation returns |
| string |
|
| boolean | Whether incremental streaming is enabled. |
| string|null | Archive timestamp. |
| string | Creation timestamp. |
| string | Update timestamp. |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | invalid_request_body | The request body is invalid. |
| 403 | permission_error | template_access_denied | Identity does not have access to the specified Template. |
| 404 | not_found_error | identity_not_found | Identity does not exist or is deleted. |
| 404 | not_found_error | template_not_found | Template does not exist. |
| 409 | conflict_error | identity_disabled | Identity is disabled. |
| 422 | invalid_request_error | runtime_config_invalid | The effective runtime configuration is invalid. |
| 401 | authentication_error | authentication_required | The PAT is invalid or expired. |
Notes
source_typeis assigned by Forward and cannot be set in the request.incremental_streaming_enabledis set at session creation and cannot be changed afterward.- Files must be uploaded through the Files API before you reference them in
resources.