Replace your settings
const url = 'https://app.mondochat.io/v1/app/settings';const options = { method: 'PUT', headers: { 'if-match': 'example', 'Mondochat-App-Id': '<Mondochat-App-Id>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"default_role":"member","policy":[{"from":"member","to":"model"},{"from":"model","to":"member"}],"roles":[{"key":"member","label":{"en":"Member"}},{"key":"model","label":{"en":"Model"}}],"version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.mondochat.io/v1/app/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Mondochat-App-Id: <Mondochat-App-Id>' \ --header 'if-match: example' \ --data '{ "default_role": "member", "policy": [ { "from": "member", "to": "model" }, { "from": "model", "to": "member" } ], "roles": [ { "key": "member", "label": { "en": "Member" } }, { "key": "model", "label": { "en": "Model" } } ], "version": 1 }'Replaces the whole settings document of the app that owns the server secret. Takes the app id and the server secret, and If-Match with the current version, quoted; a stale version answers 412 precondition_failed. The document is validated: unknown keys and a role that is not a key of roles answer 422 validation, with the path of the setting in loc. A successful write bumps the version, which the ETag header returns. Each API process caches settings for 30 seconds and a write clears the cache of the process that handled it. See https://docs.mondochat.io/settings/overview/.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The current settings version, quoted: “3”.
The current settings version, quoted: “3”.
Request Bodyrequired
Section titled “Request Bodyrequired”The settings document of one app.
object
Look of the chat.
object
Show the people’s pictures; off draws the initial on the primary colour.
Background color.
CSS font family.
The inbox close button is a 30px tinted chip.
Tint the inbox background on every layout, not only two-pane.
Launcher bubble.
object
Show the launcher bubble.
Show the inbox close button on the inline page on a screen with a mouse.
Flat bubble colour, and Arial in the unread badge and the toast.
Launcher corner.
Text on the primary color.
Primary color.
Corner radius in pixels.
Surface color.
Text color.
Video calls.
object
Agora area code, e.g. EUROPE.
Agora video codec.
Ask before starting a call.
Every call takes the whole window, the chat button docks the call as a strip or a side rail beside the thread, and a minimise button shrinks it to a bubble.
Video calls enabled.
Calls end after this.
After calling an offline peer, note in the thread that they may not answer.
Per-minute charging.
Ring time before missed.
An incoming call opens the chat and rings while it is closed; off shows the toast and sound, and the ring when the chat opens.
Show buyers a locked call button with a tip when they cannot call a seller.
One card per call that reads Call ended when it is over, and a busy callee closes the caller’s call screen instead of showing an error.
Camera capture settings.
object
Capture frame rate.
Capture height in pixels.
Capture width in pixels.
Warn before calling an offline peer.
Messages.
object
Users may upload their own picture; it shows only after photo moderation approves it, and it wins over the host’s avatar.
The photo consent prompt puts Don’t allow before Allow; off puts Allow first.
Older messages load when the thread scrolls to its top; off shows a Load earlier button.
Senders may edit a text message this long after sending; 0 turns edits off.
Maximum photo upload size in bytes.
Photo messages enabled.
A message to someone who blocked the sender is refused (403 forbidden, reason undelivered) and not stored; off accepts it and drops it silently.
Day separators read day and month only; off adds the weekday, and the year for earlier years.
Maximum message length.
Senders may delete a message for everyone this long after sending; 0 turns it off. Deleting for oneself is always allowed.
Maximum video size in bytes; the browser converts to fit.
Maximum video length in seconds.
Video messages enabled.
Senders may mark a photo, video or voice note view once.
Voice notes enabled.
Maximum voice note size in bytes.
Maximum voice note length in seconds.
Selling services.
object
Catalog from the catalog callout or the dashboard.
An amount the buyer types, in the catalog currency.
object
Buyers may type an amount, such as a tip.
Largest amount in minor units.
Smallest amount in minor units.
Selling in conversations enabled.
How purchases are paid.
Where checkout and top-up pages open.
Show the balance the catalog callout returns.
A euro price on a purchase card reads 5 € or 5.50 €, never grouped.
Role when the token has none.
Anonymous guests.
object
Allow anonymous guests.
Merge a recent guest into the member who logs in on that browser.
Guests show as “
While the viewer’s own message is the last one, offer to tell them when the peer replies; tapping sends navigate reason notify for the host to collect an address. Same viewers as the nudge.
The notify prompt’s button reads Create account and opens guests.nudge.signup_url (navigate reason signup) instead of Notify me; with no signup_url it stays Notify me.
Keep the notify prompt once the conversation has a message, until the viewer taps or dismisses it, instead of only while their own message is the last one.
Role given to guests.
Languages and copy.
object
Text overrides per language and message key.
object
object
Language when nothing else decides.
Languages offered.
Limits per role.
object
Links to the client’s site.
object
The conversation header opens the profile of sellers only.
With services_page, buyers also get a Services menu item.
Buyers can open the seller’s services page from a conversation.
Moderation.
object
Call moderation.
object
Agora call moderation enabled.
Seconds between frames a peer captures.
Frames captured per participant per call.
Peers sample a participant whose Agora task did not start.
Moderate photos.
Action per category.
object
Action for Alcohol findings.
Action for Animals findings.
Action for Doxxing findings.
Action for Drugs findings.
Action for ExternalPayment findings.
Action for Fraud findings.
Action for Harassment findings.
Action for Hate findings.
Action for IllegalServices findings.
Action for Minors findings.
Action for NonConsent findings.
Action for Political findings.
Action for SelfHarm findings.
Action for Trafficking findings.
Action for Violence findings.
Action for Weapons findings.
Moderate text messages.
Moderate videos.
Transcribe and moderate voice notes.
Notifications.
object
Show a banner on new messages.
At most one banner per 5s; off replaces it on every message (the sound stays throttled).
Play a sound on new messages.
Clicking the launcher toast opens its conversation, or only the panel.
One row per ordered role pair; a missing pair allows nothing.
The policy for one ordered role pair: from acts on to.
object
May block the peer.
May buy from the peer.
May start calls.
Acting role.
May send messages.
May send ad hoc offer cards.
The receiver must accept photos per conversation.
May send photos.
Starting needs a vouch token or the session’s peer.
May see the peer’s presence.
May start a conversation.
Target role.
Online status.
object
Presence enabled.
Also push presence changes to each peer’s own channel. Turn off once every client subscribes with presence_pass.
Show the online dot and last seen in inbox rows.
Show “last seen” times.
The chat as an installable app.
object
The chat as an installable app: device sign-in, manifest and pushes; off keeps devices but refuses them.
Notifications show the message preview instead of “New message”.
Rate limits.
object
User requests per second per app.
User roles.
A user role. Roles are referenced by policy, limits, guests and the role claim.
object
Role key, the value of the role claim.
Display name per language.
object
Users with this role sell services.
Blocking and reporting.
object
The banned panel has its own Close button.
A report asks for a reason; off is a plain confirm.
Settings schema version.
Webhook event options.
object
Message.created carries the text.
Message kinds that make a first contact or an unread streak.
Send conversation.unread at each delay while the recipient still has unread messages; [] never.
After the last delay has fired, the next message opens a new streak, so a recipient who never reads is notified again.
Organising conversations.
object
Users may give peers a private name.
Sellers may set a reply sent for them, once a day per chat, while away.
Members may take messages from members only.
Users may keep a private note on a peer.
Users may pin up to 10 conversations.
Inbox views, archive, search, spent and purchases, and the sign-up invite.
Sellers keep up to 20 saved replies and send one with a tap.
Conversations with a seller carry her typical reply time.
Client tiers, lowest first; users get one by key.
A client tier a user can hold.
object
Badge color.
Tier key, the value of a user’s tier.
Display name per language.
object
Responses
Section titled “Responses”Successful Response
The settings document of one app.
object
Look of the chat.
object
Show the people’s pictures; off draws the initial on the primary colour.
Background color.
CSS font family.
The inbox close button is a 30px tinted chip.
Tint the inbox background on every layout, not only two-pane.
Launcher bubble.
object
Show the launcher bubble.
Show the inbox close button on the inline page on a screen with a mouse.
Flat bubble colour, and Arial in the unread badge and the toast.
Launcher corner.
Text on the primary color.
Primary color.
Corner radius in pixels.
Surface color.
Text color.
Video calls.
object
Agora area code, e.g. EUROPE.
Agora video codec.
Ask before starting a call.
Every call takes the whole window, the chat button docks the call as a strip or a side rail beside the thread, and a minimise button shrinks it to a bubble.
Video calls enabled.
Calls end after this.
After calling an offline peer, note in the thread that they may not answer.
Per-minute charging.
Ring time before missed.
An incoming call opens the chat and rings while it is closed; off shows the toast and sound, and the ring when the chat opens.
Show buyers a locked call button with a tip when they cannot call a seller.
One card per call that reads Call ended when it is over, and a busy callee closes the caller’s call screen instead of showing an error.
Camera capture settings.
object
Capture frame rate.
Capture height in pixels.
Capture width in pixels.
Warn before calling an offline peer.
Messages.
object
Users may upload their own picture; it shows only after photo moderation approves it, and it wins over the host’s avatar.
The photo consent prompt puts Don’t allow before Allow; off puts Allow first.
Older messages load when the thread scrolls to its top; off shows a Load earlier button.
Senders may edit a text message this long after sending; 0 turns edits off.
Maximum photo upload size in bytes.
Photo messages enabled.
A message to someone who blocked the sender is refused (403 forbidden, reason undelivered) and not stored; off accepts it and drops it silently.
Day separators read day and month only; off adds the weekday, and the year for earlier years.
Maximum message length.
Senders may delete a message for everyone this long after sending; 0 turns it off. Deleting for oneself is always allowed.
Maximum video size in bytes; the browser converts to fit.
Maximum video length in seconds.
Video messages enabled.
Senders may mark a photo, video or voice note view once.
Voice notes enabled.
Maximum voice note size in bytes.
Maximum voice note length in seconds.
Selling services.
object
Catalog from the catalog callout or the dashboard.
An amount the buyer types, in the catalog currency.
object
Buyers may type an amount, such as a tip.
Largest amount in minor units.
Smallest amount in minor units.
Selling in conversations enabled.
How purchases are paid.
Where checkout and top-up pages open.
Show the balance the catalog callout returns.
A euro price on a purchase card reads 5 € or 5.50 €, never grouped.
Role when the token has none.
Anonymous guests.
object
Allow anonymous guests.
Merge a recent guest into the member who logs in on that browser.
Guests show as “
While the viewer’s own message is the last one, offer to tell them when the peer replies; tapping sends navigate reason notify for the host to collect an address. Same viewers as the nudge.
The notify prompt’s button reads Create account and opens guests.nudge.signup_url (navigate reason signup) instead of Notify me; with no signup_url it stays Notify me.
Keep the notify prompt once the conversation has a message, until the viewer taps or dismisses it, instead of only while their own message is the last one.
Role given to guests.
Languages and copy.
object
Text overrides per language and message key.
object
object
Language when nothing else decides.
Languages offered.
Limits per role.
object
Links to the client’s site.
object
The conversation header opens the profile of sellers only.
With services_page, buyers also get a Services menu item.
Buyers can open the seller’s services page from a conversation.
Moderation.
object
Call moderation.
object
Agora call moderation enabled.
Seconds between frames a peer captures.
Frames captured per participant per call.
Peers sample a participant whose Agora task did not start.
Moderate photos.
Action per category.
object
Action for Alcohol findings.
Action for Animals findings.
Action for Doxxing findings.
Action for Drugs findings.
Action for ExternalPayment findings.
Action for Fraud findings.
Action for Harassment findings.
Action for Hate findings.
Action for IllegalServices findings.
Action for Minors findings.
Action for NonConsent findings.
Action for Political findings.
Action for SelfHarm findings.
Action for Trafficking findings.
Action for Violence findings.
Action for Weapons findings.
Moderate text messages.
Moderate videos.
Transcribe and moderate voice notes.
Notifications.
object
Show a banner on new messages.
At most one banner per 5s; off replaces it on every message (the sound stays throttled).
Play a sound on new messages.
Clicking the launcher toast opens its conversation, or only the panel.
One row per ordered role pair; a missing pair allows nothing.
The policy for one ordered role pair: from acts on to.
object
May block the peer.
May buy from the peer.
May start calls.
Acting role.
May send messages.
May send ad hoc offer cards.
The receiver must accept photos per conversation.
May send photos.
Starting needs a vouch token or the session’s peer.
May see the peer’s presence.
May start a conversation.
Target role.
Online status.
object
Presence enabled.
Also push presence changes to each peer’s own channel. Turn off once every client subscribes with presence_pass.
Show the online dot and last seen in inbox rows.
Show “last seen” times.
The chat as an installable app.
object
The chat as an installable app: device sign-in, manifest and pushes; off keeps devices but refuses them.
Notifications show the message preview instead of “New message”.
Rate limits.
object
User requests per second per app.
User roles.
A user role. Roles are referenced by policy, limits, guests and the role claim.
object
Role key, the value of the role claim.
Display name per language.
object
Users with this role sell services.
Blocking and reporting.
object
The banned panel has its own Close button.
A report asks for a reason; off is a plain confirm.
Settings schema version.
Webhook event options.
object
Message.created carries the text.
Message kinds that make a first contact or an unread streak.
Send conversation.unread at each delay while the recipient still has unread messages; [] never.
After the last delay has fired, the next message opens a new streak, so a recipient who never reads is notified again.
Organising conversations.
object
Users may give peers a private name.
Sellers may set a reply sent for them, once a day per chat, while away.
Members may take messages from members only.
Users may keep a private note on a peer.
Users may pin up to 10 conversations.
Inbox views, archive, search, spent and purchases, and the sign-up invite.
Sellers keep up to 20 saved replies and send one with a tap.
Conversations with a seller carry her typical reply time.
Client tiers, lowest first; users get one by key.
A client tier a user can hold.
object
Badge color.
Tier key, the value of a user’s tier.
Display name per language.
object
Example
{ "default_role": "member", "policy": [ { "from": "member", "to": "model" }, { "from": "model", "to": "member" } ], "roles": [ { "key": "member", "label": { "en": "Member" } }, { "key": "model", "label": { "en": "Model" } } ], "version": 1}Problem
An RFC 9457 problem: the body of every error answer.
object
The stable error code to branch on, such as policy_denied.
What went wrong this time, when there is more to say.
For validation, one entry per invalid field.
One invalid field.
object
The path to the field.
What is wrong with it.
The path of the request.
For policy_denied and limit_reached, the rule or limit that refused the request; for forbidden, a short cause such as you_blocked; for banned, temporary when the ban expires.
The HTTP status code.
A short summary of the problem.
A URL that names the problem, https://app.mondochat.io/problems/<code>.
Example
{ "code": "policy_denied", "detail": null, "instance": "/v1/conversations/0199d6a0-2000-7000-8000-000000000001", "reason": "pins", "status": 403, "title": "Policy denied", "type": "https://app.mondochat.io/problems/policy_denied"}