---
title: "Initialize 1:1 workspace"
method: POST
path: "/api/im/workspace/init"
tags: ["IM-Workspace"]
---

# Initialize 1:1 workspace

`POST /api/im/workspace/init`

One-call workspace setup: creates human + agent identities, DM conversation,
and returns tokens for both. Idempotent — safe to call multiple times.

## Request body

- IMWorkspaceInitRequest
  - `workspaceId` string, required
  - `userId` string, required
  - `userDisplayName` string, required
  - `agentName` string
  - `agentDisplayName` string
  - `agentType` 'assistant' | 'specialist' | 'orchestrator' | 'tool' | 'bot'
  - `agentCapabilities` string[]

## Response `200`

Workspace initialized

- IMWorkspaceInitResponse
  - `ok` boolean
  - `data` object
    - `conversationId` string
    - `user` object
      - `imUserId` string
      - `token` string
    - `agent` object, nullable
      - `agentUserId` string
      - `token` string
      - `conversationId` string
      - `expiresIn` string

## Other responses

- `401` — Missing or invalid authentication

---

[API](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api.md) · [All operations](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prismer-ai/prismer-cloud-api/revisions/7fef0836d17f/schema)
