PJT AI
活用事例ブログ料金ドキュメント
活用事例ブログ料金ドキュメント
ログイン新規登録
  • はじめに
  • 認証
    • APIキー
    • JWTトークン
    • docs.sections.rateLimiting
  • docs.sections.apiUsage
    • docs.sections.usageStats
    • docs.sections.usageHistory
    • docs.sections.accountUsage
  • docs.sections.workspaces
    • docs.sections.workspacesList
    • docs.sections.workspacesGet
  • プロジェクト
    • 一覧取得
    • 詳細取得
    • 作成
    • 更新
    • 削除
  • タスク
    • 一覧取得
    • docs.sections.tasksPaged
    • docs.sections.tasksGet
    • 作成
    • docs.sections.tasksUpdate
    • docs.sections.tasksDelete
    • docs.sections.tasksAssigned
  • ドキュメント
    • 一覧取得
    • docs.sections.documentsPaged
    • docs.sections.documentsGet
    • 作成
    • docs.sections.documentsUpdate
    • docs.sections.documentsDelete
  • 外部連携
    • n8n設定
    • ワークフロー例
  • エラー処理

APIドキュメント

PJT AI APIを使用して、外部システム、エージェント、社内システムからプロジェクトとタスクを管理できます。

ベースURLhttps://api.pjt.ai

認証

PJT AI APIは2つの認証方式をサポートしています:APIキーとJWTトークン。

APIキー

APIキーは外部システム連携に適した認証方式です。アカウント設定でAPIキーを発行してください。

1

アカウント設定ページのAPIキーセクションに移動します。

2

新規APIキー作成ボタンをクリックし、名前を入力します。

3

生成されたキーを安全に保管してください。キーは作成時のみ完全に表示されます。

ヘッダー形式

http
X-API-Key: pk_live_xxxxxxxxxxxx

cURL例

bash
curl -X GET "https://api.pjt.ai/api/external/v1/workspaces" \
  -H "X-API-Key: pk_live_xxxxxxxxxxxx"

JavaScript例

typescript
const response = await fetch('https://api.pjt.ai/api/external/v1/workspaces', {
  method: 'GET',
  headers: {
    'X-API-Key': 'pk_live_xxxxxxxxxxxx',
    'Content-Type': 'application/json',
  },
});

const workspaces = await response.json();

JWTトークン

JWTトークンはユーザーセッションベースの認証に使用されます。ログイン後に発行されたトークンをAuthorizationヘッダーに含めてください。

http
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

docs.sections.rateLimiting

docs.auth.rateLimitDescription

docs.auth.rateLimitTypedocs.auth.rateLimitValue
docs.auth.rateLimitPerMinute60

docs.auth.rateLimitExceeded

json
{
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Too many requests. Please try again later."
}

docs.sections.apiUsage

docs.apiUsage.description

docs.apiUsage.stats.description

パラメータ

名前タイプ必須説明
idpathはいdocs.apiUsage.params.apiKeyId

レスポンス

json
{
  "apiKeyId": 1,
  "todayUsage": 150,
  "monthlyUsage": 3420,
  "totalUsage": 12500,
  "today": "2026-01-20",
  "month": "2026-01"
}

docs.apiUsage.history.description

パラメータ

名前タイプ必須説明
idpathはいdocs.apiUsage.params.apiKeyId
daysqueryいいえdocs.apiUsage.params.days

レスポンス

json
{
  "apiKeyId": 1,
  "history": [
    { "date": "2026-01-20", "count": 150 },
    { "date": "2026-01-19", "count": 230 },
    { "date": "2026-01-18", "count": 180 }
  ]
}

docs.apiUsage.account.description

レスポンス

json
{
  "accountId": 1,
  "monthlyUsage": [
    { "month": "2026-01", "count": 3420 },
    { "month": "2025-12", "count": 4500 },
    { "month": "2025-11", "count": 3200 }
  ]
}

docs.sections.workspaces

docs.workspaces.description

docs.workspaces.list.description

レスポンス

