# app.tempomusic.actor.putAnalyticsConsent

> Published by [lexicons.tempomusic.fan](https://lexicon.garden/identity/did:plc:pxsuqmultto34oks44m2lgxm)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.putAnalyticsConsent)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.putAnalyticsConsent/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.actor.putAnalyticsConsent/examples)

## Definitions

### `app.tempomusic.actor.putAnalyticsConsent`

**Type**: `procedure`

Store the requesting viewer's analytics consent preferences with last-write-wins semantics on the sibling updatedAtMicros clock (client wall-clock microseconds): the server keeps the document with the highest value and always returns the winning document with its clock, which the client must adopt as its new local state. The viewer DID is read from the service-auth JWT (`iss` claim).

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `preferences` | `ref` → `app.tempomusic.actor.defs#analyticsConsentPreferences` | Yes |  |
| `updatedAtMicros` | `integer` | Yes | Client wall-clock microseconds of this write. LWW tie-breaker; the server keeps the document with the highest value (the stored document wins ties). |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `preferences` | `ref` → `app.tempomusic.actor.defs#analyticsConsentPreferences` | Yes |  |
| `updatedAtMicros` | `integer` | Yes | Clock of the winning document after reconciliation. |

## Raw Schema

```json
{
  "id": "app.tempomusic.actor.putAnalyticsConsent",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "preferences",
            "updatedAtMicros"
          ],
          "properties": {
            "preferences": {
              "ref": "app.tempomusic.actor.defs#analyticsConsentPreferences",
              "type": "ref"
            },
            "updatedAtMicros": {
              "type": "integer",
              "description": "Client wall-clock microseconds of this write. LWW tie-breaker; the server keeps the document with the highest value (the stored document wins ties)."
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "preferences",
            "updatedAtMicros"
          ],
          "properties": {
            "preferences": {
              "ref": "app.tempomusic.actor.defs#analyticsConsentPreferences",
              "type": "ref"
            },
            "updatedAtMicros": {
              "type": "integer",
              "description": "Clock of the winning document after reconciliation."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Store the requesting viewer's analytics consent preferences with last-write-wins semantics on the sibling updatedAtMicros clock (client wall-clock microseconds): the server keeps the document with the highest value and always returns the winning document with its clock, which the client must adopt as its new local state. The viewer DID is read from the service-auth JWT (`iss` claim)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
