# at.upvote.toggleSignal

> Published by [upvote.at](https://lexicon.garden/identity/did:plc:b2bmihikxhdt6s2luzguhexb)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:b2bmihikxhdt6s2luzguhexb/at.upvote.toggleSignal)
- [Documentation](https://lexicon.garden/lexicon/did:plc:b2bmihikxhdt6s2luzguhexb/at.upvote.toggleSignal/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:b2bmihikxhdt6s2luzguhexb/at.upvote.toggleSignal/examples)

## Definitions

### `at.upvote.toggleSignal`

**Type**: `procedure`

Toggle an upvote signal on a standard.site document

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `standardSiteDocument` | `string` (at-uri) | Yes | The subject standard.site document of an upvote.at signal |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the created signal record |
| `uri` | `string` (at-uri) | Yes | AT URI of the created signal record |
| `action` | `string` | Yes | Whether the upvote was added or removed |

## Raw Schema

```json
{
  "id": "at.upvote.toggleSignal",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "standardSiteDocument"
          ],
          "properties": {
            "standardSiteDocument": {
              "type": "string",
              "format": "at-uri",
              "description": "The subject standard.site document of an upvote.at signal"
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid",
            "action"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "CID of the created signal record"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT URI of the created signal record"
            },
            "action": {
              "enum": [
                "added",
                "removed"
              ],
              "type": "string",
              "description": "Whether the upvote was added or removed"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Toggle an upvote signal on a standard.site document"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
