---
title: "Create Channel"
full: true
_openapi:
  method: POST
  toc: []
  structuredData:
    headings: []
    contents:
      - content: "Creates a new channel for the organization"
_apiData:
  document: "https://reloop.sh/api/contacts/openapi/json"
  operationData: [{"path":"/api/contacts/v1/channels/create","method":"post"}]
  parameterList: [{"name":"name","type":"string","required":true,"description":"Channel name","location":"body","minLength":1,"maxLength":255},{"name":"description","type":"string","required":false,"description":"Channel description","location":"body","maxLength":1000},{"name":"defaultSubscription","type":"\"opt_in\" | \"opt_out\"","required":false,"description":"","location":"body","enumValues":["opt_in","opt_out"]},{"name":"visibility","type":"\"private\" | \"public\"","required":false,"description":"","location":"body","enumValues":["private","public"]}]
  responseMap: {"201":{"description":"Response for status 201","schema":{"object":"channel","id":"con_123456789","name":"Newsletter","description":"example_description","defaultSubscription":"opt_in","visibility":"private","createdAt":"2026-03-23T10:00:00.000Z","updatedAt":"2026-03-23T10:00:00.000Z","event":"evt_123456789"}},"403":{"description":"Response for status 403","schema":{"message":"Unauthorized access","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead."}},"409":{"description":"Response for status 409","schema":{"message":"Channel already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead."}}}
  codeSamples:
    - id: node
      lang: javascript
      label: Node.js
      source: |-
        import { Reloop } from "reloop-email";
        
        const reloop = new Reloop({ apiKey: "rl_123456789" });
        
        const { channel, channelError } = await reloop.contacts.channels.create({
          name: "Product Updates",
          description: "Get the latest news about our products",
          defaultSubscription: "opt_in",
          visibility: "public",
        });
        
        if (channelError) throw channelError;
        
        console.log(channel.id, channel.name);
    - id: curl
      lang: bash
      label: cURL
      source: |-
        curl -X POST https://reloop.sh/api/contacts/v1/channels/create \
          -H "x-api-key: rl_123456789" \
          -H "Content-Type: application/json" \
          -d '{"name": "Product Updates","description": "Get the latest news about our products","defaultSubscription": "opt_in","visibility": "public"}'
    - id: python
      lang: python
      label: Python
      source: |-
        from reloop_email import Reloop
        
        reloop = Reloop(api_key="rl_123456789")
        
        result = reloop.contacts.channels.create({
          "name": "Product Updates",
          "description": "Get the latest news about our products",
          "defaultSubscription": "opt_in",
          "visibility": "public",
        })
        
        if result.channel_error:
            raise result.channel_error
        
        print(result.channel["id"], result.channel["name"])
    - id: php
      lang: php
      label: PHP
      source: |-
        <?php
        
        require 'vendor/autoload.php';
        
        use Reloop\Reloop;
        
        $reloop = Reloop::client('rl_123456789');
        
        $channel = $reloop->contacts->channels->create([
            'name' => 'Product Updates',
            'description' => 'Get the latest news about our products',
            'defaultSubscription' => 'opt_in',
            'visibility' => 'public',
        ]);
        echo $channel['id'] . ' ' . $channel['name'] . PHP_EOL;
    - id: java
      lang: java
      label: Java
      source: |-
        import sh.reloop.ReloopClient;
        ReloopClient reloop = new ReloopClient("rl_123456789");
        
        CreateChannelParams params = new CreateChannelParams();
        params.name = "Product Updates";
        params.description = "Get the latest news about our products";
        params.defaultSubscription = "opt_in";
        params.visibility = "public";
        var channel = reloop.contacts.channels.create(params);
        System.out.println(channel.id + " " + channel.name);
    - id: dotnet
      lang: csharp
      label: .NET
      source: |-
        using Reloop;
        using Reloop.Models;
        
        var reloop = new ReloopClient("rl_123456789");
        
        await reloop.Contacts.Channels.CreateAsync(new Dictionary<string, object?>
        {
            ["name"] = "Product Updates",
            ["description"] = "Get the latest news about our products",
            ["defaultSubscription"] = "opt_in",
            ["visibility"] = "public",
        });
    - id: go
      lang: go
      label: Go
      source: |-
        import reloop "github.com/reloop-labs/reloop-go"
        
        client, _ := reloop.NewClient(reloop.ClientOptions{
            APIKey: "rl_123456789",
        })
        
        channel, _ := client.Contacts.Channels.Create(map[string]interface{}{
            "name": "Product Updates",
            "description": "Get the latest news about our products",
            "defaultSubscription": "opt_in",
            "visibility": "public",
        })
    - id: rust
      lang: rust
      label: Rust
      source: |-
        use reloop::ReloopClient;
        #[tokio::main]
        async fn main() -> Result<(), Box<dyn std::error::Error>> {
            let reloop = ReloopClient::new("rl_123456789".to_string(), None);
        
            reloop.contacts().channels().create(CreateChannelParams {
                name: "Product Updates".to_string(),
                description: Some("Get the latest news about our products".to_string()),
                default_subscription: Some("opt_in".to_string()),
                visibility: Some(ChannelVisibility::Public),
                ..Default::default()
            }).await?;
        
            Ok(())
        }
    - id: ruby
      lang: ruby
      label: Ruby
      source: |-
        require "reloop"
        
        reloop = Reloop::Client.new(api_key: "rl_123456789")
        
        channel = reloop.contacts.channels.create(
          name: "Product Updates",
          description: "Get the latest news about our products",
          default_subscription: "opt_in",
          visibility: "public",
        )
    - id: elixir
      lang: elixir
      label: Elixir
      source: |-
        client = Reloop.client("rl_123456789")
        
        {:ok, channel} = Reloop.Services.ContactChannels.create(client, %{
          name: "Product Updates",
          description: "Get the latest news about our products",
          default_subscription: "opt_in",
          visibility: "public"
        })
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


{/* This file was generated by the OpenAPI doc generator. Do not edit this file directly. Run `bun run generate:api-docs` to regenerate. */}

<APIPage />
