Change a channel's settings or target

updateChannel(projectReference: ID!, channelId: ID!, input: UpdateChannelInput!): Channel!

Requires project.channels.write.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject UUID or slug.
channelIdID!Yes
inputUpdateChannelInput!Yes

Input fields

input

UpdateChannelInput

FieldTypeRequiredDescription
nameStringNo
agentIdStringNoAgent checked again against the selected runtime target.
respondToChannelRespondToNo
allowedSlackChannelIds[String!]NoSlack channel IDs. Overlap with another channel in the same workspace is rejected with resource-already-exists. At most 250 IDs; empty means every Slack channel the bot is in. A preview_branch target needs at least one.
welcomeMessageStringNo
errorMessageStringNo
maxResponseTokensIntNo
runtimeTargetKindRuntimeTargetKindNoSelected target; the agent is checked against it again.
targetEnvironmentIdIDNo
targetBranchIdIDNo

Response

Returns Channel!. Open the type for its fields and nested types.

FieldTypeDescription
idID!
projectIdID!
platformChannelPlatform!
nameString
agentIdStringProject agent that answers in this channel.
enabledBoolean!Always true today; kept for forward compatibility.
statusChannelStatus!
installationIdID

All fields of Channel.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation UpdateChannel($projectReference: ID!, $channelId: ID!, $input: UpdateChannelInput!) {
  updateChannel(projectReference: $projectReference, channelId: $channelId, input: $input) {
    id
    projectId
    agentId
    name
    status
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "channelId": "00000000-0000-4000-8000-000000000001",
  "input": {}
}