---
title: "Send a direct message to a Slack user."
method: POST
path: "/messageUser"
tags: ["message", "user"]
---

# Send a direct message to a Slack user.

`POST /messageUser`

Sends a direct message to a specified Slack user. Returns details about the sent message, including its timestamp and the channel where it was posted.

## Request body

- object
  - `body` object — Body of the messageUser sls call
    - `arguments` object, required
      - `userId` string, required — The ID of the user to send the message to. User IDs start with 'U'.
      - `text` string, required — The text of the message to be sent.
      - `username` string — Optional custom username for the message.
      - `icon_url` string — Optional URL to an image to use as the icon for the message.

## Response `200`

Successful response

- object
  - `ok` boolean, required — true if the request was successful.
  - `channel` string, required — The ID of the channel where the message was posted.
  - `ts` string, required — The timestamp of the message.
  - `message` object, required — An object containing the details of the sent message.
    - `type` string — The type of message.
    - `subtype` string — The subtype of the message.
    - `text` string — The text of the message.
    - `ts` string — The timestamp of the message.
    - `bot_id` string — The ID of the bot that sent the message.
    - `username` string — The username of the bot that sent the message.
    - `attachments` unknown[] — An array of attachments.
      - unknown

## Other responses

- `400` — Bad Request - The request was invalid or cannot be served.
- `500` — Internal Server Error - The server has encountered a situation it doesn't know how to handle.

---

[API](https://skmtc.net/microfox-ai/apis/slack-d.md) · [All operations](https://skmtc.net/microfox-ai/apis/slack-d/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/slack-d/versions/cd0edf0c2cdf/schema)
