---
title: "Register a new Agent under an Organization."
method: POST
path: "/orgs/{orgId}/agents"
tags: ["Agents", "public"]
---

# Register a new Agent under an Organization.

`POST /orgs/{orgId}/agents`

## Path parameters

- `orgId` string, required

## Request body

- AgentCreateBody — An object containing data needed to register an Agent.
  - `id` string, required — The Agent id. It can't be empty and should contain only url safe characters.
  - `public_key` string, required — A pcks8 RSA public key PEM encoded (as the ones produced by openssl), whose module length is greater or equal than 4096 bits.
  - `description` string — An optional description to show future users.

## Response `200`

Agent registered.

- Agent — An object containing the details of an Agent.
  - `id` string, required — The Agent id.
  - `description` string — A description to show future users. It can be empty.
  - `created_at` string, date-time, required — Time of the Agent being registered.
  - `created_by` string, required — User ID of user that added the Agent.

## Other responses

- `400` — The request was invalid. More detail can be found in the error body.
- `409` — The request itself is valid however it could not be applied based on the current state of the resource. More detail can be found in the error body.

---

[API](https://skmtc.net/humanitec/apis/humanitec-api.md) · [All operations](https://skmtc.net/humanitec/apis/humanitec-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/humanitec/humanitec-api/revisions/e21ad140ec3c/schema)
