# Create a messenger

```http
POST https://trydimmi.com/api/v1/widget-settings
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:write`.

## Body

- `allow_anonymous` (boolean): Whether visitors may write in the messenger before they sign in to your product. true lets anonymous visitors start a session, false refuses them. New messengers start with true. Example: true.
- `allowed_origins` (string[] | null): Sites that may load the messenger, as a list, such as ["https://app.company.com"]; *.company.com covers one label. An empty list allows any site.
- `appearance` (object): The messenger's look, as a JSON object. Keys merge one by one and null resets a key; for example theme light, dark or auto, position right or left. Such as {"theme": "dark", "position": "left"}.
- `attachments_enabled` (boolean): Whether visitors may upload files in the messenger. true allows attachments, false refuses uploads. New messengers start with true. Example: false.
- `changelog_tab_enabled` (boolean): Whether the messenger shows a changelog tab. The tab only appears when the messenger also has a help center set (help_center_id). Example: true.
- `collect_email` (string): When the messenger asks a visitor for an email: never, offline or always. Such as "offline".
- `enabled` (boolean): true turns the messenger on; false hides it on every site.
- `help_center_id` (string): Id of the help center the messenger's help tab shows, starting with hc_, such as hc_01jx2m8k4t. Find it with GET /help-centers.
- `help_tab_enabled` (boolean): Whether the messenger shows a help tab with articles. The tab only appears when the messenger also has a help center set (help_center_id). Example: true.
- `home_links` (object[] | null): Replaces the messenger's home screen links, as a list: each a title, an https or mailto url and an icon (link, calendar, book, mail, phone, chat, video or help). Such as [{"title": "Book a demo", "url": "https://example.com/demo", "icon": "calendar"}].
  - `icon` (string): The icon shown beside the link: link, calendar, book, mail, phone, chat, video or help. Left out, it is link. Such as "calendar".
  - `title` (string, required): The words the link shows on the messenger's home screen, 1 to 40 characters, such as Book a demo.
  - `url` (string, required): Where the link goes: an https:// address or a mailto: address, at most 2048 characters, such as https://example.com/demo or mailto:help@example.com.
- `inbox_id` (string): Id of the inbox the messenger's conversations land in, starting with inbox_, such as inbox_01jx2m8k4t. Find it with GET /inboxes.
- `intercom_shim` (boolean): Whether the messenger's loader keeps an old Intercom snippet's calls working while a customer moves over to dimmi. Off by default. Example: true.
- `locale` (string): The messenger's language, as a language code, such as en or pt-BR. In a preview it is the language the texts are shown in.
- `max_attachment_mb` (integer): Largest file customers may attach, in megabytes, a whole number from 1 to 25, such as 10.
- `name` (string): The name of the widget settings.
- `native_apps_enabled` (boolean): Whether requests without an Origin header, which is what native mobile apps send, are accepted even when the messenger has a list of allowed sites. Off by default. Example: true.
- `reply_time` (string): The reply time customers are told: auto, minutes, hours or day. Such as "hours".
- `require_email_when_offline` (boolean): Whether a visitor with no email must give one before sending a message while the team is away. Off by default. Example: true.
- `show_availability` (boolean): Whether the messenger shows visitors the team's availability. Part of the config the messenger loads; new messengers start with true. Example: false.
- `show_branding` (boolean): Whether the messenger shows the 'Powered by' badge: true shows it, false hides it. On dimmi cloud, hiding is refused until the workspace has paid an invoice. Example: true.
- `show_team_avatars` (boolean): Whether the messenger shows visitors the team's avatars. Part of the config the messenger loads; new messengers start with true. Example: false.
- `texts` (object): Object of the messenger's own words: text key to plain text. Only known keys such as greeting, welcome_message, offline_message, composer_placeholder, launcher_label; each has a length limit. null or "" brings back the built-in words. Such as {"greeting":"Hi there","launcher_label":"Chat"}.
- `texts_by_locale` (object): Object of the messenger's words per language: language tag to an object with the same keys as texts. null for a language removes all its words; up to 40 languages. Such as {"fr":{"greeting":"Bonjour"},"de":null}.

## Response 201 (Created)