json
{
  "content": [
    {
      "id": 1,
      "name": "My Workspace",
      "description": "Main workspace",
      "createdAt": "2024-01-10T09:00:00Z"
    }
  ],
  "totalElements": 1,
  "totalPages": 1,
  "page": 0,
  "size": 20
}

docs.workspaces.get.description

パラメータ

名前タイプ必須説明
idpathはいdocs.workspaces.params.id

レスポンス

json
{
  "id": 1,
  "name": "My Workspace",
  "description": "Main workspace",
  "members": [...],
  "createdAt": "2024-01-10T09:00:00Z"
}

プロジェクト

プロジェクトの作成、取得、更新、削除ができます。

ワークスペースのプロジェクト一覧を取得します。

パラメータ

名前タイプ必須説明
workspaceIdpathはいワークスペースID
pagequeryいいえページ番号(0から開始)
sizequeryいいえページサイズ(デフォルト: 20)

レスポンス

json
{
  "content": [
    {
      "id": 1,
      "name": "Website Redesign",
      "description": "Complete website overhaul",
      "status": "IN_PROGRESS",
      "startDate": "2024-01-15",
      "endDate": "2024-03-30",
      "createdAt": "2024-01-10T09:00:00Z"
    }
  ],
  "totalElements": 1,
  "totalPages": 1,
  "page": 0,
  "size": 20
}

プロジェクトの詳細情報を取得します。

パラメータ

名前タイプ必須説明
idpathはいプロジェクトID

レスポンス

json
{
  "id": 1,
  "name": "Website Redesign",
  "description": "Complete website overhaul",
  "status": "IN_PROGRESS",
  "startDate": "2024-01-15",
  "endDate": "2024-03-30",
  "tasks": [...],
  "createdAt": "2024-01-10T09:00:00Z"
}

新しいプロジェクトを作成します。

リクエストボディ

json
{
  "workspaceId": 1,
  "name": "New Project",
  "description": "Project description",
  "startDate": "2024-01-15",
  "endDate": "2024-03-30"
}

レスポンス

json
{
  "id": 1,
  "name": "New Project",
  "description": "Project description",
  "status": "PLANNING",
  "startDate": "2024-01-15",
  "endDate": "2024-03-30",
  "createdAt": "2024-01-10T09:00:00Z"
}

プロジェクト情報を更新します。

パラメータ

名前タイプ必須説明
idpathはいプロジェクトID

リクエストボディ

json
{
  "name": "Updated Project Name",
  "status": "IN_PROGRESS"
}

レスポンス

json
{
  "id": 1,
  "name": "Updated Project Name",
  "status": "IN_PROGRESS",
  ...
}

プロジェクトを削除します。

パラメータ

名前タイプ必須説明
idpathはいプロジェクトID

レスポンス

json
204 No Content

タスク

プロジェクト内のタスクを管理します。

プロジェクトのタスク一覧を取得します。

パラメータ

名前タイプ必須説明
projectIdpathはいプロジェクトID

レスポンス

json
[
  {
    "id": 1,
    "title": "Design mockups",
    "description": "Create initial design mockups",
    "status": "IN_PROGRESS",
    "priority": "HIGH",
    "dueDate": "2024-01-20",
    "assignee": { "id": 1, "name": "John Doe" }
  }
]

docs.tasks.paged.description

パラメータ

名前タイプ必須説明
projectIdpathはいプロジェクトID
pagequeryいいえページ番号(0から開始)
sizequeryいいえページサイズ(デフォルト: 20)

レスポンス

json
{
  "content": [
    {
      "id": 1,
      "title": "Design mockups",
      "description": "Create initial design mockups",
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "dueDate": "2024-01-20"
    }
  ],
  "totalElements": 1,
  "totalPages": 1,
  "page": 0,
  "size": 20
}

docs.tasks.get.description

パラメータ

名前タイプ必須説明
idpathはいdocs.tasks.params.taskId

レスポンス

json
{
  "id": 1,
  "title": "Design mockups",
  "description": "Create initial design mockups",
  "status": "IN_PROGRESS",
  "priority": "HIGH",
  "dueDate": "2024-01-20",
  "assignee": { "id": 1, "name": "John Doe" },
  "project": { "id": 1, "name": "Website Redesign" }
}

