---
title: "Update External User Mappings"
method: PUT
path: "/v2/company/{company_id}/external_user_mappings/{identifier}"
tags: ["External User Mappings"]
---

# Update External User Mappings

`PUT /v2/company/{company_id}/external_user_mappings/{identifier}`

## Request

- Base URL: `https://api.7shifts.com`
- URL: `https://api.7shifts.com/v2/company/{company_id}/external_user_mappings/{identifier}`
- 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`

## Path parameters

- `company_id` integer, required
- `identifier` string, required

## Query parameters

- `location_id` integer

## Headers

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

## Request body

- object
  - `user_id` integer: User ID in 7Shifts
  - `external_user_id` string: User ID in External System

## Response `200`

OK

- object
  - `object` 'external_user_mapping', required
  - `data` object, required
    - `id` integer, required: Mapping ID
    - `user_id` integer, nullable, required: User ID in 7Shifts
    - `external_user_id` string, nullable, required: User ID in External System
    - `company_id` integer, nullable, required: Company ID
    - `location_id` integer, nullable, required: Location ID
    - `application_name` string, required: Name key of the application this mapping is connected with
    - `created` string, date-time, nullable, required: The ISO8601 date and time in UTC when the mapping was created
    - `modified` string, date-time, nullable, required: The ISO8601 date and time in UTC when the mapping was modified
    - `user_active` boolean, required: Boolean indicating whether the mapped 7Shift user is currently active

## 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)
