---
title: "Create Linear agent session for an agent"
method: POST
path: "/api/agents/{agentId}/linear/agent-session"
tags: ["Agent Triggers"]
---

# Create Linear agent session for an agent

`POST /api/agents/{agentId}/linear/agent-session`

## Request

- Base URL: `https://app.cotool.ai`
- URL: `https://app.cotool.ai/api/agents/{agentId}/linear/agent-session`
- Auth: HTTP bearer

Creates a Linear Agent Session on an issue and routes the session and its follow-ups to the selected agent using the organization's enabled Linear trigger.

## Path parameters

- `agentId` string, uuid, required

## Request body

- object
  - `issueId` string, required
  - `externalUrls` object[]
    - `label` string, required
    - `url` string, uri, required

## Response `200`

Successful response

- object
  - `success` boolean, required
  - `message` string, required
  - `agentSessionId` string
  - `triggerId` string

## Other responses

- `400`: Bad request — input validation failed or the request was malformed
- `401`: Unauthorized — missing or invalid API key / session
- `403`: Forbidden — the authenticated user lacks the required permissions
- `500`: Internal server error

---

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