/v1/projects/{projectId}/web-sessions/agents/{id} (PATCH)
PATCH
/v1/projects/{projectId}/web-sessions/agents/{id}
const url = 'https://service.testing.nairon.cloud/v1/projects/example/web-sessions/agents/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","conversationId":"example","scopes":["voice"],"allowedOrigins":["https://example.com"],"status":"active"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://service.testing.nairon.cloud/v1/projects/example/web-sessions/agents/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "conversationId": "example", "scopes": [ "voice" ], "allowedOrigins": [ "https://example.com" ], "status": "active" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: cuid
projectId
required
string format: cuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
conversationId
string format: cuid
scopes
Array<string>
allowedOrigins
Array<string>
status
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
id
required
string format: cuid
projectId
required
string format: cuid
name
required
string
channel
required
string
scopes
required
Array<string>
allowedOrigins
required
Array<string>
conversationId
required
string format: cuid
status
required
string
Example
{ "channel": "widget", "scopes": [ "voice" ], "status": "active"}