- `data` (object, required)
  - `allow_anonymous` (boolean, required): True when visitors who are not identified may use the messenger.
  - `allowed_origins` (string[] | null, required): The sites allowed to load the messenger. Empty when no list is set.
  - `appearance` (object, required)
    - `background` (object, required)
      - `fade` (boolean, required): Whether the background softens into the page below it.
      - `gradient` (object)
        - `angle` (integer, required): The gradient's direction in degrees, from 0 to 359, such as 135.
        - `from` (string, required): The color the gradient starts with, as a hex code such as #10b981.
        - `to` (string, required): The color the gradient ends with, as a hex code such as #3b82f6.
      - `image_asset_id` (string): Id of the uploaded image used as the background. Left out unless type is image.
      - `type` (string, required): What fills the messenger's home hero and header: solid, gradient or image.
    - `button_color` (string | null, required): Color of the messenger's buttons as #RRGGBB, such as #1f2328. Null when not set.
    - `font` (string, required): The messenger's font: system, or inherit to use the font of the page it sits on.
    - `header_color` (string | null, required): Color of the messenger's header as #RRGGBB. Null when not set.
    - `launcher` (object, required)
      - `icon` (string, required): The picture on the messenger's launcher button: chat, help or wave.
      - `image_asset_id` (string): Id of an uploaded image shown on the launcher instead of the icon. Left out when none is set.
      - `label` (string, required): The text on the launcher, at most 24 characters. Empty when it shows none.
      - `shape` (string, required): The launcher button's shape: circle or squircle.
      - `style` (string, required): How the launcher shows on the page: bubble, tab or hidden.
    - `logo_asset_id` (string | null, required): Id of the uploaded image shown as the messenger's logo. Null when there is no logo.
    - `padding_x` (integer, required): How far the launcher sits from the page's edge sideways, in pixels, from 0 to 200. Defaults to 20.
    - `padding_y` (integer, required): How far the launcher sits from the page's edge up and down, in pixels, from 0 to 200. Defaults to 20.
    - `position` (string, required): Which side of the page the launcher sits on: right or left.
    - `primary_color` (string, required): The messenger's main color as #RRGGBB. Defaults to #1f2328.
    - `reply_sound` (string, required): Whether a message coming in makes the messenger's incoming sound: none turns it off; pop, chime, bubble, swoosh and tick all turn it on. Defaults to pop.
    - `sent_sound` (string, required): Whether a message the customer sends makes the messenger's outgoing sound: none turns it off; pop, chime, bubble, swoosh and tick all turn it on. Defaults to pop.
    - `sound` (boolean, required): Whether the messenger plays a sound. On by default.
    - `theme` (string, required): The messenger's color scheme: light, dark or auto.
  - `attachments_enabled` (boolean, required): True when customers can send files in the messenger.
  - `audiences` (any, required): Audience rules for who sees the launcher, who may start a conversation and who sees each tab. An empty object means everyone.
  - `branding` (object, required)
    - `locked` (boolean, required): True when the workspace may not hide the dimmi badge: on the cloud edition until it has paid.
    - `show` (boolean, required): Whether the dimmi badge shows on the messenger.
    - `url` (string, required): Where the badge links, such as https://trydimmi.com/?ref=<workspace>.
  - `changelog_tab_enabled` (boolean, required): True when the messenger's What's new tab is turned on; it shows only when a help center is linked.
  - `channel_connection_id` (string, required): Id of the channel connection the messenger feeds its inbox through, such as chn_....
  - `collect_email` (string, required): When the messenger asks a visitor for their email: never, offline or always.
  - `config_version` (integer, required): A number that goes up each time the messenger's settings change.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `enabled` (boolean, required): True when the messenger is turned on.
  - `help_center_id` (string | null, required): Id of the help center linked to the messenger, such as hc_.... Null when none is linked.
  - `help_tab_enabled` (boolean, required): True when the messenger's help tab is turned on; it shows only when a help center is linked.
  - `home_links` (object[] | null, required): The customer's own links listed on the messenger's home screen, such as booking a call.
    - `icon` (string, required): The icon shown beside the link: link, calendar, book, mail, phone, chat, video or help.
    - `title` (string, required): The link's text on the messenger's home screen.
    - `url` (string, required): The address the link opens.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `inbox` (object, required)
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `name` (string, required): Display name of the inbox, team or member this short form stands for.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `intercom_shim` (boolean, required): True when the loader keeps an old Intercom snippet's calls working while a customer moves over.
  - `last_boot_at` (string | null, required): When the messenger was last loaded on a site. Null when it never has been.
  - `last_boot_origin` (string | null, required): The site the messenger was last loaded on. Null when it never has been.
  - `links` (object, required)
    - `config` (string, required): Address of the public configuration a browser loads for this messenger.
    - `install` (string, required): API address that returns this messenger's install instructions.
    - `self` (string, required): API address of this messenger's settings.
  - `locale` (string, required): The messenger's language setting: a language code such as en, or auto.
  - `max_attachment_mb` (integer, required): The largest file a customer can send, in megabytes, 1 to 25.
  - `name` (string, required): The messenger's name in dimmi.
  - `native_apps_enabled` (boolean, required): True when requests without an Origin header, which native apps send, are accepted despite the list of allowed sites.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `reply_time` (string, required): The reply time the messenger promises: auto (follows team availability), minutes, hours or day.
  - `require_email_when_offline` (boolean, required): True when a visitor must give an email to write while the team is away.
  - `show_availability` (boolean, required): True when the messenger shows whether the team is available.
  - `show_branding` (boolean | null, required): Whether the messenger shows dimmi's branding: true, false, or null when the messenger sets nothing of its own.
  - `show_team_avatars` (boolean, required): True when the messenger shows teammates' pictures.
  - `texts` (object, required): The messenger's own wording shared by every language, keyed by text name, with defaults filled in.
  - `texts_by_locale` (object, required): Wording written for specific languages, keyed by language tag then text name, such as {"fr": {"greeting": "Bonjour"}}.
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/widget-settings' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "allow_anonymous": true,
  "allowed_origins": [
    "<string>"
  ],
  "appearance": {
    "<key>": null
  },
  "attachments_enabled": true,
  "changelog_tab_enabled": true,
  "collect_email": "<string>",
  "enabled": true,
  "help_center_id": "<string>",
  "help_tab_enabled": true,
  "home_links": [
    {
      "icon": "<string>",
      "title": "<string>",
      "url": "<string>"
    }
  ],
  "inbox_id": "<string>",
  "intercom_shim": true,
  "locale": "<string>",
  "max_attachment_mb": 123,
  "name": "<string>",
  "native_apps_enabled": true,
  "reply_time": "<string>",
  "require_email_when_offline": true,
  "show_availability": true,
  "show_branding": true,
  "show_team_avatars": true,
  "texts": {
    "<key>": null
  },
  "texts_by_locale": {
    "<key>": null
  }
}'
```

## Example response

```json
{
  "data": {
    "allow_anonymous": true,
    "allowed_origins": [
      "<string>"
    ],
    "appearance": {
      "background": {
        "fade": true,
        "gradient": {
          "angle": 123,
          "from": "<string>",
          "to": "<string>"
        },
        "image_asset_id": "<string>",
        "type": "<string>"
      },
      "button_color": "<string>",
      "font": "<string>",
      "header_color": "<string>",
      "launcher": {
        "icon": "<string>",
        "image_asset_id": "<string>",
        "label": "<string>",
        "shape": "<string>",
        "style": "<string>"
      },
      "logo_asset_id": "<string>",
      "padding_x": 123,
      "padding_y": 123,
      "position": "<string>",
      "primary_color": "<string>",
      "reply_sound": "<string>",
      "sent_sound": "<string>",
      "sound": true,
      "theme": "<string>"
    },
    "attachments_enabled": true,
    "audiences": null,
    "branding": {
      "locked": true,
      "show": true,
      "url": "<string>"
    },
    "changelog_tab_enabled": true,
    "channel_connection_id": "<string>",
    "collect_email": "<string>",
    "config_version": 123,
    "created_at": "2026-11-01T09:30:00Z",
    "enabled": true,
    "help_center_id": "<string>",
    "help_tab_enabled": true,
    "home_links": [
      {
        "icon": "<string>",
        "title": "<string>",
        "url": "<string>"
      }
    ],
    "id": "<string>",
    "inbox": {
      "id": "<string>",
      "name": "<string>",
      "object": "<string>"
    },
    "intercom_shim": true,
    "last_boot_at": "2026-11-01T09:30:00Z",
    "last_boot_origin": "<string>",
    "links": {
      "config": "<string>",
      "install": "<string>",
      "self": "<string>"
    },
    "locale": "<string>",
    "max_attachment_mb": 123,
    "name": "<string>",
    "native_apps_enabled": true,
    "object": "<string>",
    "reply_time": "<string>",
    "require_email_when_offline": true,
    "show_availability": true,
    "show_branding": true,
    "show_team_avatars": true,
    "texts": {
      "<key>": null
    },
    "texts_by_locale": {
      "<key>": {
        "<key>": "<string>"
      }
    },
    "updated_at": "2026-11-01T09:30:00Z"
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
