---
title: "Generate Cloud Uri"
method: POST
path: "/cloud/generate_uri"
---

# Generate Cloud Uri

`POST /cloud/generate_uri`

Generate an authenticated URI for a cloud-hosted Morphik application.

## Headers

- `authorization` string, nullable
- `X-Morphik-Admin-Secret` string, nullable

## Request body

- GenerateUriRequest — Request model for generating a cloud URI
  - `app_id` string, nullable — Optional client-generated app ID (UUID recommended). If omitted, the server generates one.
  - `name` string, required — Name of the application
  - `user_id` string, nullable — Optional owner user ID. If omitted, derived from the bearer token.
  - `expiry_days` integer — Number of days until the token expires (default: 15 years)
  - `org_id` string, nullable — Optional organization identifier for multi-tenant control planes
  - `created_by_user_id` string, nullable — ID of the admin or service user that initiated the request

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

## Changes

- **2026-01-22** `2d9291c3821d` — 7 info
  - `header` request parameter `authorization` list-of-types was widened by adding types `null`
  - for the `header` request parameter `authorization`, the type/format was generalized from `string`/`` to ``/``
  - the request property `app_id` became optional
  - the request property `user_id` became optional
  - …3 more
- **2025-11-13** `b9ae748cb938` — 3 info
  - added the new optional `header` request parameter `X-Morphik-Admin-Secret`
  - added the new optional request property `created_by_user_id`
  - added the new optional request property `org_id`

[Change history](https://skmtc.dev/morphik-org/apis/fastapi/changes/cloud/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/2d9291c3821d/schema)
