# Rotate the webhook token; the new URL is returned once

POST /api/agent/services/{id}/rotate. Required scopes: services:write.

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

Required scopes: `services:write`

```http
POST /api/agent/services/{id}/rotate
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Rotate the webhook token; the new URL is returned once",
  "operationId": "postServicesIdRotate",
  "security": [
    {
      "bearer": [
        "services:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "services:write"
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "schema": {
        "type": "string"
      },
      "required": true
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceCreated"
          }
        }
      }
    },
    "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).
