# pub.chive.sync.indexRecord

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.sync.indexRecord)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.sync.indexRecord/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.sync.indexRecord/examples)

## Definitions

### `pub.chive.sync.indexRecord`

**Type**: `procedure`

Index a record from PDS (owner or admin only)

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the record to index |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | CID of the indexed record (if successful) |
| `uri` | `string` (at-uri) | Yes | AT-URI of the indexed record |
| `error` | `string` | No | Error message (if failed) |
| `indexed` | `boolean` | Yes | Whether indexing succeeded |

#### Errors

- **InvalidRequest**
- **AuthenticationRequired**
- **NotFound**

## Raw Schema

```json
{
  "id": "pub.chive.sync.indexRecord",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "uri"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the record to index"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "NotFound"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "indexed"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "CID of the indexed record (if successful)"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the indexed record"
            },
            "error": {
              "type": "string",
              "description": "Error message (if failed)"
            },
            "indexed": {
              "type": "boolean",
              "description": "Whether indexing succeeded"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Index a record from PDS (owner or admin only)"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
