> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.markup.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.markup.ai/_mcp/server.

# Run Agent

POST https://api.markup.ai/agents/{agent_id}/run
Content-Type: application/json

Run an agent.

Use `wait=true` to block until the workflow completes (201 Created).
Default (`wait=false`) returns immediately with 202 Accepted.

Reference: https://docs.markup.ai/developer-reference/api-reference/agents/run-agent

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `agent_id` (string, required)

### Query parameters

- `wait` (boolean, optional, default: false)

### Body (application/json)

This endpoint expects an AgentRunRequest.

- `text` (string, required) — Document text to analyze.
- `agents` (list of string, optional, nullable) — Agent IDs to execute. Resolved to agent names server-side.
- `domain_ids` (list of string, optional, nullable) — Terminology domain IDs.
- `document_ref` (string, optional, nullable) — Caller-provided document identifier for tracking across scans.
- `url` (string, optional, nullable) — Document URL.
- `document_name` (string, optional, nullable) — Document name or title.
- `style_guide_id` (string, optional, nullable) — Style guide ID to check the document against. ``target_id`` is a deprecated alias for this field; send exactly one of the two names.
- `content_profile_id` (string, optional, nullable) — Language-service content profile ID for style checking.
- `goal` (string, optional, nullable) — Document goal for agent recommendation.
- `persona_id` (string, optional, nullable) — Agent configuration UUID for persona selection. Used by: persona. Retrieve valid IDs from GET /personas.
- `persona_ids` (list of string, optional, nullable) — Persona UUIDs to analyze against, max 3. Used by: persona. Send this or persona_id, not both. Retrieve valid IDs from GET /personas.
- `no_personas` (boolean, optional, default: false) — Review the document without any reader's perspective. Set this when no persona was chosen on purpose; leave it unset to let the review pick the readers a document is written for. Cannot be sent with persona_ids.
- `voice_profile_id` (string, optional, nullable) — Agent configuration UUID for brand voice profile selection. Used by: brand_voice. Retrieve valid IDs from GET /brand-voice-profiles.
- `webhook_url` (string, optional, nullable) — Optional webhook URL for async result delivery.
- `issues` (list of map from string to any, optional, nullable) — Issues from a previous run to act on, each exactly as returned in that run's result. Supported by agents that apply or rework existing findings; when provided, such an agent works from these instead of re-detecting. Positions must refer to the ``text`` in this request. Other agents ignore this field.
- `generate_fixes` (boolean, optional, nullable) — When true, agents that apply existing findings also draft a fix for findings that carry no suggested replacement. Every drafted fix is verified in context before it is applied; a finding whose draft fails that verification is returned unapplied and its text is left unchanged. Off by default. Other agents ignore this field.
- `lenses` (list of enum, optional, nullable, deprecated) — Deprecated and ignored. A review selects its own agents server-side from the organization's enabled agents.
  - Allowed values: `brand_profile`, `credibility`, `focus`, `ai_search`

## Response

### 200

Successful Response

- `workflow_id` (string, required) — Workflow ID for tracking
- `status` (enum, required) — Workflow status
  - Allowed values: `running`, `completed`, `failed`, `timed_out`, `cancelled`
- `started_at` (datetime, required) — Workflow start time
- `request_id` (string, optional, nullable) — Request tracking ID
- `document_ref` (string, optional, nullable) — Caller-provided document identifier.
- `check_type` (enum, optional) — How this check is counted: 'batch' for a document checked as part of a batch, 'interactive' for a direct /run check.
  - Allowed values: `interactive`, `automated`, `batch`, `baseline`
- `assigned` (boolean, optional, default: true) — Whether the check counts as authoring activity for an author.
- `batch_id` (string, optional, nullable) — Owning batch id (agbw\_\<nanoid>); null unless this is a batch check.
- `result` (map from string to any, optional, nullable) — Execution result (if completed)
- `completed_at` (datetime, optional, nullable) — Workflow completion time
- `duration_seconds` (double, optional, nullable) — Execution duration

### 201

Completed (wait=true)

- `workflow_id` (string, required) — Workflow ID for tracking
- `status` (enum, required) — Workflow status
  - Allowed values: `running`, `completed`, `failed`, `timed_out`, `cancelled`
- `started_at` (datetime, required) — Workflow start time
- `request_id` (string, optional, nullable) — Request tracking ID
- `document_ref` (string, optional, nullable) — Caller-provided document identifier.
- `check_type` (enum, optional) — How this check is counted: 'batch' for a document checked as part of a batch, 'interactive' for a direct /run check.
  - Allowed values: `interactive`, `automated`, `batch`, `baseline`
- `assigned` (boolean, optional, default: true) — Whether the check counts as authoring activity for an author.
- `batch_id` (string, optional, nullable) — Owning batch id (agbw\_\<nanoid>); null unless this is a batch check.
- `result` (map from string to any, optional, nullable) — Execution result (if completed)
- `completed_at` (datetime, optional, nullable) — Workflow completion time
- `duration_seconds` (double, optional, nullable) — Execution duration

### 202

Accepted (wait=false)

- `workflow_id` (string, required) — Workflow ID for tracking
- `status` (enum, required) — Workflow status
  - Allowed values: `running`, `completed`, `failed`, `timed_out`, `cancelled`
