On this page

A Project is the app, website, lead magnet, document, workflow, or customer build inside a workspace. Projects own sandboxes, computers, deployments, databases, storage buckets, volumes, functions, jobs, auth configuration, integrations, and custom domains.

Base path: /api/v1/projects

Endpoints

MethodPathDescription
GET/projectsList projects for the organization
POST/projectsCreate a project inside a workspace
GET/projects/{id}Get one project
PATCH/projects/{id}Update a project
GET/projects/{id}/preview-domainRead the project preview domain
PUT/projects/{id}/preview-domainSet the project preview domain
DELETE/projects/{id}/preview-domainClear the project preview domain
GET/projects/{id}/preview-domain/verifyCheck DNS readiness
GET/workspaces/{id}/projectsList projects in one workspace

List Projects

GET /api/v1/projects

Query Parameters

ParameterTypeDescription
workspace_idUUIDLimit results to one workspace

Response - 200 OK

{
  "data": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "tenant_id": "tnt_abc123",
      "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
      "external_workspace_id": "clinic_123",
      "external_project_id": "project_789",
      "name": "Lead Magnet",
      "slug": "lead-magnet",
      "description": null,
      "metadata": {},
      "settings": {},
      "created_at": "2026-05-18T10:00:00Z",
      "updated_at": "2026-05-18T10:00:00Z"
    }
  ],
  "total": 1
}
curl "https://api.miosa.ai/api/v1/projects?workspace_id=550e8400-e29b-41d4-a716-446655440000" 
  -H "Authorization: Bearer $MIOSA_API_KEY"

Create a Project

POST /api/v1/projects

A project must belong to a workspace. Supply one of workspace_id, workspace_slug, or external_workspace_id.

Request Body

FieldTypeRequiredDescription
workspace_idUUIDConditionalExisting MIOSA workspace ID
workspace_slugstringConditionalExisting workspace slug
external_workspace_idstringConditionalYour external workspace/customer ID
namestringYesHuman-readable project name
slugstringNoURL-safe identifier. Auto-derived from name if omitted.
external_project_idstringNoYour project/app/document ID
descriptionstringNoOptional description
metadataobjectNoCaller metadata stored on the project

Example

curl -X POST https://api.miosa.ai/api/v1/projects 
  -H "Authorization: Bearer $MIOSA_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "workspace_slug": "dr-smith-clinic",
    "name": "Lead Magnet",
    "slug": "lead-magnet",
    "external_workspace_id": "clinic_123",
    "external_project_id": "project_789"
  }'

Response - 201 Created

Full project object.

Errors

StatusCodeCause
400WORKSPACE_REQUIREDNo workspace_id, workspace_slug, or external_workspace_id was supplied
404WORKSPACE_NOT_FOUNDWorkspace selector did not resolve inside the organization
422VALIDATION_FAILEDName, slug, or external project ID failed validation

Get a Project

GET /api/v1/projects/{id}

Returns one project if it belongs to the authenticated organization.

curl https://api.miosa.ai/api/v1/projects/{id} 
  -H "Authorization: Bearer $MIOSA_API_KEY"

Update a Project

PATCH /api/v1/projects/{id}

Request Body

FieldTypeDescription
namestringNew display name
slugstringNew URL-safe slug, unique inside the workspace
descriptionstringNew description (null to clear)
external_project_idstringYour project/app/document ID
external_workspace_idstringYour customer/workspace ID
metadataobjectReplacement metadata map
settingsobjectReplacement settings map. Prefer the preview-domain endpoint for domain changes.
curl -X PATCH https://api.miosa.ai/api/v1/projects/{id} 
  -H "Authorization: Bearer $MIOSA_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"name": "Summer Lead Magnet"}'

Use Projects on Resource Create

Most create endpoints accept the same ownership fields:

{
  "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
  "project_id": "660e8400-e29b-41d4-a716-446655440001",
  "external_workspace_id": "clinic_123",
  "external_project_id": "project_789"
}

You can use slugs instead of UUIDs:

{
  "workspace_slug": "dr-smith-clinic",
  "workspace_name": "Dr. Smith Clinic",
  "project_slug": "lead-magnet",
  "project_name": "Lead Magnet"
}

This applies to sandboxes, computers, deployments, databases, storage buckets, volumes, edge functions, cron jobs, project auth, and integrations. Derived records inherit ownership automatically.


Project Preview Domain

PUT /api/v1/projects/{id}/preview-domain

Sets a project-level base domain for generated URLs. This overrides the workspace preview domain and organization preview domain for resources in this project.

curl -X PUT https://api.miosa.ai/api/v1/projects/{id}/preview-domain 
  -H "Authorization: Bearer $MIOSA_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"preview_domain":"program.drsmithclinic.com"}'

Response:

{
  "scope": "project",
  "id": "660e8400-e29b-41d4-a716-446655440001",
  "preview_domain": "program.drsmithclinic.com",
  "effective_domain": "program.drsmithclinic.com",
  "status": "pending_dns",
  "dns_status": "pending",
  "url_examples": {
    "default_preview": "https://<slug>.program.drsmithclinic.com",
    "port_preview": "https://3000-<slug>.sandbox.program.drsmithclinic.com",
    "deployment": "https://<deployment-slug>.program.drsmithclinic.com"
  }
}

Required DNS records:

Record typeNameValue
CNAME*proxy.miosa.ai
CNAME*.sandboxproxy.miosa.ai

Verify:

curl https://api.miosa.ai/api/v1/projects/{id}/preview-domain/verify 
  -H "Authorization: Bearer $MIOSA_API_KEY"

Clear and inherit from the workspace/organization fallback:

curl -X DELETE https://api.miosa.ai/api/v1/projects/{id}/preview-domain 
  -H "Authorization: Bearer $MIOSA_API_KEY"

See also

Was this helpful?