latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-142528921.8 MB

a884f7dcbfc3

AI Webhooks

Amazon Bedrock post-prompt callback

Sent to your amazon_bedrock.post_prompt_url when the agent's session ends, carrying its answer to your post_prompt alongside the record of the call. Nothing you return in the response is read.

Bedrock agents send a different report from ai agents. There is no call_timeline, previous_contexts, hard_timeout, call_ended_by, or ai_id_tag; raw_call_log is a copy of call_log rather than a separate unfiltered view; swaig_log is always empty; conversation_summary is always present; and the total_* fields arrive without your having to enable accounting. post_prompt_url also takes no separate credentials here — put them in the URL as username:password@url. Write your handler against this payload, not the AI post-prompt callback.

postWebhookbedrockPostPromptCallback

Payload

project_idstring

Your project ID, when available.

space_idstring

Your Space ID, when available.

content_typestring required

The content type of the request body. Always text/json.

content_dispositionstring required

How the body is delivered. Always agent.summary for the end-of-call report.

conversation_typestring required

The kind of conversation the agent ran. Always voice.

call_idstring required

The ID of the call.

app_namestring required

The name of your Bedrock application. Defaults to bedrock.

ai_session_idstring required

The ID of the AI session on the call. Matches call_id for Bedrock agents.

conversation_idstring

The conversation ID, when the agent was configured with one.

actionstring required

What the request is asking of you. Always post_conversation for the end-of-call report.

call_start_dateinteger

When the call was created, as a Unix timestamp in microseconds.

call_answer_dateinteger

When the call was answered, as a Unix timestamp in microseconds. 0 when it never was.

call_end_dateinteger

When the call ended, as a Unix timestamp in microseconds. 0 while the call is still up.

ai_start_dateinteger

When the agent started, as a Unix timestamp in microseconds.

ai_end_dateinteger

When the agent stopped, as a Unix timestamp in microseconds. Omitted while it is still running.

caller_id_namestring

The caller's name, when available.

caller_id_numberstring

The caller's number, when available.

total_minutesnumber

The number of billable minutes, with a minimum of one. Fractional durations are kept as they are; only a call under a minute is raised to 1. Included once the agent has stopped.

total_input_tokensinteger

Input tokens the session consumed. Included once the agent has stopped.

total_output_tokensinteger

Output tokens the session produced. Included once the agent has stopped.

total_wire_input_tokensinteger

A copy of total_input_tokens. Included once the agent has stopped.

total_wire_input_tokens_per_minutenumber

total_input_tokens divided by total_minutes. Included once the agent has stopped.

total_wire_output_tokensinteger

A copy of total_output_tokens. Included once the agent has stopped.

total_wire_output_tokens_per_minutenumber

total_output_tokens divided by total_minutes. Included once the agent has stopped.

total_tts_charsinteger

Characters sent to text-to-speech. Included once the agent has stopped.

total_tts_chars_per_minnumber

total_tts_chars divided by total_minutes. Included once the agent has stopped.

total_asr_minutesnumber

Minutes of audio sent to speech recognition. Included once the agent has stopped.

total_asr_cost_factornumber

Always 1. Bedrock agents do not vary the factor. Included once the agent has stopped.

SWMLVarsobject

SWML variables for the call. Included when the call carries SWML state.

SWMLCallobject

SWML call state. Included when the call carries SWML state.

global_dataobject required

The session's final global_data. An empty object when you seeded none.

conversation_summarystring required

The agent's answer to your post_prompt, as plain text.

Example payload

{
  "project_id": "4d0d6f16-5881-4fcc-92a4-02c51a91954d",
  "space_id": "451ed9ff-e568-4222-8af9-4f9ab7428d09",
  "content_type": "text/json",
  "content_disposition": "agent.summary",
  "conversation_type": "voice",
  "call_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
  "app_name": "bedrock",
  "ai_session_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
  "conversation_id": "support-thread-4821",
  "action": "post_conversation",
  "call_log": [
    {
      "role": "system",
      "content": "You dispatch taxis."
    },
    {
      "role": "user",
      "content": "I need a ride to the airport."
    }
  ],
  "raw_call_log": [
    {
      "role": "assistant",
      "content": "Your ride is booked for 6pm.",
      "timestamp": 1694541297950440
    }
  ],
  "call_start_date": 1694541295773508,
  "call_answer_date": 1694541296799504,
  "call_end_date": 1694541335435503,
  "ai_start_date": 1694541297950440,
  "ai_end_date": 1694541335425164,
  "caller_id_name": "Jane Doe",
  "caller_id_number": "+15555550100",
  "times": [
    {
      "response": "Your ride is booked for 6pm.",
      "response_word_count": 6,
      "answer_time": 1.42,
      "token_time": 0.31,
      "tokens": 53,
      "avg_tps": 37.3,
      "tps": 41.2
    }
  ],
  "total_minutes": 3.14,
  "total_input_tokens": 5627,
  "total_output_tokens": 119,
  "total_wire_input_tokens": 5627,
  "total_wire_input_tokens_per_minute": 1792.04,
  "total_wire_output_tokens": 119,
  "total_wire_output_tokens_per_minute": 37.9,
  "total_tts_chars": 842,
  "total_tts_chars_per_min": 268.15,
  "total_asr_minutes": 2.41,
  "total_asr_cost_factor": 1,
  "post_prompt_data": {
    "parsed": [
      {
        "intent": "book_ride",
        "resolved": true
      }
    ],
    "raw": "{\"intent\":\"book_ride\",\"resolved\":true}",
    "substituted": "Caller booked a ride to the airport."
  },
  "global_data": {
    "customer_tier": "premium"
  },
  "swaig_log": [],
  "conversation_summary": "Caller booked a ride from 123 Main St to the airport for 6pm."
}

Response

Webhook received