# dev.blinkers.putView

> Write a blink back through a lens, or create a record from one.

- Kind: procedure
- Authority: blinkers.dev
- Lexicon: 1
- Published by [blinkers.dev](https://lexicon.garden/identity/did:web:blinkers.dev), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:blinkers.dev/dev.blinkers.putView)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:blinkers.dev/dev.blinkers.putView/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:blinkers.dev/dev.blinkers.putView/analytics)

## Procedure (`dev.blinkers.putView`)

Type: procedure · POST

### Input (application/json)

- `lens` (string · at-uri, required)
- `rkey` (string · record-key)
- `swapRecord` (string · cid): null means: only if the record doesn't exist yet.
  - Constraints: nullable
- `swapValue` (unknown)
- `value` (unknown, required)

### Output (application/json)

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)
- `value` (unknown, required)

### Errors

- `AuthenticationRequired`: No description in schema.
- `InvalidRequest`: No description in schema.
- `InvalidBlink`: No description in schema.
- `NotAllowed`: No description in schema.
- `InvalidSwap`: No description in schema.
- `RecordExists`: No description in schema.
- `WriteConflict`: No description in schema.
- `InvalidRecord`: No description in schema.
- `LensNotFound`: No description in schema.
- `RecordNotFound`: No description in schema.
- `RecordNotCovered`: No description in schema.
- `InvalidLens`: No description in schema.
- `UpstreamFailure`: No description in schema.
- `LexiconUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Write a blink back through a lens, or create a record from one.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "InvalidRequest"
        },
        {
          "name": "InvalidBlink"
        },
        {
          "name": "NotAllowed"
        },
        {
          "name": "InvalidSwap"
        },
        {
          "name": "RecordExists"
        },
        {
          "name": "WriteConflict"
        },
        {
          "name": "InvalidRecord"
        },
        {
          "name": "LensNotFound"
        },
        {
          "name": "RecordNotFound"
        },
        {
          "name": "RecordNotCovered"
        },
        {
          "name": "InvalidLens"
        },
        {
          "name": "UpstreamFailure"
        },
        {
          "name": "LexiconUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "nullable": [
            "swapRecord"
          ],
          "properties": {
            "lens": {
              "format": "at-uri",
              "type": "string"
            },
            "rkey": {
              "format": "record-key",
              "type": "string"
            },
            "swapRecord": {
              "description": "null means: only if the record doesn't exist yet.",
              "format": "cid",
              "type": "string"
            },
            "swapValue": {
              "type": "unknown"
            },
            "value": {
              "type": "unknown"
            }
          },
          "required": [
            "lens",
            "value"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            },
            "value": {
              "type": "unknown"
            }
          },
          "required": [
            "uri",
            "cid",
            "value"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "dev.blinkers.putView",
  "lexicon": 1
}
```
