# Submit a switch-in drop

Source: https://amanucci.com/docs/developers/api/migrations/submitMigrationDrop

## POST /v1/firms/{firmId}/migrations/drops

Submit a switch-in drop

Submit a staged drop: each file is read, classified by its content, never its name, and grouped by the enterprise number it carries into one migration per company. A company whose number is a client this seat reaches targets it; any other is a new client, and no client of another tenant is named. A newer audit file replaces a staged migration (the old one `abandoned`); a company already switched in refuses (409 `migration_signed`). Each touched migration's plan is made in the background. Files no format reads are answered `unreadable` and stored nowhere.

Operation ID: `submitMigrationDrop`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "firmId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/MigrationDrop"
      }
    }
  }
}
```

### Responses

#### 201 The migrations the drop staged, and the files no format reads.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/SubmittedMigrationDrop"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
