---
title: "Generate Local Uri"
method: POST
path: "/local/generate_uri"
---

# Generate Local Uri

`POST /local/generate_uri`

Generate a development URI for running Morphik locally.

Args:
    name: Developer name to embed in the token payload.
    expiry_days: Number of days the generated token should remain valid.
    password_token: Authentication token that must match LOCAL_URI_TOKEN from .env.
    server_mode: If True, return server IP instead of localhost.

Returns:
    A dictionary containing the ``uri`` that can be used to connect to the
    local instance.

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

## Changes

- **2025-11-05** `9ade02dd7b1d` — 2 breaking, 1 info
  - added the new required request property `password_token`
  - request body became required
  - added the new optional request property `server_mode`

[Change history](https://skmtc.dev/morphik-org/apis/fastapi/changes/local/generate_uri/post.md)

---

[API](https://skmtc.dev/morphik-org/apis/fastapi.md) · [All operations](https://skmtc.dev/morphik-org/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morphik-org/fastapi/revisions/9ade02dd7b1d/schema)
