---
title: "Create Agent Link Endpoint"
method: POST
path: "/api/v1/agent-links"
tags: ["agent-links"]
---

# Create Agent Link Endpoint

`POST /api/v1/agent-links`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/agent-links`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Create a new agent link (auto-assigns an unguessable slug when omitted).

## Request body

- AgentLinkCreate: Create payload. ``slug`` omitted -> service assigns an unguessable token.
  - `name` string, required
  - `agent_id` integer, required: Agent this link opens
  - `slug` string, nullable
  - `presentation` 'chat' | 'conversation'
  - `greeting` string, nullable: Override; null = inherit agent
  - `topic` string, nullable
  - `caption` string, nullable: Per-link subtitle shown under the conversation title.
  - `chat_theme_id` integer, nullable
  - `expires_at` string, date-time, nullable

## Response `201`

Successful Response

- AgentLinkRead: Canonical read shape returned by the CRUD service functions.
  - `id` integer, required
  - `name` string, required
  - `slug` string, required
  - `agent_id` integer, nullable, required
  - `account_id` integer, required
  - `presentation` string, required
  - `greeting` string, nullable
  - `topic` string, nullable
  - `caption` string, nullable
  - `chat_theme_id` integer, nullable
  - `expires_at` string, date-time, nullable
  - `visit_count` integer, required
  - `agent_name` string, nullable
  - `agent_uri` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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