---
title: "API login as user"
method: POST
path: "/v3/partner/login-as-user"
tags: ["partner"]
---

# API login as user

`POST /v3/partner/login-as-user`

Sign in to a created organization as a created user of that organization. In the response, your API session is created and a generated `sessionId` is available for organization-level BILL API operations.

This endpoint is required for a specific BILL partner-level workflow.
1. Sign in to your partner account with [API partner login](https://developer.bill.com/reference/partnerlogin).
2. Create a child BILL organization with `POST /v3/partner/organizations`. In the response, a BILL-generated organization `id`  is available.
3. Create a user for the child BILL organization with `POST /v3/partner/users`. In the response, a BILL-generated user `id` is available.
4. Sign in to the created organization as the created user of that organization with `POST /v3/partner/login-as-user`. After signing in, you can perform organization-level BILL API operations, such as creating a bill or paying a vendor. All organization-level BILL API operations require a `devKey` and `sessionId`.

**Note**: When you create an organization and then create a user for that organization, it is important that you initiate risk verification with `POST /v3/risk-verifications`. See [Initiate risk verification for an organization](https://developer.bill.com/reference/initiateriskverifications) for more information.

This operation requires partner-level permissions.
* A `sessionId` header value generated with [API partner login](https://developer.bill.com/reference/partnerlogin)
* An `appKey` header value

You can sign out with `POST /v3/logout`. If your API session is inactive for 35 minutes, the session expires and you are automatically signed out.

### MFA-trusted API session
Set both `rememberMeId` and `device` as additional fields in your `POST /v3/partner/login-as-user` request to create an MFA-trusted API session.

## Headers

- `sessionId` string, nullable — API session ID generated with `/v3/partner/login`
- `appKey` string, nullable — Application key sent to you by BILL when you create a partner account

## Request body

- LoginAsUserRequestDto — API login as user
  - `userId` string, required — BILL-generated ID of the user you want to sign in as
  - `organizationId` string, required — BILL-generated ID of the organization you want to sign in to
  - `rememberMeId` string — MFA ID. Set this field for creating an MFA-trusted API session. This MFA ID is generated when you set `rememberMe` as `true` in your `POST /v3/mfa/challenge/validate` request. This value expires in 30 days. See [Validate MFA challenge](https://developer.bill.com/reference/validatechallenge) for more information.
  - `device` string — Mobile device name. This is a nickname for your mobile device. This field is required when you set `rememberMeId`.

## Response `200`

API login as user response

- LoginAsUserResponseDto — API login as user response.
  - `sessionId` string — API session ID. Use this value in all subsequent API calls to confirm that you are in a signed-in session.
  - `trusted` boolean — This field is set as `true` if the current API session is MFA-trusted

## Other responses

- `4XX` — List of errors.
- `5XX` — List of errors.

---

[API](https://skmtc.net/bill/apis/bill-v3-api.md) · [All operations](https://skmtc.net/bill/apis/bill-v3-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bill/bill-v3-api/revisions/0483350c434e/schema)