新しいタスクを作成します。

リクエストボディ

json
{
  "projectId": 1,
  "title": "New Task",
  "description": "Task description",
  "priority": "MEDIUM",
  "dueDate": "2024-01-25",
  "assigneeId": 1
}

レスポンス

json
{
  "id": 2,
  "title": "New Task",
  "description": "Task description",
  "status": "TODO",
  "priority": "MEDIUM",
  "dueDate": "2024-01-25"
}

docs.tasks.update.description

パラメータ

名前タイプ必須説明
idpathはいdocs.tasks.params.taskId

リクエストボディ

json
{
  "title": "Updated Task",
  "status": "IN_PROGRESS",
  "priority": "HIGH"
}

レスポンス

json
{
  "id": 1,
  "title": "Updated Task",
  "status": "IN_PROGRESS",
  "priority": "HIGH",
  ...
}

docs.tasks.delete.description

パラメータ

名前タイプ必須説明
idpathはいdocs.tasks.params.taskId

レスポンス

json
204 No Content

docs.tasks.assigned.description

レスポンス

json
[
  {
    "id": 1,
    "title": "Design mockups",
    "description": "Create initial design mockups",
    "status": "IN_PROGRESS",
    "priority": "HIGH",
    "dueDate": "2024-01-20",
    "project": { "id": 1, "name": "Website Redesign" }
  }
]

ドキュメント

プロジェクトドキュメントを管理します。

プロジェクトのドキュメント一覧を取得します。

パラメータ

名前タイプ必須説明
projectIdpathはいプロジェクトID

レスポンス

json
[
  {
    "id": 1,
    "title": "Project Requirements",
    "type": "SPECIFICATION",
    "createdAt": "2024-01-10T09:00:00Z",
    "updatedAt": "2024-01-15T14:30:00Z"
  }
]

docs.documents.paged.description

パラメータ

名前タイプ必須説明
projectIdpathはいプロジェクトID
pagequeryいいえページ番号(0から開始)
sizequeryいいえページサイズ(デフォルト: 20)

レスポンス

json
{
  "content": [
    {
      "id": 1,
      "title": "Project Requirements",
      "type": "SPECIFICATION",
      "createdAt": "2024-01-10T09:00:00Z",
      "updatedAt": "2024-01-15T14:30:00Z"
    }
  ],
  "totalElements": 1,
  "totalPages": 1,
  "page": 0,
  "size": 20
}

docs.documents.get.description

パラメータ

名前タイプ必須説明
idpathはいdocs.documents.params.documentId

レスポンス

json
{
  "id": 1,
  "title": "Project Requirements",
  "type": "SPECIFICATION",
  "content": "Document content here...",
  "project": { "id": 1, "name": "Website Redesign" },
  "createdAt": "2024-01-10T09:00:00Z",
  "updatedAt": "2024-01-15T14:30:00Z"
}

新しいドキュメントを作成します。

リクエストボディ

json
{
  "projectId": 1,
  "title": "API Specification",
  "type": "SPECIFICATION",
  "content": "Document content here..."
}

レスポンス

json
{
  "id": 2,
  "title": "API Specification",
  "type": "SPECIFICATION",
  "createdAt": "2024-01-20T10:00:00Z"
}

docs.documents.update.description

パラメータ

名前タイプ必須説明
idpathはいdocs.documents.params.documentId

リクエストボディ

json
{
  "title": "Updated Title",
  "content": "Updated content..."
}

レスポンス

json
{
  "id": 1,
  "title": "Updated Title",
  "content": "Updated content...",
  "updatedAt": "2024-01-20T10:00:00Z"
}

docs.documents.delete.description

パラメータ

名前タイプ必須説明
idpathはいdocs.documents.params.documentId

レスポンス

json
204 No Content

外部連携

PJT AI APIを外部自動化ツールと連携してワークフローを自動化できます。

n8nn8n

n8n設定

n8nでPJT AI APIを使用するには、HTTP Requestノードに認証情報を設定してください。

1

