---
title: "Register an agent"
method: POST
path: "/api/v2/agents"
tags: ["Agents"]
---

# Register an agent

`POST /api/v2/agents`

## Request

- Base URL: `https://console.jumpcloud.com`
- URL: `https://console.jumpcloud.com/api/v2/agents`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/docs/api/v2/agents/post.ts> (a function with typed inputs; its response is checked against the schema)

Registers a new agent identity in your organization.

## Headers

- `x-org-id` string

## Request body

- AgentCreateRequest: Fields for registering an agent.
  - `name` string, required: Agent name
  - `email` string, email, required: Company email address for this agent
  - `description` string: Free-text description of this agent
  - `ownerId` string, required: ID of the human user who will own this agent. Must be in the same organization.

## Response `201`

Agent created successfully

- Agent: An agent — a non-human identity that can access applications assigned to it. Properties marked read-only are returned on read responses and must not be sent on create or update.
  - `id` string, required: Agent ID (24-character hexadecimal string).
  - `organizationId` string, required: Organization ID (24-character hexadecimal string).
  - `name` string, required: Agent name
  - `description` string: Free-text description of this agent
  - `email` string, email, required: Company email address for this agent
  - `ownerId` string, nullable: ID of the human user who owns this agent. Required at creation; becomes null only if the owning user is later deleted.
  - `state` 'active' | 'suspended', required: Lifecycle state (`active` or `suspended`).

## Other responses

- `400`: Bad request. Including a read-only property from [Agent](#componentschemasagent) returns HTTP 400. When the organization has reached its agent limit, `status` is `agentOrgCapExceeded`.
- `401`: Unauthenticated
- `409`: An agent with a conflicting attribute already exists (for example email)
- `default`: Unexpected error

---

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