# tools.ozone.safelink.updateRule

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.updateRule)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.updateRule/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.updateRule/examples)

## Definitions

### `tools.ozone.safelink.updateRule`

**Type**: `procedure`

Update an existing URL safety rule

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` | Yes | The URL or domain to update the rule for |
| `action` | `ref` → `tools.ozone.safelink.defs#actionType` | Yes |  |
| `reason` | `ref` → `tools.ozone.safelink.defs#reasonType` | Yes |  |
| `comment` | `string` | No | Optional comment about the update |
| `pattern` | `ref` → `tools.ozone.safelink.defs#patternType` | Yes |  |
| `createdBy` | `string` (did) | No | Optional DID to credit as the creator. Only respected for admin_token authentication. |

#### Output

**Encoding**: `application/json`

#### Errors

- **RuleNotFound**: No active rule found for this URL/domain

## Raw Schema

```json
{
  "id": "tools.ozone.safelink.updateRule",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "url",
            "pattern",
            "action",
            "reason"
          ],
          "properties": {
            "url": {
              "type": "string",
              "description": "The URL or domain to update the rule for"
            },
            "action": {
              "ref": "tools.ozone.safelink.defs#actionType",
              "type": "ref"
            },
            "reason": {
              "ref": "tools.ozone.safelink.defs#reasonType",
              "type": "ref"
            },
            "comment": {
              "type": "string",
              "description": "Optional comment about the update"
            },
            "pattern": {
              "ref": "tools.ozone.safelink.defs#patternType",
              "type": "ref"
            },
            "createdBy": {
              "type": "string",
              "format": "did",
              "description": "Optional DID to credit as the creator. Only respected for admin_token authentication."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "RuleNotFound",
          "description": "No active rule found for this URL/domain"
        }
      ],
      "output": {
        "schema": {
          "ref": "tools.ozone.safelink.defs#event",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "description": "Update an existing URL safety rule"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
