> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/002_company/017_user_imports/001__import_users_from_csv.md).

# Import Users From Csv

GraphQL endpoint: `/company`

Starts a user import from a previously uploaded CSV file, identified by the S3 file key returned by prepareFileUpload. Optionally creates B2C/C2C connections and requests email, SMS or voice subscriptions for the imported users. Returns the import record, which starts in UPLOADED status while the import is processed.

## Query

```graphql
mutation (
  $fileKey: String!
  $b2cType: B2cConnectionType
  $c2cType: C2cConnectionType
  $requestEmailSubscription: Boolean
  $requestSmsSubscription: Boolean
  $requestVoiceSubscription: Boolean
  $note: String
) {
  importUsersFromCsv (
    fileKey: $fileKey
    b2cType: $b2cType
    c2cType: $c2cType
    requestEmailSubscription: $requestEmailSubscription
    requestSmsSubscription: $requestSmsSubscription
    requestVoiceSubscription: $requestVoiceSubscription
    note: $note
  ) {
    id
    fileName
    status
    note
    insertedAt
    updatedAt
  }
}

```

## Variables

```json
{
  "b2cType": "CUSTOMER",
  "fileKey": "user_uploads/2026-01-15_examplekey1_users.csv",
  "note": "January batch import",
  "requestEmailSubscription": true
}
```

## Response

```json
{
  "data": {
    "importUsersFromCsv": {
      "fileName": "user_uploads/2026-01-15_examplekey1_users.csv",
      "id": "00000000-0000-4000-8000-000000000001",
      "insertedAt": "2026-01-15T09:00:00",
      "note": "January batch import",
      "status": "UPLOADED",
      "updatedAt": "2026-01-15T09:00:00"
    }
  }
}
```
