Change support settings

.md

Save what changed on Support settings, and only that.

Scopesadmin:write
Permissionmanage_support_settings
PUT/v1/admin/settings/support

Only the fields you send change, so somebody who fixes the phone number does not write back a mode or an assistant a colleague changed meanwhile. The save is one transaction: all of it lands, or none.

The assistant's three fields also need manage_ai_settings, and the two mail switches manage_email, because they are kept where the AI Settings and Email templates screens keep them. A save that carries one of them without that permission is refused whole, with 403 forbidden, rather than half saved. That refusal carries no required_permission. The settings say in can beforehand which fields this person may send.

Text is trimmed, and a field sent empty is saved as null. assistant_name is the exception: sent empty, it is refused.

Answers with the settings as they are now.

Needs a firm. Our own staff name one with the Propper-Workspace header.

Request

FieldDescription
support_modeai_first, human_only or disabled
contact_pagebuiltin for the firm's own page at /contact, which clears external_contact_url, or external. Not stored: the saved address is the choice. With external, an external_contact_url sent empty or null is refused. Left out, the saved address stays
external_contact_urlWhere /contact sends everybody: an http or https address, up to 2048 characters
support_emailA valid email address, up to 255 characters
support_phoneUp to 50 characters
support_addressUp to 500 characters, line breaks allowed
auto_close_enabledtrue or false. Off, a ticket waiting on the trader stays open until somebody closes it, including one already warned
auto_close_warn_after_daysDays of silence before the warning, 1 to 60
auto_close_after_warning_daysDays after the warning before the ticket closes, 1 to 30
assistant_nameUp to 50 characters. Needs manage_ai_settings
assistant_personalityprofessional, casual, friendly or custom. Needs manage_ai_settings
assistant_instructionsUp to 2000 characters, null for none. Needs manage_ai_settings
mail_reply_enabledThe mail to a trader who is away when the team answers. Needs manage_email
mail_idle_warning_enabledThe mail with the warning that a quiet ticket is about to close. Switching it off does not stop quiet tickets from closing. Needs manage_email

A change to the days applies from the next daily run, to every ticket already waiting on a trader.

curl -X PUT "https://api.proppertrading.com/v1/admin/settings/support" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -H "Content-Type: application/json" \
  -d '{"support_mode": "ai_first", "contact_page": "external", "external_contact_url": "https://help.acme.com/contact", "support_email": "[email protected]"}'

Response

The settings, with mode, external_contact_url and support_email as they are now.

Errors

StatusCodeMeaning
400workspace_requiredAsked by our own staff without naming a firm
401invalid_tokenNot a token, or the secret does not match
401revoked_tokenSigned out here or from another device
401expired_tokenNinety days without use, or a set expiry passed
403admin_access_requiredThis account no longer helps run the environment
403insufficient_scopeThis device does not hold admin:write
403workspace_not_permittedThe Propper-Workspace header names an environment this account cannot act in
403forbiddenWithout manage_support_settings, an assistant field without manage_ai_settings, or a mail switch without manage_email. Nothing is saved
422validation_failedA value out of its range or not one of its values, external with an empty external_contact_url, or an address that is not http or https. Nothing is saved