# app.bsky.contact.defs

- Kind: defs
- Authority: contact.bsky.app
- Lexicon: 1
- Published by [bsky-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:4v4y5r3lwsbtmsxhile2ljac), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/app.bsky.contact.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/app.bsky.contact.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4v4y5r3lwsbtmsxhile2ljac/app.bsky.contact.defs/analytics)

## #matchAndContactIndex (`app.bsky.contact.defs#matchAndContactIndex`)

Type: object

Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.

### Properties

- `contactIndex` (integer, required): The index of this match in the import contact input.
  - Constraints: minimum: 0, maximum: 999
- `match` (ref, required): Profile of the matched user.
  - Reference: `app.bsky.actor.defs#profileView`

## #notification (`app.bsky.contact.defs#notification`)

Type: object

A stash object to be sent via bsync representing a notification to be created.

### Properties

- `from` (string · did, required): The DID of who this notification comes from.
- `to` (string · did, required): The DID of who this notification should go to.

## #syncStatus (`app.bsky.contact.defs#syncStatus`)

Type: object

### Properties

- `matchesCount` (integer, required): Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.
  - Constraints: minimum: 0
- `syncedAt` (string · datetime, required): Last date when contacts where imported.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "matchAndContactIndex": {
      "description": "Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.",
      "properties": {
        "contactIndex": {
          "description": "The index of this match in the import contact input.",
          "maximum": 999,
          "minimum": 0,
          "type": "integer"
        },
        "match": {
          "description": "Profile of the matched user.",
          "ref": "app.bsky.actor.defs#profileView",
          "type": "ref"
        }
      },
      "required": [
        "match",
        "contactIndex"
      ],
      "type": "object"
    },
    "notification": {
      "description": "A stash object to be sent via bsync representing a notification to be created.",
      "properties": {
        "from": {
          "description": "The DID of who this notification comes from.",
          "format": "did",
          "type": "string"
        },
        "to": {
          "description": "The DID of who this notification should go to.",
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "type": "object"
    },
    "syncStatus": {
      "properties": {
        "matchesCount": {
          "description": "Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.",
          "minimum": 0,
          "type": "integer"
        },
        "syncedAt": {
          "description": "Last date when contacts where imported.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "syncedAt",
        "matchesCount"
      ],
      "type": "object"
    }
  },
  "id": "app.bsky.contact.defs",
  "lexicon": 1
}
```
