> ## 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.

# Create channel

> Create a new channel (newsletter) linked to the connected account

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no (each call creates a new channel)

## Description

Creates a new channel. The creating account automatically becomes admin / owner. The service automatically accepts the terms of use (TOS) when WhatsApp requires them, performing a transparent retry after `AcceptTOSNotice`.

## Examples

### Minimum

Creates a channel with only the required `name`. The channel is born without a description or picture, but already gets a permanent `jid` and an `inviteLink` in the response.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/newsletter/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Important News"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/newsletter/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name: "Important News"
    })
  });
  ```

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

  requests.post(
      f"https://ryzeapi.cloud/api/newsletter/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name": "Important News"
      }
  )
  ```

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

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

  func main() {
      body := strings.NewReader(`{
          "name": "Important News"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/newsletter/create/"+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>

### Complete

Creates the channel with `description` and `picture` (public URL). The server downloads the image, converts it to JPEG 640x640, and sets it as the channel's initial picture.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/newsletter/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Important News",
      "description": "Daily updates",
      "picture": "https://example.com/logo.png"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/newsletter/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:        "Important News",
      description: "Daily updates",
      picture:     "https://example.com/logo.png"
    })
  });
  ```

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

  requests.post(
      f"https://ryzeapi.cloud/api/newsletter/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":        "Important News",
          "description": "Daily updates",
          "picture":     "https://example.com/logo.png"
      }
  )
  ```

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

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

  func main() {
      body := strings.NewReader(`{
          "name":        "Important News",
          "description": "Daily updates",
          "picture":     "https://example.com/logo.png"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/newsletter/create/"+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>

### With base64 picture

Same flow, but the picture goes inline as a `data:` URL with base64 instead of an external URL. Useful when the image is generated locally or sits behind authentication.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/newsletter/create/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Test Channel",
      "picture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/newsletter/create/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name:    "Test Channel",
      picture: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
    })
  });
  ```

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

  requests.post(
      f"https://ryzeapi.cloud/api/newsletter/create/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "name":    "Test Channel",
          "picture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
      }
  )
  ```

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

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

  func main() {
      body := strings.NewReader(`{
          "name":    "Test Channel",
          "picture": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/newsletter/create/"+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 response includes the permanent `channel.jid` of the freshly created channel (use it as the `identifier` in subsequent calls), the `inviteLink` ready to share, and the current `state`. `subscriberCount` starts at `0`, and `pictureUrl` comes as `null` when the picture has not yet been processed or was not provided.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Newsletter created successfully",
  "channel": {
    "jid": "120363422585881117@newsletter",
    "state": "active",
    "name": "Important News",
    "description": "Daily updates",
    "inviteLink": "https://whatsapp.com/channel/120363422585881117",
    "subscriberCount": 0,
    "pictureUrl": null
  }
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  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="name" type="string" required>
  Channel name. Cannot be empty.
</ParamField>

<ParamField body="description" type="string">
  Channel description / bio.
</ParamField>

<ParamField body="picture" type="string">
  URL or base64. Converted to JPEG (max 640x640). A failure only logs a warning, the channel is created without a picture.
</ParamField>

## Notes

<Note>
  * In some countries, creating a channel requires a **verified WhatsApp Business account**. If the server rejects, the WhatsMeow error is propagated.
  * Save the returned `channel.jid`, invite links can be revoked, but the JID is permanent.
  * Creation **is not idempotent**: an automatic retry on a network timeout can duplicate the channel.
  * The picture is resized to 640x640 keeping aspect ratio (accepted formats: JPEG, PNG, WebP, GIF).
</Note>

## Errors

| HTTP | Message                                                                                 |
| ---- | --------------------------------------------------------------------------------------- |
| 400  | `The 'name' field is required`                                                          |
| 400  | `Instance is not connected to WhatsApp`                                                 |
| 500  | `failed to create newsletter: <reason>`                                                 |
| 501  | `WhatsApp client does not support newsletter creation (CreateNewsletter not available)` |
| 501  | `failed to create newsletter (terms may need acceptance)`                               |

Envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "The 'name' field is required" }
}
```

## Next

<CardGroup cols={2}>
  <Card title="Channel info" icon="circle-info" href="/en/api/newsletter/info">
    Confirm data after creation.
  </Card>

  <Card title="List channels" icon="list" href="/en/api/newsletter/list">
    See subscribed channels.
  </Card>
</CardGroup>