- `started_at` (datetime, required) — Workflow start time
- `request_id` (string, optional, nullable) — Request tracking ID
- `document_ref` (string, optional, nullable) — Caller-provided document identifier.
- `check_type` (enum, optional) — How this check is counted: 'batch' for a document checked as part of a batch, 'interactive' for a direct /run check.
  - Allowed values: `interactive`, `automated`, `batch`, `baseline`
- `assigned` (boolean, optional, default: true) — Whether the check counts as authoring activity for an author.
- `batch_id` (string, optional, nullable) — Owning batch id (agbw\_\<nanoid>); null unless this is a batch check.
- `result` (map from string to any, optional, nullable) — Execution result (if completed)
- `completed_at` (datetime, optional, nullable) — Workflow completion time
- `duration_seconds` (double, optional, nullable) — Execution duration

## Errors

### 401 Unauthorized Error

Authentication failed or no valid API key provided.

- `detail` (string, required) — A description of the error that occurred.
- `status` (integer, required) — The HTTP status code generated by the server for this issue
- `request_id` (string, required) — A unique ID associated with the HTTP request.

### 403 Forbidden Error

Forbidden

- `detail` (string, required) — A description of the error that occurred.
- `status` (integer, required) — The HTTP status code generated by the server for this issue
- `request_id` (string, required) — A unique ID associated with the HTTP request.

### 422 Unprocessable Entity Error

Invalid input for agent

- `any`

### 500 Internal Server Error

Workflow execution failed (wait=true)

- `any`

## Examples

### Example 1

**Request**

```json
{
  "text": "string"
}
```

**Response**

```json
{
  "workflow_id": "string",
  "status": "running",
  "started_at": "2024-01-15T09:30:00Z",
  "request_id": "string",
  "document_ref": "string",
  "check_type": "interactive",
  "assigned": true,
  "batch_id": "string",
  "result": {},
  "completed_at": "2024-01-15T09:30:00Z",
  "duration_seconds": 1.1
}
```

**SDK Code**

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "ai_voice_detector")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "terminology")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "brand_voice")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "persona")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "sentence_clarity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "style_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "freshness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "focus_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "key_takeaways")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "link_integrity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "answer_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "date_time_accuracy")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "generic_claims")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "snippet_readiness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "source_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "ai_voice_detector").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "terminology").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "brand_voice").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "persona").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "sentence_clarity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "style_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "freshness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "focus_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "key_takeaways").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "link_integrity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "answer_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "date_time_accuracy").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "generic_claims").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "snippet_readiness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "source_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.markup.ai/agents/agent_id/run"

	payload := strings.NewReader("{\n  \"text\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.markup.ai/agents/agent_id/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.markup.ai/agents/agent_id/run")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/agents/agent_id/run', [
  'body' => '{
  "text": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/agents/agent_id/run");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["text": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/agents/agent_id/run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "text": "string"
}
```

**Response**

```json
{
  "workflow_id": "string",
  "status": "running",
  "started_at": "2024-01-15T09:30:00Z",
  "request_id": "string",
  "document_ref": "string",
  "check_type": "interactive",
  "assigned": true,
  "batch_id": "string",
  "result": {},
  "completed_at": "2024-01-15T09:30:00Z",
  "duration_seconds": 1.1
}
```

**SDK Code**

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "ai_voice_detector")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "terminology")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "brand_voice")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "persona")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "sentence_clarity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "style_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "freshness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "focus_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "key_takeaways")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "link_integrity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "answer_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "date_time_accuracy")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "generic_claims")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "snippet_readiness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "source_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "ai_voice_detector").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "terminology").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "brand_voice").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "persona").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "sentence_clarity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "style_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "freshness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "focus_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "key_takeaways").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "link_integrity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "answer_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "date_time_accuracy").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "generic_claims").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "snippet_readiness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "source_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.markup.ai/agents/agent_id/run"

	payload := strings.NewReader("{\n  \"text\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.markup.ai/agents/agent_id/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.markup.ai/agents/agent_id/run")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/agents/agent_id/run', [
  'body' => '{
  "text": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/agents/agent_id/run");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["text": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/agents/agent_id/run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 3

**Request**

```json
{
  "text": "string"
}
```

**Response**

```json
{
  "workflow_id": "string",
  "status": "running",
  "started_at": "2024-01-15T09:30:00Z",
  "request_id": "string",
  "document_ref": "string",
  "check_type": "interactive",
  "assigned": true,
  "batch_id": "string",
  "result": {},
  "completed_at": "2024-01-15T09:30:00Z",
  "duration_seconds": 1.1
}
```

**SDK Code**

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "ai_voice_detector")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "terminology")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "brand_voice")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "persona")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "sentence_clarity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "style_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "freshness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "focus_agent")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "key_takeaways")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "link_integrity")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "answer_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "date_time_accuracy")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "generic_claims")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "snippet_readiness")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```python Python
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "source_authority")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "ai_voice_detector").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "terminology").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "brand_voice").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "persona").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "sentence_clarity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "style_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "freshness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "focus_agent").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "key_takeaways").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "link_integrity").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "answer_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "date_time_accuracy").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "generic_claims").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "snippet_readiness").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```typescript TypeScript
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "source_authority").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.markup.ai/agents/agent_id/run"

	payload := strings.NewReader("{\n  \"text\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.markup.ai/agents/agent_id/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.markup.ai/agents/agent_id/run")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.markup.ai/agents/agent_id/run', [
  'body' => '{
  "text": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.markup.ai/agents/agent_id/run");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["text": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.markup.ai/agents/agent_id/run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```