# Update a connector's name, routes, or on-call group

PATCH /api/agent/connectors/{id}. Required scopes: connectors:write.

HTML: https://notify.belweave.ai/docs/api/patchConnectorsId

Required scopes: `connectors:write`

```http
PATCH /api/agent/connectors/{id}
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Update a connector's name, routes, or on-call group",
  "operationId": "patchConnectorsId",
  "security": [
    {
      "bearer": [
        "connectors:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "connectors:write"
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "schema": {
        "type": "string"
      },
      "required": true
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "tunnelId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+$"
            },
            "hostname": {
              "type": "string",
              "minLength": 1,
              "maxLength": 253
            },
            "routes": {
              "maxItems": 32,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^(@|[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
                  },
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9._[\\]:-]+:\\d{1,5}$"
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "appId": {
                    "type": "string",
                    "pattern": "^app_[A-Za-z0-9_-]{8,64}$"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "target",
                  "url"
                ]
              }
            },
            "oncallGroupId": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^ocg_[A-Za-z0-9_-]{8,64}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "type": "string",
              "enum": [
                "online",
                "offline",
                "unknown"
              ]
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "connector": {
                "$ref": "#/components/schemas/Connector"
              }
            },
            "required": [
              "connector"
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
