Info
Endpoint added: POST /agents/sessions
openapi:POST /agents/sessions::operation.endpoint-added- Product
- OpenAI API
- Source
- OpenAPI URL
- Change kind
- Endpoint Added
- Detected
- Last updated
Deterministic evidence
Before / after
Extracted from OpenAI's published contract. Shows the whole operation — a narrower excerpt was not available for this change. Open the source ↗
null
{
"operationId": "createAgentSession",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"agent": {
"additionalProperties": false,
"properties": {
"instructions": {
"maxLength": 1048576,
"type": [
"string",
"null"
]
},
"model": {
"maxLength": 1048576,
"type": "string"
},
"multi_agent": {
"anyOf": [
{
"$ref": "#/components/schemas/MultiAgentConfigCurrentParam"
},
{
"type": "null"
}
]
},
"reasoning": {
"anyOf": [
{
"$ref": "#/components/schemas/ReasoningParam"
},
{
"type": "null"
}
]
},
"service_tier": {
"anyOf": [
{
"$ref": "#/components/schemas/ServiceTierParam"
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"$ref": "#/components/schemas/TextParam"
},
{
"type": "null"
}
]
},
"tools": {
"items": {
"discriminator": {
"mapping": {
"function": "#/components/schemas/AgentToolConfigParamFunction",
"mcp": "#/components/schemas/AgentToolConfigParamMcp",
"programmatic_tool_calling": "#/components/schemas/AgentToolConfigParamProgrammaticToolCalling",
"tool_search": "#/components/schemas/AgentToolConfigParamToolSearch",
"web_search": "#/components/schemas/AgentToolConfigParamWebSearch"
},
"propertyName": "type"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"defer_loading": {
"default": false,
"type": "boolean"
},
"name": {
"maxLength": 1048576,
"type": "string"
},
"parameters": {
"additionalProperties": {},
"maxProperties": 1024,
"propertyNames": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": "object"
},
"type": {
"default": "function",
"enum": [
"function"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type",
"name",
"description",
"parameters"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"type": {
"default": "tool_search",
"enum": [
"tool_search"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"type": "boolean"
},
"type": {
"default": "programmatic_tool_calling",
"enum": [
"programmatic_tool_calling"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"allowed_tools": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"connection_origin": {
"anyOf": [
{
"$ref": "#/components/schemas/McpConnectionOriginParam"
},
{
"type": "null"
}
]
},
"credential_id": {
"maxLength": 1048576,
"type": [
"string",
"null"
]
},
"request_metadata": {
"additionalProperties": {},
"maxProperties": 1024,
"propertyNames": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": [
"object",
"null"
]
},
"required": {
"default": false,
"type": "boolean"
},
"server_label": {
"maxLength": 1048576,
"type": "string"
},
"transport": {
"discriminator": {
"mapping": {
"http": "#/components/schemas/McpTransportConfigParamHttp",
"stdio": "#/components/schemas/McpTransportConfigParamStdio"
},
"propertyName": "type"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"authorization": {
"maxLength": 1048576,
"type": [
"string",
"null"
]
},
"headers": {
"additionalProperties": {
"maxLength": 1048576,
"type": "string"
},
"maxProperties": 1024,
"propertyNames": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": [
"object",
"null"
]
},
"server_url": {
"maxLength": 1048576,
"type": "string"
},
"type": {
"default": "http",
"enum": [
"http"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type",
"server_url"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"args": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"command": {
"maxLength": 1048576,
"type": "string"
},
"cwd": {
"maxLength": 1048576,
"type": "string"
},
"env": {
"additionalProperties": {
"maxLength": 1048576,
"type": "string"
},
"maxProperties": 1024,
"propertyNames": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": [
"object",
"null"
]
},
"env_vars": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"type": {
"default": "stdio",
"enum": [
"stdio"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type",
"command",
"cwd"
],
"type": "object"
}
],
"x-oai-discriminator-values": [
"http",
"stdio"
]
},
"type": {
"default": "mcp",
"enum": [
"mcp"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type",
"server_label",
"transport"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"allowed_domains": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"context_size": {
"anyOf": [
{
"$ref": "#/components/schemas/WebSearchContextSizeParam"
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
"$ref": "#/components/schemas/WebSearchLocationParam"
},
{
"type": "null"
}
]
},
"mode": {
"anyOf": [
{
"$ref": "#/components/schemas/WebSearchModeParam"
},
{
"type": "null"
}
]
},
"type": {
"default": "web_search",
"enum": [
"web_search"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type"
],
"type": "object"
}
],
"x-oai-discriminator-values": [
"function",
"tool_search",
"programmatic_tool_calling",
"mcp",
"web_search"
]
},
"maxItems": 16384,
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"agent_id": {
"maxLength": 64,
"type": "string"
},
"environment": {
"discriminator": {
"mapping": {
"none": "#/components/schemas/EnvironmentParamNone",
"openai_hosted": "#/components/schemas/EnvironmentParamOpenaiHosted",
"self_hosted": "#/components/schemas/EnvironmentParamSelfHosted"
},
"propertyName": "type"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"type": {
"default": "none",
"enum": [
"none"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"capability_directories": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"env": {
"additionalProperties": {
"maxLength": 1048576,
"type": "string"
},
"maxProperties": 1024,
"propertyNames": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"type": [
"object",
"null"
]
},
"environment_template_id": {
"maxLength": 64,
"type": "string"
},
"files": {
"items": {
"$ref": "#/components/schemas/HostedEnvironmentFileParam"
},
"maxItems": 50,
"type": [
"array",
"null"
]
},
"network": {
"anyOf": [
{
"$ref": "#/components/schemas/NetworkPolicyParam"
},
{
"type": "null"
}
]
},
"packages": {
"anyOf": [
{
"$ref": "#/components/schemas/EnvironmentPackagesParam"
},
{
"type": "null"
}
]
},
"plugins": {
"items": {
"$ref": "#/components/schemas/HostedPluginParam"
},
"maxItems": 32,
"type": [
"array",
"null"
]
},
"setup_commands": {
"items": {
"$ref": "#/components/schemas/SetupCommandParam"
},
"maxItems": 16,
"type": [
"array",
"null"
]
},
"skills": {
"items": {
"$ref": "#/components/schemas/HostedSkillParam"
},
"maxItems": 200,
"type": [
"array",
"null"
]
},
"type": {
"default": "openai_hosted",
"enum": [
"openai_hosted"
],
"type": "string",
"x-stainless-const": true
}
},
"required": [
"type"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"capability_directories": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
},
"type": {
"default": "self_hosted",
"enum": [
"self_hosted"
],
"type": "string",
"x-stainless-const": true
},
"workspace_directory": {
"maxLength": 1048576,
"type": "string"
}
},
"required": [
"type",
"workspace_directory"
],
"type": "object"
}
],
"x-oai-discriminator-values": [
"none",
"openai_hosted",
"self_hosted"
]
},
"input": {
"anyOf": [
{
"oneOf": [
{
"maxLength": 1048576,
"minLength": 1,
"type": "string"
},
{
"items": {
"$ref": "#/components/schemas/InputMessageParam"
},
"maxItems": 16384,
"type": "array"
}
]
},
{
"type": "null"
}
]
},
"metadata": {
"additionalProperties": {
"maxLength": 512,
"type": "string"
},
"maxProperties": 16,
"propertyNames": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"type": [
"object",
"null"
]
},
"stream": {
"default": false,
"type": "boolean"
},
"vault_ids": {
"items": {
"maxLength": 1048576,
"type": "string"
},
"maxItems": 16384,
"type": [
"array",
"null"
]
}
},
"required": [
"environment"
],
"type": "object"
}
}
}
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionResource"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/SessionEvent"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse-2"
}
}
}
}
},
"tags": [
"Agents"
],
"x-oai-streaming": {
"request_field": "stream",
"response_status_code": 201
},
"x-oaiMeta": {
"name": "Create an agent session"
}
}
Monitored for you
Does this change affect your integration?
Choose the operations and fields your services use. detektu matches OpenAI findings to that declared usage so your team can review the relevant evidence. No agent or repository access required.