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

# Generate Cloud Uri

`POST /cloud/generate_uri`

## Request

- Base URL: `https://api.morphik.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.morphik.ai/cloud/generate_uri`
- Auth: none declared

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 was generalized from `string` to no type
  - 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`

[Operation history](https://skmtc.dev/morphik-org/apis/morphik-api/changes/cloud/generate_uri/post.md)

---

[API](https://skmtc.dev/morphik-org/apis/morphik-api.md) - [All operations](https://skmtc.dev/morphik-org/apis/morphik-api/llms.txt) - [OpenAPI document](https://skmtc.dev/morphik-org/apis/morphik-api/revisions/45d77e08d406?raw)
