---
title: "Generate agent token"
method: POST
path: "/api/im/workspace/{workspaceId}/agents/{agentId}/token"
tags: ["IM-Workspace"]
---

# Generate agent token

`POST /api/im/workspace/{workspaceId}/agents/{agentId}/token`

Generate a new JWT token for an agent in the workspace.

## Path parameters

- `workspaceId` string, required
- `agentId` string, required

## Response `200`

Token generated

## Other responses

- `401` — Missing or invalid authentication
- `404` — Resource not found

---

[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)
