---
title: "Create or restore an Agent"
method: POST
path: "/agent"
tags: ["Agents"]
---

# Create or restore an Agent

`POST /agent`

## Request

- Base URL: `https://api.fido.id/1.0`
- URL: `https://api.fido.id/1.0/agent`
- Auth: none declared. Required headers: `x-api-key`

Create a scheduled [Agent](https://docs.trustfull.com/docs/agents). If an archived Agent already exists for the same agent type, domain, and App Key, this operation restores it.

## Headers

- `content-type` string
- `accept` string
- `x-api-key` string, required

## Request body

- AgentCreateRequest
  - `agent_type` 'merchant_risk', required: The type of the Agent. merchant_risk checks the risk of a merchant domain.
  - `domain` string, required: A domain without a protocol or path.
  - `frequency` 'daily' | 'weekly' | 'monthly', required: How often the Agent runs a Request.
  - `start_date` string: Optional first run date and time in UTC. When omitted, the Agent starts shortly after creation.
  - `score_threshold` integer: Send an alert when the result score is lower than this value.
  - `notification_email` string, email: Optional email address that receives Agent alerts.
  - `webhook_url` string, uri: Optional public HTTPS endpoint that receives Agent alerts.

## Response `200`

Archived Agent restored

- Agent
  - `id` string, required: Unique Agent identifier.
  - `agent_type` 'merchant_risk', required: The type of the Agent.
  - `domain` string, required: The domain submitted by each scheduled Request.
  - `frequency` 'daily' | 'weekly' | 'monthly', required: How often the Agent runs a Request.
  - `status` 'active' | 'archived', required: Current Agent lifecycle status.
  - `start_date` string, required: The Agent start date and time in UTC.
  - `creation_date` string, required: The Agent creation date and time in UTC.
  - `last_check` string, nullable: The last scheduled run date and time in UTC.
  - `next_check` string, nullable: The next scheduled run date and time in UTC. Archived Agents return null.
  - `checks_done` integer, required: Number of scheduled runs completed by the Agent.
  - `archive_reason` string, nullable: Why the Agent was archived automatically, when applicable.
  - `score_threshold` integer, required: An alert is sent when the result score is lower than this value.
  - `last_score` integer, nullable: Score returned by the most recent completed Request.
  - `notification_email` string, email, nullable: Email address that receives Agent alerts.
  - `webhook_url` string, uri, nullable: HTTPS endpoint that receives Agent alerts.

## Other responses

- `201`: Agent created
- `400`: Invalid request
- `401`: Invalid App Key
- `402`: Insufficient credits
- `403`: The App Key is not enabled for Agents, which are part of the Enterprise plan
- `409`: An active Agent already exists for this agent type, domain, and App Key

## Changes

- **2026-11-03** `be8ae1d26648`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/trustfull/apis/products/changes/agent/post.md)

---

[API](https://skmtc.dev/trustfull/apis/products.md) - [All operations](https://skmtc.dev/trustfull/apis/products/llms.txt) - [OpenAPI document](https://skmtc.dev/trustfull/apis/products/revisions/be8ae1d26648?raw)
