PATCH /v2/update-call/{call_id}

Changed on

Update metadata and sensitive data storage settings for an existing call.

Request

  • Base URL
    https://api.retellai.com
  • Auth
    HTTP bearer

Path parameters

call_idstring required
Example:call_a4441234567890777c4a4a123e6

The call id of the call to be updated.

Request body

metadataobject

An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object. Size limited to 50kB max.

data_storage_setting'everything' | 'everything_except_pii' | 'basic_attributes_only'

Data storage setting for this call. Overrides the agent's default setting. "everything" stores all data, "everything_except_pii" excludes PII when possible, "basic_attributes_only" stores only metadata. Cannot be downgraded from more restrictive to less restrictive settings.

custom_attributesobject

Custom attributes for the call, as key-value pairs. Each attribute must first be defined for your organization in the Retell dashboard (Call History → Actions → Custom attributes) before it can be set here. The object key must match the id of an existing organization-level custom attribute; keys that do not match a defined attribute are ignored and will not be saved. Values must be a string, number, or boolean.

Example request

{
  "metadata": {
    "customer_id": "cust_123",
    "notes": "Follow-up required"
  },
  "data_storage_setting": "everything_except_pii",
  "custom_attributes": {
    "custom_attribute_1": "value1",
    "custom_attribute_2": "value2"
  }
}

Response

Call metadata updated successfully

OR

Example response

{
  "call_type": "web_call",
  "access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
  "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "agent_name": "My Agent",
  "agent_version": 1,
  "agent_tag": "prod",
  "call_status": "registered",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  },
  "collected_dynamic_variables": {
    "last_node_name": "Test node"
  },
  "custom_sip_headers": {
    "X-Custom-Header": "Custom Value"
  },
  "data_storage_setting": "everything",
  "opt_in_signed_url": true,
  "start_timestamp": 1703302407333,
  "end_timestamp": 1703302428855,
  "transfer_end_timestamp": 1703302628855,
  "duration_ms": 10000,
  "transcript": "Agent: hi how are you doing?\nUser: Doing pretty well. How are you?\nAgent: That's great to hear! I'm doing well too, thanks! What's up?\nUser: I don't have anything in particular.\nAgent: Got it, just checking in!\nUser: Alright. See you.\nAgent: have a nice day\n",
  "transcript_object": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "scrubbed_transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "pre_session_transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "scrubbed_pre_session_transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "post_session_transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "scrubbed_post_session_transcript_with_tool_calls": [
    {
      "role": "agent",
      "content": "hi how are you doing?",
      "words": [
        {
          "word": "hi",
          "start": 0.7,
          "end": 1.3
        }
      ]
    }
  ],
  "recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
  "recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
  "scrubbed_recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
  "scrubbed_recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
  "public_log_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/public_log.txt",
  "knowledge_base_retrieved_contents_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/kb_retrieved_contents.txt",
  "latency": {
    "e2e": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "asr": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "llm": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "llm_websocket_network_rtt": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "tts": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "knowledge_base": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    },
    "s2s": {
      "p50": 800,
      "p90": 1200,
      "p95": 1500,
      "p99": 2500,
      "max": 2700,
      "min": 500,
      "num": 10
    }
  },
  "transfer_destination": "+12137771234",
  "call_analysis": {
    "call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
    "user_sentiment": "Positive",
    "call_successful": true
  },
  "call_cost": {
    "product_costs": [
      {
        "product": "elevenlabs_tts",
        "unit_price": 1,
        "cost": 60
      }
    ],
    "total_duration_seconds": 60,
    "total_duration_unit_price": 1,
    "combined_cost": 70
  },
  "unbilled_response_periods": [
    {
      "start_ms": 12000,
      "end_ms": 45000,
      "type": "cascading"
    }
  ],
  "unbilled_response_seconds": 33
}

Changes

    • info

      added the optional property //////// to the response with the status

    • info

      added the optional property //////// to the response with the status

    • info

      added the optional property //////// to the response with the status

    • info

      added the optional property //////// to the response with the status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      the ///////// response's property type changed from object to no type for status

    • breaking

      the ///////////// response's property type changed from object to no type for status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • breaking

      removed the required property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • warning

      removed the optional property ////////// from the response with the status

    • warning

      removed the optional property ////////////// from the response with the status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////// response property allOf list for the response status

    • info

      added subschema #2 to the ///////////// response property allOf list for the response status