# social.colibri.beta.polyfill.beginMigration

> Starts moving the requesting user's hosted repos to their PDS. Each repo enters the migrating state, in which the AppView still accepts its writes. Calling it again resumes an interrupted migration.

- Kind: procedure
- Authority: polyfill.beta.colibri.social
- Lexicon: 1
- Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.beginMigration)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.beginMigration/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.beginMigration/analytics)

## Procedure (`social.colibri.beta.polyfill.beginMigration`)

Type: procedure · POST

### Input (application/json)


### Output (application/json)

- `spaces` (array, required): The spaces whose repos still need to move.
  - `items` (string · space-ref)

### Errors

- `AuthRequired`: The request has no valid service auth.
- `InvalidRequest`: The arguments are inconsistent or malformed beyond schema validation.
- `SpacesUnsupported`: The user's PDS does not serve spaces yet.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Starts moving the requesting user's hosted repos to their PDS. Each repo enters the migrating state, in which the AppView still accepts its writes. Calling it again resumes an interrupted migration.",
      "errors": [
        {
          "description": "The request has no valid service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The arguments are inconsistent or malformed beyond schema validation.",
          "name": "InvalidRequest"
        },
        {
          "description": "The user's PDS does not serve spaces yet.",
          "name": "SpacesUnsupported"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "spaces": {
              "description": "The spaces whose repos still need to move.",
              "items": {
                "format": "space-ref",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "spaces"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.polyfill.beginMigration",
  "lexicon": 1
}
```
