> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# signin

> Create a user scope for end-user isolation

> [tab] Sync
>
> ```python theme={null}
> def signin(
>     end_user_id: str,
> ) -> UserScope
> ```

> [tab] Async
>
> ```python theme={null}
> async def signin(
>     end_user_id: str,
> ) -> AsyncUserScope
> ```

## Parameters

* `end_user_id` (str): End-user identifier to scope all operations

## Returns

* `UserScope` / `AsyncUserScope`: Scoped client that automatically includes `end_user_id`

## Examples

> [tab] Sync
>
> ```python theme={null}
> from morphik import Morphik
>
> db = Morphik()
> user = db.signin("user_123")
> docs = user.list_documents()
> ```

> [tab] Async
>
> ```python theme={null}
> from morphik import AsyncMorphik
>
> async with AsyncMorphik() as db:
>     user = db.signin("user_123")
>     docs = await user.list_documents()
> ```

## Notes

* You can also scope a folder to a user: `folder.signin("user_123")`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.