# Create a channel Creates a new channel instance connecting the organization to an external system. Request: channelInstance - The channel to create, including channelTypeId, name, optional description, and type-specific settings. authDetails - Authentication credentials for the external system (OAuth code, API key, basic auth, or service credentials). Response: channelInstance - The created ChannelInstance in DRAFT status with its assigned ID. Endpoint: POST /api/v1/channel/create-channel Version: 3.0 Security: bearerAuth ## Request fields (application/json): - `channelInstance` (object) - `channelInstance.channelTypeId` (string) Rule data fields - `channelInstance.name` (string) Rule data fields - `channelInstance.description` (string) Rule data fields - `channelInstance.settings` (any) - `authDetails` (object) - `authDetails.auth` (integer) Enum: 0, 1, 2, 3, 4 - `authDetails.oauthCode` (string) Rule data fields - `authDetails.apiKey` (string) Rule data fields - `authDetails.basicAuth` (object) - `authDetails.basicAuth.username` (string) Rule data fields - `authDetails.basicAuth.password` (string) Rule data fields - `authDetails.serviceCredentials` (any) - `sourceChannelId` (string) Rule data fields ## Response 200 fields (application/json): - `channelInstance` (object) - `channelInstance.id` (string) Rule data fields - `channelInstance.channelTypeId` (string) Rule data fields - `channelInstance.name` (string) Rule data fields - `channelInstance.description` (string) Rule data fields - `channelInstance.settings` (any) - `channelInstance.hasFailed` (boolean) - `channelInstance.status` (integer) Enum: 0, 1, 2, 3, 4 - `channelInstance.scanState` (string) Rule data fields - `channelInstance.weightage` (number) - `channelInstance.createdAt` (object) - `channelInstance.createdAt.seconds` (integer) - `channelInstance.createdAt.nanos` (integer) - `channelInstance.updatedAt` (object) - `channelInstance.deletedAt` (object) ## Response 400 fields (application/json): - `message` (string) ## Response 401 fields (application/json): - `message` (string) ## Response 403 fields (application/json): - `message` (string) ## Response 404 fields (application/json): - `message` (string) ## Response 409 fields (application/json): - `message` (string) ## Response 429 fields (application/json): - `message` (string) ## Response 499 fields (application/json): - `message` (string) ## Response 500 fields (application/json): - `message` (string) ## Response 501 fields (application/json): - `message` (string) ## Response 503 fields (application/json): - `message` (string) ## Response 504 fields (application/json): - `message` (string)