Change the agent's settings, or switch the chat on or off
curl --request PATCH \
--url https://api.meetdarwin.ai/v1/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": [
"<string>"
],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": [
"<string>"
],
"opening": {
"enabled": true,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>"
}
],
"excluded_paths": [
"<string>"
]
},
"automation": {
"auto_testing": true,
"auto_launch": true,
"auto_promote": true
},
"live": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
greeting: '<string>',
intro: '<string>',
suggestions: ['<string>'],
booking_link: '<string>',
business_context: '<string>',
allowed_origins: ['<string>'],
opening: {
enabled: true,
headline: '<string>',
buttons: [{label: '<string>', message: '<string>'}],
excluded_paths: ['<string>']
},
automation: {auto_testing: true, auto_launch: true, auto_promote: true},
live: true
})
};
fetch('https://api.meetdarwin.ai/v1/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.meetdarwin.ai/v1/agent"
payload = {
"name": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": ["<string>"],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": ["<string>"],
"opening": {
"enabled": True,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>"
}
],
"excluded_paths": ["<string>"]
},
"automation": {
"auto_testing": True,
"auto_launch": True,
"auto_promote": True
},
"live": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "agent",
"name": "<string>",
"role": "<string>",
"tone": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": [
"<string>"
],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": [
"<string>"
],
"opening": {
"enabled": true,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>",
"locked": true
}
],
"excluded_paths": [
"<string>"
]
},
"automation": {
"auto_testing": true,
"auto_launch": true,
"auto_promote": true
},
"live": true,
"site_key": "<string>",
"embed_snippet": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}Agent
Change the agent's settings, or switch the chat on or off
Requires the agent:write scope.
PATCH
/
agent
Change the agent's settings, or switch the chat on or off
curl --request PATCH \
--url https://api.meetdarwin.ai/v1/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": [
"<string>"
],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": [
"<string>"
],
"opening": {
"enabled": true,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>"
}
],
"excluded_paths": [
"<string>"
]
},
"automation": {
"auto_testing": true,
"auto_launch": true,
"auto_promote": true
},
"live": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
greeting: '<string>',
intro: '<string>',
suggestions: ['<string>'],
booking_link: '<string>',
business_context: '<string>',
allowed_origins: ['<string>'],
opening: {
enabled: true,
headline: '<string>',
buttons: [{label: '<string>', message: '<string>'}],
excluded_paths: ['<string>']
},
automation: {auto_testing: true, auto_launch: true, auto_promote: true},
live: true
})
};
fetch('https://api.meetdarwin.ai/v1/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.meetdarwin.ai/v1/agent"
payload = {
"name": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": ["<string>"],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": ["<string>"],
"opening": {
"enabled": True,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>"
}
],
"excluded_paths": ["<string>"]
},
"automation": {
"auto_testing": True,
"auto_launch": True,
"auto_promote": True
},
"live": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "agent",
"name": "<string>",
"role": "<string>",
"tone": "<string>",
"greeting": "<string>",
"intro": "<string>",
"suggestions": [
"<string>"
],
"booking_link": "<string>",
"business_context": "<string>",
"allowed_origins": [
"<string>"
],
"opening": {
"enabled": true,
"headline": "<string>",
"buttons": [
{
"label": "<string>",
"message": "<string>",
"locked": true
}
],
"excluded_paths": [
"<string>"
]
},
"automation": {
"auto_testing": true,
"auto_launch": true,
"auto_promote": true
},
"live": true,
"site_key": "<string>",
"embed_snippet": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}{
"type": "https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope",
"title": "<string>",
"status": 0,
"code": "insufficient_scope",
"detail": "<string>",
"request_id": "req_8m2k4p0q1x7z9c3v5b6n",
"param": "<string>"
}Authorizations
A secret key (dk_live_…). Scopes: conversations:read, contacts:read, contacts:write, meetings:read, analytics:read, events:read, webhooks:write, knowledge:read, knowledge:write, agent:read, agent:write, experiments:read, experiments:write, privacy:write, chat:write.
Headers
Retry safely: the first response is replayed for 24 hours (not for streamed answers).
Maximum string length:
255Body
application/json
Required string length:
1 - 100Available options:
friendly, professional, direct Required string length:
1 - 200Maximum string length:
300Maximum array length:
6Required string length:
1 - 120Maximum string length:
1500Required string length:
40 - 20000Maximum array length:
50Required string length:
1 - 300Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Allowed value:
"agent"Show child attributes
Show child attributes
Show child attributes
Show child attributes