How to use an assistantId in the response of an as...
# support
j
What I want to do is that whenever a phone receives a inbound call, I want to get the assistantId as a response from the assistant-request event's response. In one of the attempts, I tried returning the assistant in this format -
Copy code
{
  "assistant": {
    "id": "34b6d38b-4a2c-4df8-8aab-cdf29512c6d8"
  }
}
And also tried sending it as
Copy code
{
  "assistant": {
    "assistantId": "34b6d38b-4a2c-4df8-8aab-cdf29512c6d8"
  }
}
In both the case it encountered an error saying something like -
Copy code
{"error":"Couldn't Get Assistant. Either Set The Assistant I D On The Phone Number. Or, To Debug Your Assistant Request, Check The Debugging Artifacts That Were Just Sent To Your Server.","assistant_request_error":"Invalid Assistant. Errors: [\"assistant.property id should not exist\"]","assistant_request_response":{"assistant":{"id":"34b6d38b-4a2c-4df8-8aab-cdf29512c6d8"}}},"call":{"id":"94b2d3d9-6bac-4702-a2d8-d6db10e13095","org_id":"e01ce917-668d-49fb-965c-aa1d38b5b253",
v
@jit It seems like there is a specific format that the assistant-request event expects when you're trying to set the assistant ID. The error message indicates that the property should not be named
id
but rather something else, possibly
assistantId
. Based on the error message you received, it looks like the correct format for the assistant ID should not include the
id
property within the
assistant
object. Instead, you should try sending the assistant ID in the following format:
Copy code
json
{"assistantId":"34b6d38b-4a2c-4df8-8aab-cdf29512c6d8"}
Make sure that you are sending this response to the assistant-request event when your server is called. If you continue to encounter errors, please check the documentation for the expected format or reach out to support for further assistance.
You can continue this conversation by mentioning me in the message.
j
Checking
resolved
5 Views