> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Status

> Publishes a status (24h story) of text, image, video or audio on the profile

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no

## Description

Publishes a **status** (story) lasting **24 hours** on the instance's profile. Supports four types: `text` (plain text with background color and font), `image`, `video` and `audio`. Unlike the other endpoints, **there is no `number` field**, the status is published to `status@broadcast` and is visible to every contact who has permission (configured on the app). **Mentions are not supported** on this endpoint.

## Examples

### Text status with color and font

Publishes a purely textual status with a custom background color and font. No `mediaUrl` is needed.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/status/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "type":            "text",
      "message":         "May is here, and so are the new features!",
      "backgroundColor": "#FF6600",
      "font":            "serif"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/status/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      type:            "text",
      message:         "May is here, and so are the new features!",
      backgroundColor: "#FF6600",
      font:            "serif"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/status/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "type":            "text",
          "message":         "May is here, and so are the new features!",
          "backgroundColor": "#FF6600",
          "font":            "serif"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "type":            "text",
          "message":         "May is here, and so are the new features!",
          "backgroundColor": "#FF6600",
          "font":            "serif"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/status/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Image status

Publishes an image as a status. `mediaUrl` is required for non-text types. `message` is shown as the caption.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/status/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "type":     "image",
      "message":  "New version launch!",
      "mediaUrl": "https://cdn.example.com/launch-banner.jpg"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/status/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      type:     "image",
      message:  "New version launch!",
      mediaUrl: "https://cdn.example.com/launch-banner.jpg"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/status/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "type":     "image",
          "message":  "New version launch!",
          "mediaUrl": "https://cdn.example.com/launch-banner.jpg"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "type":     "image",
          "message":  "New version launch!",
          "mediaUrl": "https://cdn.example.com/launch-banner.jpg"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/status/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Video status

Publishes a short video as a status. WhatsApp caps video stories at **30 seconds**, anything longer gets trimmed.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/status/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "type":     "video",
      "message":  "Behind the scenes from this week's recording",
      "mediaUrl": "https://cdn.example.com/teaser.mp4",
      "mimeType": "video/mp4"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/status/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      type:     "video",
      message:  "Behind the scenes from this week's recording",
      mediaUrl: "https://cdn.example.com/teaser.mp4",
      mimeType: "video/mp4"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/status/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "type":     "video",
          "message":  "Behind the scenes from this week's recording",
          "mediaUrl": "https://cdn.example.com/teaser.mp4",
          "mimeType": "video/mp4"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "type":     "video",
          "message":  "Behind the scenes from this week's recording",
          "mediaUrl": "https://cdn.example.com/teaser.mp4",
          "mimeType": "video/mp4"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/status/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Audio status (voice message)

Publishes audio as a status. By default it's treated as **PTT (voice)**. Use `isVoice: false` to handle it as a regular audio file.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/message/status/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "type":     "audio",
      "message":  "Today's voice note",
      "mediaUrl": "https://cdn.example.com/voice-note.ogg",
      "mimeType": "audio/ogg; codecs=opus",
      "isVoice":  true
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/message/status/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      type:     "audio",
      message:  "Today's voice note",
      mediaUrl: "https://cdn.example.com/voice-note.ogg",
      mimeType: "audio/ogg; codecs=opus",
      isVoice:  true
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/message/status/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "type":     "audio",
          "message":  "Today's voice note",
          "mediaUrl": "https://cdn.example.com/voice-note.ogg",
          "mimeType": "audio/ogg; codecs=opus",
          "isVoice":  True
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "type":     "audio",
          "message":  "Today's voice note",
          "mediaUrl": "https://cdn.example.com/voice-note.ogg",
          "mimeType": "audio/ogg; codecs=opus",
          "isVoice":  true
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/status/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

The `messageType` echoes the `type` you sent (`text`, `image`, `video` or `audio`) and `chat.jid` is always `status@broadcast`. The returned `messageId` can be used to delete the publication before the 24-hour window via the delete-message endpoint.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Status sent successfully",
  "status":  "sent",
  "data": {
    "messageId":   "3EB08FCF27E532F1B0F5",
    "direction":   "sent",
    "messageType": "text",
    "content":     "May is here, and so are the new features!",
    "source":      "api",
    "timestamp":   "2026-04-30T14:30:00Z",
    "chat": {
      "jid":     "status@broadcast",
      "isGroup": false
    },
    "sender": {
      "jid":      "5511777777777@s.whatsapp.net",
      "instance": "my-instance"
    }
  }
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `$Instance_Name`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

