transfering call not working

I keep getting an error message regarding my conditions section, im sending the value for transfering a telephone call to another number, but i keep getting an error message saying {"message":["assistant.model.messages.0.property condition should not exist"],"error":"Bad Request","statusCode":400}

$data=[
"assistant"=>[
"backgroundSound"=>"office",
"endCallMessage"=>"thankyouforyourtimetoday,goodbye.",
"firstMessage"=>$intro,
"voicemailDetectionEnabled"=>true,
"endCallFunctionEnabled"=>true,
"hipaaEnabled"=>false,
"llmRequestDelaySeconds"=>0.1,
"maxDurationSeconds"=>300,
"serverMessages"=>[
"end-of-call-report",
],
"model"=>[
"model"=>"gpt-4o",
"provider"=>"openai",
"semanticCachingEnabled"=>true,
"tools"=>[
[
"type"=>"voicemail"
]
],
"messages"=>[
[
"role"=>"system",
"content"=>$prompt,
"conditions"=>[
[
"param"=>"destination",
"operator"=>"eq",
"value"=>"+#####"]]]]],
"voicemailDetection"=>[
"provider"=>"twilio",
"enabled"=>false
],
"name"=>"zo",
"recordingEnabled"=>true,
"transcriber"=>[
"provider"=>"deepgram",
"language"=>"en-GB",
"model"=>"nova-2"
],
"voice"=>[
"provider"=>"11labs",
"voiceId"=>$voiceId
]
],
"customer"=>[
"number"=>$telephone,
"name"=>$name
],
"maxDurationSeconds"=>600,
"phoneNumber"=>[
"assistantId"=>"#####",
"name"=>"####",
"twilioAccountSid"=>"#####",
"twilioAuthToken"=>"#####",
"twilioPhoneNumber"=>$tel],
"type"=>"outboundPhoneCall"
];
Was this page helpful?