> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# APIの概要

> Notifly HTTP APIの認証方法、リクエストとレスポンスの形式、各エンドポイントの参照先を説明します。

Notifly HTTP APIはHTTPSを使用し、ほとんどのエンドポイントでJSONを送受信します。CSVレスポンスについては[メッセージ統計をCSVでエクスポート](https://docs.notifly.tech/ja/api-reference/get-campaign-statistics-csv.md)をご覧ください。

## 接続情報

| 設定 | 値 |
| - | - |
| ベースURL | `https://api.notifly.tech` |
| メディアタイプ | `application/json` |
| 認証 | `POST /authenticate`でトークンを発行し、`Authorization: Bearer <auth-token>`ヘッダーで送信します。 |
| 文字コード | UTF-8 |
| 日時形式 | ISO 8601（例 `2026-10-11T12:34:56Z`） |

### 共通ヘッダー

| ヘッダー | 値 | 使用する場面 |
| - | - | - |
| `Content-Type` | `application/json` | JSON形式のリクエスト本文を送るとき |
| `Authorization` | `Bearer <auth-token>` | APIトークンが必要なエンドポイントを呼び出すとき |

APIトークンの有効期間は1時間です。有効期限が切れたら、トークンを再発行してリクエストを再送します。

## リクエストとレスポンスの形式

```http theme={null}
POST /some-endpoint HTTP/1.1
Host: api.notifly.tech
Content-Type: application/json
Authorization: Bearer <auth-token>

{ "example": "payload" }
```

```json theme={null}
{
  "success": true,
  "data": { "example": "response" },
  "error": null
}
```

共通のエラーフィールドは、[APIのエラーコードとレスポンス形式](https://docs.notifly.tech/ja/api-reference/error.md)を参照してください。

> [!NOTE]
>
> `/v1/projects/{projectId}/catalogs`以下のCatalog APIは、`{ "data": ..., "error": ... }`形式でレスポンスを返します。[Catalog REST APIを使い始める](https://docs.notifly.tech/ja/api-reference/catalogs/getting-started.md)で使い方を確認できます。

## トークンを発行してイベントを送信する

```js theme={null}
// トークンを発行する
const authRes = await fetch("https://api.notifly.tech/authenticate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    accessKey: "your-access-key",
    secretKey: "your-secret-key"
  })
});
const { data: authToken } = await authRes.json();

// イベントを送信する
const res = await fetch("https://api.notifly.tech/track-event", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${authToken}`
  },
  body: JSON.stringify({
    projectId: "your-project-id",
    eventName: "view_home",
    isGlobalEvent: false,
    userId: "alice",
    eventParams: { plan: "premium" }
  })
});
console.log(await res.json());
```

## 主要なリファレンス

> [card] [APIトークンを発行する](https://docs.notifly.tech/ja/api-reference/authenticate.md)
>
> POST /authenticateでトークンを発行します。

> [card] [APIのエラー](https://docs.notifly.tech/ja/api-reference/error.md)
>
> ステータスコードとレスポンスのフィールドを確認します。

## イベントとユーザー

> [card] [イベントを記録する](https://docs.notifly.tech/ja/api-reference/track-event.md)
>
> ユーザーイベントまたはグローバルイベントを記録します。

> [card] [ユーザー属性を設定する](https://docs.notifly.tech/ja/api-reference/set-user-properties.md)
>
> 1人または複数のユーザーの属性を登録、更新します。

> [card] [ユーザーを削除する](https://docs.notifly.tech/ja/api-reference/delete-users.md)
>
> 1人または複数のユーザーを削除します。

## キャンペーンとユーザージャーニー

> [card] [キャンペーンをトリガーする](https://docs.notifly.tech/ja/api-reference/trigger-campaign.md)
>
> APIを呼び出して、キャンペーンの配信を開始します。

> [card] [ユーザージャーニーをトリガーする](https://docs.notifly.tech/ja/api-reference/trigger-user-journey.md)
>
> APIで対象ユーザーを指定し、そのユーザーのジャーニーを開始します。

## メッセージ配信

> [card] [SMS、LMS、MMSを送信する](https://docs.notifly.tech/ja/api-reference/send-text-message.md)
>
> SMS、LMS、MMSのいずれかを送信します。

> [card] [カカオアリムトークを配信する](https://docs.notifly.tech/ja/api-reference/send-kakao-alimtalk.md)
>
> アリムトークのテンプレートを使って配信します。

> [card] [カカオフレンドトーク](https://docs.notifly.tech/ja/api-reference/send-kakao-friendtalk.md)
>
> 従来のフレンドトーク用エンドポイントを確認します。

> [card] [テンプレートを使ってカカオブランドメッセージを配信する](https://docs.notifly.tech/ja/api-reference/send-kakao-brand-message.md)
>
> テンプレートを使ってブランドメッセージを配信します。

> [card] [カカオブランドメッセージを自由形式で配信する](https://docs.notifly.tech/ja/api-reference/send-kakao-brand-message-freestyle.md)
>
> 自由形式でブランドメッセージを配信します。

## メッセージ配信の管理

> [card] [アリムトークのテンプレートを更新する](https://docs.notifly.tech/ja/api-reference/update-kakao-alimtalk-template.md)
>
> 既存のアリムトークテンプレートを更新します。

> [card] [080受信拒否サービス](https://docs.notifly.tech/ja/api-reference/list-080-block-recipients.md)
>
> 受信拒否番号を照会、登録、削除します。

## エクスポートと分析

> [card] [キャンペーンイベントをエクスポートする](https://docs.notifly.tech/ja/api-reference/create-campaign-event-export.md)
>
> メッセージイベントのエクスポートを作成します。

> [card] [キャンペーン統計を取得する](https://docs.notifly.tech/ja/api-reference/get-campaign-statistics.md)
>
> メッセージの統計を日付ごとに取得します。

> [card] [キャンペーンの詳細統計を取得する](https://docs.notifly.tech/ja/api-reference/get-campaign-statistics-retrieval.md)
>
> 指定したキャンペーンの集計値と日別統計を取得します。

> [card] [ユーザーのメッセージ履歴を取得する](https://docs.notifly.tech/ja/api-reference/get-user-message-history.md)
>
> ユーザーに送信されたメッセージを確認します。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.