> ## 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 Custom OAuth > Add a custom OAuth integration to your workspace. Two-factor authentication is required. In Rocket.Chat 9.0.0, custom OAuth will be available only on paid plans (Commercial, Government, and Defense). On other plans, this endpoint will reject the request. See Our Plans for details. **Permission required**: - `add-oauth-service` ## OpenAPI ````json POST /api/v1/settings.addCustomOAuth { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Settings" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Settings" }, { "name": "Audit" }, { "name": "Cloud" }, { "name": "DNS" }, { "name": "E2E" }, { "name": "Import" }, { "name": "Bulk User Import" }, { "name": "Instances" }, { "name": "Federation" }, { "name": "Moderation" }, { "name": "Device Management" }, { "name": "Password policy" }, { "name": "Video Conference" }, { "name": "Media Calls" } ], "paths": { "/api/v1/settings.addCustomOAuth": { "parameters": [], "post": { "description": "Add a custom OAuth integration to your workspace. Two-factor authentication is required.\n\nIn Rocket.Chat 9.0.0, custom OAuth will be available only on paid plans (Commercial, Government, and Defense). On other plans, this endpoint will reject the request. See Our Plans for details.\n\n**Permission required**:\n- `add-oauth-service`", "summary": "Add Custom OAuth", "operationId": "post-api-v1-settings.addCustomOAuth", "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" } } }, "examples": { "Missing name param": { "value": { "success": false, "error": "The parameter \"name\" is required [error-name-param-not-provided]", "errorType": "error-name-param-not-provided" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "$ref": "#/components/responses/forbiddenError" } }, "tags": [ "Settings" ], "parameters": [ { "$ref": "#/components/parameters/X-User-Id" }, { "$ref": "#/components/parameters/X-Auth-Token" }, { "$ref": "#/components/parameters/x-2fa-code" }, { "$ref": "#/components/parameters/X-2fa-method" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the custom OAuth method that you want to add.", "example": "MyCustomOAuth" } }, "required": [ "name" ] } } } } } } }, "components": { "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." } } } } } }, "forbiddenError": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": false, "error": "User does not have the permissions required for this action [error-unauthorized]" } } } } } } }, "parameters": { "X-User-Id": { "name": "X-User-Id", "in": "header", "required": true, "schema": { "type": "string" }, "example": "CkCPNctrgCDfmWLqC", "description": "The user ID." }, "X-Auth-Token": { "name": "X-Auth-Token", "in": "header", "required": true, "schema": { "type": "string" }, "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE", "description": "The authentication token." }, "x-2fa-code": { "name": "x-2fa-code", "in": "header", "schema": { "type": "string" }, "description": "The 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details." }, "X-2fa-method": { "name": "x-2fa-method", "in": "header", "schema": { "type": "string" }, "description": "Enter the method with which you get the 2FA code. It can be `email`, `totp`, or `password`. This parameter is required if 2FA is enabled in your workspace." } } } } ````