> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Add Channel Owner
> Assign the `owner` role to a channel member. See Room Roles for details about the roles.
Permission required: `set-owner`
### Changelog
| Version | Description |
| ------- | ------------------------- |
| 0.49.4 | Added |
## OpenAPI
````json POST /api/v1/channels.addOwner
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Rooms"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Channels"
},
{
"name": "Directory"
},
{
"name": "Groups"
},
{
"name": "Rooms"
},
{
"name": "Teams"
},
{
"name": "Room Invites"
},
{
"name": "Subscriptions"
},
{
"name": "ABAC"
}
],
"paths": {
"/api/v1/channels.addOwner": {
"post": {
"tags": [
"Channels"
],
"summary": "Add Channel Owner",
"description": "Assign the `owner` role to a channel member. See Room Roles for details about the roles.\n\nPermission required: `set-owner`\n### Changelog\n| Version | Description |\n| ------- | ------------------------- |\n| 0.49.4 | Added |",
"operationId": "post-api-v1-channels.addOwner",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"roomId": {
"type": "string",
"description": "The channel ID."
},
"userId": {
"type": "string",
"description": "The user ID that you want to set as the channel owner."
}
},
"required": [
"roomId",
"userId"
]
},
"examples": {
"Example": {
"value": {
"roomId": "WDuJLFkjwk6L7LdFC",
"userId": "b66oZ8i9pkeSko33v"
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"method": {
"type": "string"
}
}
}
}
},
"examples": {
"User is alrready an owner": {
"value": {
"success": false,
"error": "User is already an owner [error-user-already-owner]",
"errorType": "error-user-already-owner",
"details": {
"method": "addRoomOwner"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": true
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"status": "error",
"message": "You must be logged in to do this."
}
}
}
}
}
}
}
}
}
````