Skip to content

Invoke Portal Copilot Action

POST
/v1/portal/copilot/actions
curl --request POST \
--url 'https://example.com/v1/portal/copilot/actions?tenant_id=' \
--header 'Content-Type: application/json' \
--data '{ "page_path": "/", "surface_key": "portal", "entity_ref": "", "selected_text": "", "draft_target_id": "", "instruction_notes": "", "interaction_manifest": [ { "id": "example", "kind": "scroll", "label": "example", "description": "", "value_hint": "", "widget_role": "", "owner_surface": "", "priority": 0 } ], "action_id": "example", "thread_id": "", "payload": {} }'
tenant_id
Tenant Id
string
""
x-pomerium-jwt-assertion
Any of:
string
X-FractalOps-Tenant-Id
Any of:
string
Media typeapplication/json
PortalCopilotActionIn
object
page_path
Page Path
string
default: /
surface_key
Surface Key
string
default: portal
entity_ref
Entity Ref
string
""
selected_text
Selected Text
string
""
draft_target_id
Draft Target Id
string
""
instruction_notes
Instruction Notes
string
""
interaction_manifest
Interaction Manifest
Array<object>
PortalCopilotInteractionBindingIn
object
id
required
Id
string
kind
required
Kind
string
Allowed values: scroll highlight draft_fill
label
required
Label
string
description
Description
string
""
value_hint
Value Hint
string
""
widget_role
Widget Role
string
""
owner_surface
Owner Surface
string
""
priority
Priority
integer
0
action_id
required
Action Id
string
thread_id
Thread Id
string
""
payload
Payload
object
key
additional properties
any

Successful Response

Media typeapplication/json
PortalCopilotMessageOut
object
thread_id
required
Thread Id
string
status
Status
string
default: answered
message
required
Message
string
capabilities
Capabilities
Array<object>
PortalCopilotCapability
object
action_id
required
Action Id
string
label
required
Label
string
summary
Summary
string
""
state
State
string
default: disabled
Allowed values: allowed denied disabled
reason
Reason
string
""
tool_calls
Tool Calls
Array<object>
PortalCopilotToolCallOut
object
id
required
Id
string
name
required
Name
string
Allowed values: page.scroll page.highlight page.draft_fill
state
State
string
default: proposed
Allowed values: proposed approved denied executed failed
description
required
Description
string
selector
Selector
string
""
value
Value
string
""
policy_reason
Policy Reason
string
""
ui_artifacts
Ui Artifacts
Array<object>
object
key
additional properties
any
Example
{
"status": "answered",
"capabilities": [
{
"summary": "",
"state": "allowed",
"reason": ""
}
],
"tool_calls": [
{
"name": "page.scroll",
"state": "proposed",
"selector": "",
"value": "",
"policy_reason": ""
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}