---
title: "Create an agent"
method: POST
path: "/v1/agents/"
tags: ["agents"]
---

# Create an agent

`POST /v1/agents/`

## Request

- Base URL: `https://api.wraps.dev`
- URL: `https://api.wraps.dev/v1/agents/`
- Auth: HTTP bearer

## Request body

- object
  - `name` string, required
  - `emailAddress` string, email, required
  - `domain` string, required
  - `policy` object
    - `maxPerHour` number, required: Max sends per rolling hour (0 flags every send)
    - `maxPerDay` number, required: Max sends per rolling day (0 flags every send)
    - `allowedRecipients` string[], required: Exact recipient addresses always allowed
    - `allowedRecipientDomains` string[], required: Recipient domains always allowed

## Response `201`

- object
  - `id` string, required
  - `organizationId` string, required
  - `name` string, required
  - `emailAddress` string, required
  - `domain` string, required
  - `status` string, required: ACTIVE or KILLED
  - `policy` object, required
    - `maxPerHour` number, required: Max sends per rolling hour (0 flags every send)
    - `maxPerDay` number, required: Max sends per rolling day (0 flags every send)
    - `allowedRecipients` string[], required: Exact recipient addresses always allowed
    - `allowedRecipientDomains` string[], required: Recipient domains always allowed
  - `credentialUserArn` string, required
  - `enforcerFunctionArn` string, required
  - `awsAccountId` string, required
  - `createdBy` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Malformed request — unparseable body or an invalid parameter.
- `401`: Missing, malformed, or revoked credentials. Send `Authorization: Bearer <api key>`.
- `403`
- `404`: No such route, or no such resource in this organization.
- `409`
- `422`: The request parsed but failed schema validation.
- `429`: Rate limit exceeded. Wait for the window named by the RateLimit headers.
- `500`: Unexpected server failure. Safe to retry with backoff; quote `requestId` if it persists.

---

[API](https://skmtc.dev/wraps/apis/wraps-platform-api.md) · [All operations](https://skmtc.dev/wraps/apis/wraps-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wraps/apis/wraps-platform-api/revisions/12116fb21af7?raw)