<ParamField body="type" type="string" required>
  Status type. Accepted values: `text`, `image`, `video`, `audio`.
</ParamField>

<ParamField body="message" type="string" required>
  Textual content of the status. For `type=text`, this is the actual displayed text. For media (`image`, `video`, `audio`), it acts as the caption.
</ParamField>

<ParamField body="mediaUrl" type="string">
  Public URL of the media file. **Required** when `type` is `image`, `video` or `audio`. Ignored when `type=text`.
</ParamField>

<ParamField body="mimeType" type="string">
  MIME type of the media (e.g., `image/jpeg`, `video/mp4`, `audio/ogg; codecs=opus`). Optional, auto-detected when omitted.
</ParamField>

<ParamField body="fileName" type="string">
  File name. Optional, rarely relevant for stories.
</ParamField>

<ParamField body="backgroundColor" type="string">
  **For `type=text` only.** Status background color in hex (e.g., `#FF0000`, `#00AAFF`). When omitted, WhatsApp uses the theme's default color.
</ParamField>

<ParamField body="font" type="string">
  **For `type=text` only.** Text font. Common values: `system`, `serif`, `sans-serif`.
</ParamField>

<ParamField body="isVoice" type="boolean" default="true">
  **For `type=audio` only.** When `true` (default), the audio is published as **PTT (voice message)**. When `false`, it becomes a regular audio with the standard player.
</ParamField>

<ParamField body="duration" type="uint32">
  **For `type=audio` only.** Duration in seconds. Optional, auto-detected by the transcoding tool.
</ParamField>

<ParamField body="waveform" type="byte[]">
  **For `type=audio` only.** Custom waveform (byte array). Optional, auto-generated if omitted.
</ParamField>

<ParamField body="source" type="string" default="api">
  Origin identifier for traceability (e.g., `crm`, `marketing-bot`, `n8n`).
</ParamField>

## Notes

<Note>
  * **There is no `number` field**, stories always go to `status@broadcast` and become visible according to the privacy rules configured in the app (Settings → Privacy → Status).
  * **Mentions are not supported** on this endpoint, `mention` and `mentionAll` don't exist here (stories don't support mentions in the API).
  * Audio in non-Opus formats (mp3, m4a, wav) is **automatically converted** by the server through FFmpeg to `audio/ogg; codecs=opus` before publishing. The process can increase the request response time.
  * For `type=video`, WhatsApp caps stories at \~30 seconds. Longer videos may be trimmed or rejected by WhatsApp's server.
  * Statuses last **24 hours** and are deleted automatically. To delete sooner, use the delete-message endpoint with the returned `messageId`.
  * `backgroundColor` and `font` only take effect on `type=text`. On media statuses, they're silently ignored.
</Note>

## Errors

| HTTP | Internal status           | Message                                          |
| ---- | ------------------------- | ------------------------------------------------ |
| 400  | ,                         | `Instance name is required`                      |
| 400  | ,                         | `Invalid request body: <detail>`                 |
| 400  | ,                         | `Type must be one of: text, image, video, audio` |
| 400  | ,                         | `Message is required`                            |
| 400  | ,                         | `MediaURL is required for type: <type>`          |
| 400  | `media_download_failed`   | `Failed to download media from URL`              |
| 400  | `media_validation_failed` | (media file validation)                          |
| 400  | `unsupported_media_type`  | (unsupported media format)                       |
| 500  | `media_upload_failed`     | `Failed to upload media to WhatsApp`             |
| 500  | `audio_conversion_failed` | (failure converting audio to Opus)               |
| 404  | ,                         | `Instance not found`                             |
| 500  | `send_failed`             | `Failed to send status: <reason>`                |
| 503  | `disconnected`            | `Instance is not connected to WhatsApp`          |

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "MediaURL is required for type: image" }
}
```
