Create a chat button
curl --request POST \
--url https://api.meetdarwin.ai/v1/chat_buttons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"message": "<string>",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
message: '<string>',
colors: {
background: '<string>',
text: '<string>',
border: '<string>',
hover: '<string>'
},
custom: {paddingX: 123, paddingY: 123, fontSize: 123, radius: 123},
nofollow: true
})
};
fetch('https://api.meetdarwin.ai/v1/chat_buttons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.meetdarwin.ai/v1/chat_buttons"
payload = {
"label": "<string>",
"message": "<string>",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "btn_k3j9x2m4p7",
"object": "chat_button",
"label": "<string>",
"message": "<string>",
"behavior": "send",
"style": "brand",
"size": "sm",
"corners": "match",
"width": "auto",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": true,
"link": "<string>",
"html": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<string>"
}Agent
Create a chat button
Requires the agent:write scope.
POST
/
chat_buttons
Create a chat button
curl --request POST \
--url https://api.meetdarwin.ai/v1/chat_buttons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"message": "<string>",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
message: '<string>',
colors: {
background: '<string>',
text: '<string>',
border: '<string>',
hover: '<string>'
},
custom: {paddingX: 123, paddingY: 123, fontSize: 123, radius: 123},
nofollow: true
})
};
fetch('https://api.meetdarwin.ai/v1/chat_buttons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.meetdarwin.ai/v1/chat_buttons"
payload = {
"label": "<string>",
"message": "<string>",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "btn_k3j9x2m4p7",
"object": "chat_button",
"label": "<string>",
"message": "<string>",
"behavior": "send",
"style": "brand",
"size": "sm",
"corners": "match",
"width": "auto",
"colors": {
"background": "<string>",
"text": "<string>",
"border": "<string>",
"hover": "<string>"
},
"custom": {
"paddingX": 123,
"paddingY": 123,
"fontSize": 123,
"radius": 123
},
"nofollow": true,
"link": "<string>",
"html": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<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>",
"required_plan": "growth",
"feature": "fit_rules",
"upgrade_url": "<string>"
}Authorizations
Headers
Body
application/json
Response
OK