Skip to content
Get started

Submit Input Response

client.Agent.AutomateInput(ctx, requestID, body) (*AgentAutomateInputResponse, error)
POST/automate/{requestID}/input

Submit a response to an interactive form data request from an in-progress automation task. When the AI agent encounters a form requiring user data, it emits an interactive:form_data:request or interactive:form_data:error SSE event containing a requestId. Use this endpoint to provide the requested data or cancel the request.

Lifecycle:

  • Input requests expire after 2 minutes by default
  • Expired or already-answered requests return 410 Gone
  • Successful submissions return 202 Accepted (fire-and-forget from caller’s perspective)
ParametersExpand Collapse
requestID string
body AgentAutomateInputParams
Cancelled param.Field[bool]Optional

Set to true to cancel/decline the request

Fields param.Field[[]AgentAutomateInputParamsField]Optional

Field values as array of {ref, value} pairs (required when not cancelled)

Ref stringOptional
Value stringOptional
ReturnsExpand Collapse
type AgentAutomateInputResponse struct{…}
Status stringOptional

Submit Input Response

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/tabstack-go"
  "github.com/stainless-sdks/tabstack-go/option"
)

func main() {
  client := tabstack.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Agent.AutomateInput(
    context.TODO(),
    "requestID",
    tabstack.AgentAutomateInputParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Status)
}
{
  "status": "accepted"
}
Returns Examples
{
  "status": "accepted"
}