Skip to main content
POST
/
public
/
v1
/
chat
/
channel
/
{channelId}
/
send-message
Node.js SDK
import { CoperaAI } from '@copera.ai/sdk';

const copera = CoperaAI({
  apiKey: 'your-api-key-here'
});

await copera.channel.sendMessage({
  channelId: 'channel_id_here',
  message: 'Hello from Copera.ai SDK!',
  name: 'Bot Name' // optional
});
{
  "error": "<string>",
  "code": "<string>"
}

Prerequisites

Before sending messages, ensure you have:
  • A valid API key with chat permissions
  • The channel ID where you want to send the message

Usage Notes

  • Messages must be between 1 and 10,000 characters
  • The name field is optional and will display as the sender name
  • Returns 204 No Content on success

Authorizations

Authorization
string
header
required

Bearer token

Path Parameters

channelId
string
required
Required string length: 24

Body

application/json
message
string
required
Required string length: 1 - 10000
name
string

Response

Default Response