Update Gateway Service
Endpoint: PUT /api/gateway/config/service
Updates a gateway service.
Path parameters
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| serviceId | The unique identifier for the service to update. Use Get All Gateway Services to get the service ID. | string | Required. |
Request body
Format the request body as a JSON object with the following parameters:
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| id | A unique identifier for the service. Use lowercase letters and hyphens. This value cannot be changed after the service is created. | string | Required. |
| name | A user-friendly name for the service. | string | Required. |
| path | The base path for all routes in the service. The path must start with a forward slash (for example, /api/v1/users). Including api in the path is optional. This cannot be renamed once saved. |
string | Required. |
| authConfigId | The ID of the authentication configuration to use for the service. You can retrieve this value using the Get Auth Config of Gateway Service endpoint. | string | Required. |
| corsConfig | The CORS configuration for the service. It can include the following parameters:
|
object | Required. |
| description | A description of the service. | string | Optional. |
| enabled | Determines whether the service is active. Set this value to true to enable the service or false to disable it. |
boolean | Required. |
| mcpEnabled | Determines whether MCP is enabled for the service. Set this value to true when exposing workflows as MCP tools. Set it to false when exposing workflows as API endpoints. |
boolean | Required. |
| routes | The routes configured within the service. | array of objects | Optional. |
| tags | Tags associated with the service. Specify each tag in the key:value format. |
array of strings | Optional. |
Response
Returns 200 OK, with a message indicating that the gateway service was updated successfully.
Examples
Update a gateway service
Request
curl -X 'PUT' \
'https://<YOUR-SERVER-URL>/api/gateway/config/services/test-service' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"authConfigId": "gateway",
"path": "/api/test-service",
"corsConfig": {
"accessControlAllowHeaders": [
"*"
],
"accessControlAllowMethods": [
"*"
],
"accessControlAllowOrigin": [
"*"
]
},
"description": "Sample service created using API",
"enabled": false,
"id": "test-service",
"mcpEnabled": false,
"name": "Sample service"
}
'
Response