---
title: "PATCH /api/user-source/{user_source_id}/move/"
method: PATCH
path: "/api/user-source/{user_source_id}/move/"
tags: ["User sources"]
---

# PATCH /api/user-source/{user_source_id}/move/

`PATCH /api/user-source/{user_source_id}/move/`

Moves the user_source in the application before another user_source or at the end of the application if no before user_source is given. The user_sources must belong to the same application.

## Path parameters

- `user_source_id` integer, required

## Headers

- `ClientSessionId` string, uuid

## Request body

- PatchedMoveUserSource — Serializer used when moving a user source.
  - `before_id` integer, nullable — If provided, the user_source is moved before the user_source with this Id. Otherwise the user_source is placed at the end of the page.

## Response `200`

- UserSourceUserSource — Basic user_source serializer mostly for returned values.
  - `id` integer, required
  - `uid` string, required — Unique id for this user source.
  - `application_id` integer, required
  - `integration_id` integer, nullable, required — The Integration used to establish the connection with the service.
  - `type` string, required — The type of the user_source.
  - `name` string, required
  - `order` string, decimal, required — Lowest first.
  - `auth_providers` AppAuthProviderAppAuthProvider[] — Auth providers related to this user source.
    - union
      - LocalBaserowPasswordAppAuthProviderAppAuthProvider — Basic app_auth_provider serializer mostly for returned values.
        - `type` string, required — The type of the app_auth_provider.
        - `id` integer, required
        - `domain` string, nullable — The email domain registered with this provider.
        - `password_field_id` integer, nullable — The id of the field to use as password for the user account.
      - SamlAppAuthProviderModelAppAuthProvider — Basic app_auth_provider serializer mostly for returned values.
        - `type` string, required — The type of the app_auth_provider.
        - `id` integer, required
        - `domain` string, nullable — The email domain registered with this provider.
        - `metadata` string, required — The SAML metadata XML provided by the IdP.
        - `is_verified` boolean, required — Whether or not a user sign in correctly with this SAML provider.
        - `email_attr_key` string — The key in the SAML response that contains the email address of the user.
        - `first_name_attr_key` string — The key in the SAML response that contains the first name of the user.
        - `last_name_attr_key` string — The key in the SAML response that contains the last name of the user. If this is not set, the first name attr will be used as full name.
      - OpenIdConnectAppAuthProviderModelAppAuthProvider — Basic app_auth_provider serializer mostly for returned values.
        - `type` string, required — The type of the app_auth_provider.
        - `id` integer, required
        - `domain` string, nullable — The email domain registered with this provider.
        - `name` string, required
        - `base_url` string, required — The provider base url.
        - `client_id` string, required — App ID, or consumer key
        - `secret` string, required — API secret, client secret, or consumer secret
        - `use_id_token` boolean — Whether to use the id_token instead of user_info endpoint to get user data
        - `email_attr_key` string — The name of the claim that contains the email address of the user.
        - `first_name_attr_key` string — The key in the OIDC response that contains the first name of the user.
        - `last_name_attr_key` string — The key in the OIDC response that contains the last name of the user. If empty in response, first name will be used.
  - `user_count` integer, required — The total number of users in the user source.
  - `user_count_updated_at` string, date-time, required — When the last user count took place.
  - `table_id` integer, nullable — The id of the Baserow table we want the data for.
  - `email_field_id` integer, nullable — The id of the field to use as email for the user account.
  - `name_field_id` integer, nullable — The id of the field that contains the user name.
  - `role_field_id` integer, nullable — The id of the field that contains the user role.

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