n8nワークフローにHTTP Requestノードを追加します。

2

Authenticationを「Generic Credential Type」に設定します。

3

「Header Auth」credentialを作成し、X-API-KeyとAPIキーを入力します。

4

Base URLを設定してAPIエンドポイントを呼び出します。

Credential設定

n8n Credential
{
  "name": "PJT AI API",
  "type": "httpHeaderAuth",
  "data": {
    "name": "X-API-Key",
    "value": "pk_live_xxxxxxxxxxxx"
  }
}

ワークフロー例

n8nを活用したワークフロー自動化の例です。

Slackメッセージからプロジェクト作成

Slackで特定のキーワードを含むメッセージを受信すると、自動的に新しいプロジェクトを作成します。

n8n Workflow
{
  "nodes": [
    {
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "parameters": {
        "channel": "#project-requests"
      }
    },
    {
      "name": "Create Project",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://api.pjt.ai/api/external/v1/projects",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "workspaceId", "value": "1" },
            { "name": "name", "value": "={{ $json.text }}" },
            { "name": "description", "value": "Created from Slack" }
          ]
        }
      }
    }
  ]
}

期限超過タスク通知

毎日期限が過ぎたタスクを確認し、担当者にSlack通知を送信します。

n8n Workflow
{
  "nodes": [
    {
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": { "interval": [{ "field": "hours", "hoursInterval": 1 }] }
      }
    },
    {
      "name": "Get Tasks",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "GET",
        "url": "https://api.pjt.ai/api/external/v1/projects/{{projectId}}/tasks",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "qs": { "status": "IN_PROGRESS" }
      }
    },
    {
      "name": "Filter Overdue",
      "type": "n8n-nodes-base.filter",
      "parameters": {
        "conditions": {
          "dateTime": [{
            "value1": "={{ $json.dueDate }}",
            "operation": "before",
            "value2": "={{ $now }}"
          }]
        }
      }
    },
    {
      "name": "Send Notification",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#alerts",
        "text": "Overdue task: {{ $json.title }}"
      }
    }
  ]
}

GitHubイシューからタスク作成

GitHubに新しいイシューが作成されると、自動的にPJT AIタスクを作成します。

n8n Workflow
{
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "github-issue",
        "httpMethod": "POST"
      }
    },
    {
      "name": "Create Task",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "method": "POST",
        "url": "https://api.pjt.ai/api/external/v1/projects/{{projectId}}/tasks",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "title", "value": "={{ $json.issue.title }}" },
            { "name": "description", "value": "={{ $json.issue.body }}" },
            { "name": "priority", "value": "MEDIUM" }
          ]
        }
      }
    }
  ]
}

エラー処理

APIは標準HTTPステータスコードを使用してリクエストの成功または失敗を示します。

ステータスコード意味APIは標準HTTPステータスコードを使用してリクエストの成功または失敗を示します。
200OKリクエストが正常に処理されました。
201Createdリソースが正常に作成されました。
204No Contentリクエストは成功しましたが、返すコンテンツがありません。
400Bad Request不正なリクエストです。リクエスト形式を確認してください。
401Unauthorized認証が必要か、認証情報が正しくありません。
403Forbiddenこのリソースへのアクセス権限がありません。
404Not Foundリクエストされたリソースが見つかりません。
429Too Many Requestsリクエスト制限を超えました。しばらくしてから再試行してください。
500Internal Server Errorサーバー内部エラーが発生しました。

エラーレスポンス形式

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request body contains invalid data",
    "details": [
      {
        "field": "name",
        "message": "Name is required"
      }
    ]
  }
}
PJT AI

野心とともにスケールするインテリジェンス。

Myelinsoft Inc.

31, Gangnam-daero 92-gil, Gangnam-gu, Seoul, Republic of Korea

6447, 6F

製品

  • 機能
  • 活用事例
  • 統合
  • API

会社

  • 会社概要
  • ブログ
  • お問い合わせ

法的情報

  • プライバシーポリシー
  • 利用規約
  • セキュリティ
  • コンプライアンス

© 2026 PJT AI. All rights reserved.

hello@pjt.ai