---
title: "POST /api/agents/workspace/{workspace_id}/"
method: POST
path: "/api/agents/workspace/{workspace_id}/"
tags: ["Agents"]
---

# POST /api/agents/workspace/{workspace_id}/

`POST /api/agents/workspace/{workspace_id}/`

## Request

- Base URL: `https://api.baserow.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.baserow.io/api/agents/workspace/{workspace_id}/`
- Auth: HTTP bearer

Creates a new agent in a workspace.

## Path parameters

- `workspace_id` integer, required

## Request body

- AgentRequest: Mixin to a DRF serializer class to raise an exception if data with unknown fields is provided to the serializer.
  - `name` string, required
  - `role_uid` string
  - `team_ids` integer[]

## Response `200`

- Agent
  - `id` integer, required
  - `workspace_id` integer, required
  - `name` string, required
  - `role_uid` string
  - `last_active` string, date-time, nullable
  - `created_on` string, date-time, required
  - `updated_on` string, date-time, required
  - `teams` AgentTeamSummary[], required
    - `id` integer, required
    - `name` string, required

## Other responses

- `400`
- `403`

## Changes

- **2026-10-23** `a3756c326fe1`: 1 info
  - added the non-success response with the status `403`
- **2026-09-30** `e81714236040`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/baserow/apis/baserow-api-spec/changes/api/agents/workspace/:workspace_id/post.md)

---

[API](https://skmtc.dev/baserow/apis/baserow-api-spec.md) - [All operations](https://skmtc.dev/baserow/apis/baserow-api-spec/llms.txt) - [OpenAPI document](https://skmtc.dev/baserow/apis/baserow-api-spec/revisions/a3756c326fe1?raw)
