---
title: "Create User External Mappings"
method: POST
path: "/v2/company/{company_id}/external_user_mappings_bulk"
tags: ["External User Mappings"]
---

# Create User External Mappings

`POST /v2/company/{company_id}/external_user_mappings_bulk`

## Request

- Base URL: `https://api.7shifts.com`
- URL: `https://api.7shifts.com/v2/company/{company_id}/external_user_mappings_bulk`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.7shifts.com/oauth2/authorize`
    - Client credentials
    - Password
    - Token URL: `https://app.7shifts.com/oauth2/token`
  - API key in cookie `7session`
- TypeScript: <https://skmtc.dev/7shifts/apis/7shifts-api/docs/v2/company/:company_id/external_user_mappings_bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `company_id` integer, required

## Query parameters

- `location_id` integer

## Headers

- `x-api-version` string: An API version
- `x-company-guid` string, uuid

## Request body

- object
  - `data` object[], required
    - `external_user_id` string, required: External User ID
    - `user_id` integer: 7shifts User ID
    - `first_name` string: The user's first name
    - `last_name` string: The user's last name
    - `email` string: The user's email
    - `phone_number` string: The user's mobile phone number. Format with no spaces and include area code.

## Response `200`

OK

- object
  - `object` 'external_user_mappings', required
  - `data` object, required
    - `mapped` object[], required
      - `external_user_id` string, required: External User ID
      - `user_id` integer, required: 7shifts User ID
    - `exceptions` object[], required
      - `external_user_id` string, required
      - `reason` 'not_found', required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable Entity
- `500`: Unexpected error

---

[API](https://skmtc.dev/7shifts/apis/7shifts-api.md) - [All operations](https://skmtc.dev/7shifts/apis/7shifts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/7shifts/apis/7shifts-api/revisions/40e0ef40dfcd?raw)
