Update Contact Settings
Updates the current contact settings of the project
HTTP Request
PATCH/api/settings/contacts
Authorization
Authorization
- Required: Yes
- Permission: Staff with ContactsSettingsPermission or Admin
- Permission Code: 1057
- Authentication: Token authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| contacts_default_consultation | ContactObject | No | Default consultation support configuration (JSON, default: {}) |
| contacts_default_question | QuestionObject | No | Default question support configuration (JSON, default: {}) |
ContactObject Structure
| Field | Type | Description |
|---|---|---|
| String | Consultation support email address | |
| message | String | Consultation support message template |
| subject | String | Consultation support subject line |
| mobile_number | String | Consultation support phone number |
| first_name | String | Consultation support first name |
| last_name | String | Consultation support last name |
QuestionObject Structure
| Field | Type | Description |
|---|---|---|
| String | Question support email address | |
| message | String | Question support message template |
| subject | String | Question support subject line |
| mobile_number | String | Question support phone number |
| first_name | String | Question support first name |
| last_name | String | Question support last name |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Update contact settings
4response = requests.patch('http://www.example.com/api/settings/contacts',
5 headers={'Authorization': 'Token <your_api_key>'},
6 json={
7 "contacts_default_consultation": {
8 "enabled": true,
9 "email": "support@example.com"
10 },
11 "contacts_default_question": {
12 "enabled": true,
13 "email": "support@example.com"
14 }
15 }
16)
17print(response.json())1# Update contact settings
2curl "http://www.example.com/api/settings/contacts" -H "Authorization: Token <your_api_key>" -X PATCH -d '{
3 "contacts_default_consultation": {
4 "enabled": true,
5 "email": "support@example.com"
6 },
7 "contacts_default_question": {
8 "enabled": true,
9 "email": "support@example.com"
10 }
11}'Response Fields
| Field | Type | Description |
|---|---|---|
| ContactObject | Default consultation support configuration (JSON, default: {}) | |
| QuestionObject | Default question support configuration (JSON, default: {}) |
Example Response
{
"contacts_default_consultation": {
"email": "erfan_doe@gmail.com",
"message": "I need talk to support. Please call me.",
"subject": "Consultation Support",
"last_name": "Doe10000",
"first_name": "John100000",
"mobile_number": "+1234567890"
},
"contacts_default_question": {
"email": "david_bw@gmail.com",
"message": "I have a question about product",
"subject": "Question Support",
"last_name": "David10000",
"first_name": "Bw100000",
"mobile_number": "+1234567890"
}
}