# fyi.opensocial.checkImport

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.checkImport)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.checkImport/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.checkImport/examples)

## Definitions

### `fyi.opensocial.checkImport`

**Type**: `query`

What moving an account here would make of it, before anything moves (importAccount moves it so): its handle here, whether that's the one it has, and its address, this host's own name for it, where its site lives. A handle on a domain of the account's own that still names it comes along; one its old server gives out becomes the address. `refused` says why it can't have that address, as importAccount would.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `address` | `string` | No | The label of its address here, if not its handle's first label. |
| `did` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `address` | `string` (handle) | Yes |  |
| `did` | `string` (did) | Yes |  |
| `from` | `string` | No | The handle it has now. |
| `handle` | `string` (handle) | Yes | Its handle once moved. |
| `keeps` | `boolean` | Yes | Whether that's the handle it has now. |
| `label` | `string` | Yes |  |
| `refused` | `unknown` | No | {error, message}: InvalidHandle or HandleNotAvailable. |

#### Errors

- **NotPlc**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "What moving an account here would make of it, before anything moves (importAccount moves it so): its handle here, whether that's the one it has, and its address, this host's own name for it, where its site lives. A handle on a domain of the account's own that still names it comes along; one its old server gives out becomes the address. `refused` says why it can't have that address, as importAccount would.",
      "errors": [
        {
          "name": "NotPlc"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "address": {
              "format": "handle",
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "from": {
              "description": "The handle it has now.",
              "type": "string"
            },
            "handle": {
              "description": "Its handle once moved.",
              "format": "handle",
              "type": "string"
            },
            "keeps": {
              "description": "Whether that's the handle it has now.",
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "refused": {
              "description": "{error, message}: InvalidHandle or HandleNotAvailable.",
              "type": "unknown"
            }
          },
          "required": [
            "did",
            "handle",
            "address",
            "label",
            "keeps"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "address": {
            "description": "The label of its address here, if not its handle's first label.",
            "type": "string"
          },
          "did": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "did"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "fyi.opensocial.checkImport",
  "lexicon": 1
}
```
