AgentsCreate an agentpost

Create an agent

Magic agent endpoint. A single POST creates the agent, agent configuration, and either a general-action prompt or confidence-based action rule.

curl -X POST "https://api.textmine.com/v3/agents" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "team_id": 321,
  "name": "Weekly supplier-risk reviewer",
  "type": "general_action",
  "schedule": {
    "frequency": "weekly",
    "apply_to": "from_now"
  },
  "config": {
    "vault_id": 12345,
    "scope": "VAULT_TEAM",
    "prompt": "Review newly processed supplier contracts for unusual termination, renewal, and liability terms."
  }
}'
{
  "id": 888,
  "team_id": 321,
  "name": "John Doe",
  "type": "general_action",
  "status": "active",
  "frequency": "weekly",
  "apply_to": "from_now",
  "scope": "VAULT_TEAM",
  "vault_id": 123,
  "created_at": "2024-12-25T10:00:00Z",
  "created_by_id": 123
}
POST
/v3/agents
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
Content-Typestring
Required

The media type of the request body

Options: application/json
team_idinteger
Format: int64
typestring
Required
Options: general_action, confidence_based
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Body

application/json
team_idinteger
Example:
321
namestring
Required
Example:
Weekly supplier-risk reviewer
typestring
Required
Allowed values:general_actionconfidence_based
scheduleobject
Required
configobject
Required

Responses