Public
Documentation Settings

Prime API(v2)

1分間あたり60回のアクセス制限があります。

1分間あたり60回以上のアクセスがあった場合の処理は、実行されません。

GET/api/v2/users

{{APP_URL}}/api/v2/users

lineユーザの一覧を取得します。

lineユーザの更新日時で絞り込む場合、after 及び beforeというクエリ文字列が利用できます。

例) /api/v2/users?after=20190712T100000&before=20190911T180000

2019/7/12 10:00:00 〜 2019/9/11 18:00:00 の間に更新されているlineユーザを抽出可能。

期間条件指定パラメータ

paramaterdescriptionexample
created_at_after登録日最小範囲指定(>=)created_at_after=20190712T100000
created_at_before登録日最大範囲指定(<=)created_at_before=20190712T100000
updated_at_after更新日最小範囲指定(>=)updated_at_after=20190712T100000
updated_at_before更新日最大範囲指定(<=)updated_at_before=20190712T100000

プロフィール項目値一致条件パラメータ

paramaterdescriptionexample
[プロフィール名]プロフィール値電話番号=01234567890
AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/users?after=20191005T100000'
200 OK
Example Response
json
{
    "count": 1,
    "users": [
        {
            "id": {{USER_ID}},
            "line_id": {{LINE_ID}},
            "line_name": "yamada",
            "icon_url": "http://xxx.example.com/files/public/image/profile/xxx.jpg",
            "created_at": "2019-05-20 19:09:12",
            "updated_at": "2019-10-05 23:39:15",
            "profiles": {
                "氏名": "山田",
                "フリガナ": "やまだ",
                "メールアドレス": "xxx@example.com",
                "志望職種": "エンジニア2",
                "電話番号": "01234567890"
            },
            "tags": [
                {
                    "id": 41739,
                    "name": "性別フォーム回答済み",
                    "tag_folder_id": 1947,
                    "created_at": "2019-05-21 00:49:43",
                    "tag_folder": {
                        "id": 1947,
                        "name": "設定変更不可(テスト用)"
                    }
                },
                {
                    "id": 41737,
                    "name": "男性",
                    "tag_folder_id": 1947,
                    "created_at": "2019-05-21 00:48:21",
                    "tag_folder": {
                        "id": 1947,
                        "name": "設定変更不可(テスト用)"
                    }
                },
                {
                    "id": 41457,
                    "name": "VIP",
                    "tag_folder_id": 1947,
                    "created_at": "2019-05-20 18:51:46",
                    "tag_folder": {
                        "id": 1947,
                        "name": "設定変更不可(テスト用)"
                    }
                },
                {
                    "id": 41456,
                    "name": "全ユーザ",
                    "tag_folder_id": 1947,
                    "created_at": "2019-05-20 18:50:32",
                    "tag_folder": {
                        "id": 1947,
                        "name": "設定変更不可(テスト用)"
                    }
                },
                {
                    "id": 41414,
                    "name": "担当者1",
                    "tag_folder_id": 1933,
                    "created_at": "2019-05-19 08:54:07",
                    "tag_folder": {
                        "id": 1933,
                        "name": "担当者"
                    }
                },
                {
                    "id": 41304,
                    "name": "エンジニア",
                    "tag_folder_id": 1922,
                    "created_at": "2019-05-19 08:54:04",
                    "tag_folder": {
                        "id": 1922,
                        "name": "職種"
                    }
                }
           ]
        }
    ]
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Sat, 05 Oct 2019 14:39:32 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

58

GETユーザ情報取得 登録者番号指定

{{APP_URL}}/api/v2/users/{{USER_ID}}

ユーザIDをキーに、lineユーザの情報を取得します。

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/users/{{USER_ID}}'
200 OK
Example Response
json
{
    "user": {
        "id": {{USER_ID}},
        "line_id": {{LINE_ID}},
        "line_name": "yamada",
        "icon_url": "http://xxx.example.com/files/public/image/profile/xxx.jpg",
        "created_at": "2019-05-20 19:09:12",
        "profiles": {
            "氏名": "山田",
            "フリガナ": "やまだ",
            "メールアドレス": "xxx@example.com",
            "志望職種": "エンジニア"
        },
        "tags": [
            {
                "id": 41739,
                "name": "性別フォーム回答済み",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41737,
                "name": "男性",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41457,
                "name": "VIP",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41304,
                "name": "エンジニア",
                "tag_folder_id": 1922,
                "tag_folder": {
                    "id": 1922,
                    "name": "職種"
                }
            },
            {
                "id": 42195,
                "name": "RMT3",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            },
            {
                "id": 42349,
                "name": "RMテストのコピー用",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            }
        ]
    }
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:02:01 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

59

GETユーザ情報取得 Line指定

{{APP_URL}}/api/v2/users/{{LINE_ID}}

lineユーザIDをキーに、lineユーザの情報を取得します。

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/users/{{LINE_ID}}'
200 OK
Example Response
json
{
    "user": {
        "id": {{USER_ID}},
        "line_id": {{LINE_ID}},
        "line_name": "yamada",
        "icon_url": "http://xxx.example.com/files/public/image/profile/xxx.jpg",
        "created_at": "2019-05-20 19:09:12",
        "profiles": {
            "氏名": "山田",
            "フリガナ": "やまだ",
            "メールアドレス": "xxx@example.com",
            "志望職種": "エンジニア"
        },
        "tags": [
            {
                "id": 41739,
                "name": "性別フォーム回答済み",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41737,
                "name": "男性",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41457,
                "name": "VIP",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41304,
                "name": "エンジニア",
                "tag_folder_id": 1922,
                "tag_folder": {
                    "id": 1922,
                    "name": "職種"
                }
            },
            {
                "id": 42195,
                "name": "RMT3",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            },
            {
                "id": 42349,
                "name": "RMテストのコピー用",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            }
        ]
    }
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:02:29 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

58

PUTプロフィール項目更新 登録者番号指定

{{APP_URL}}/api/v2/users/{{USER_ID}}/profiles

USER_IDで特定したlineユーザのプロフィール項目を更新するAPI

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

HEADERS
Content-Type

application/json

Bodyraw
{
	"氏名": "山田",
	"フリガナ": "やまだ",
	"メールアドレス": "xxx@example.com",
	"志望職種": "エンジニア",
	"電話番号": "01234567890",
	"電話番号2": "01234567891"
}
Example Request
curl
curl --location -g --request PUT '{{APP_URL}}/api/v2/users/{{USER_ID}}/profiles' \
--header 'Content-Type: application/json' \
--data-raw '{
	"氏名": "山田",
	"フリガナ": "やまだ",
	"メールアドレス": "xxx@example.com",
	"志望職種": "エンジニア"
}'
200 OK
Example Response
json
{
    "user": {
        "id": {{USER_ID}},
        "line_id": {{LINE_ID}},
        "line_name": "yamada",
        "icon_url": "http://xxx.example.com/files/public/image/profile/xxx.jpg",
        "created_at": "2019-05-20 19:09:12",
        "profiles": {
            "氏名": "山田",
            "フリガナ": "やまだ",
            "メールアドレス": "xxx@example.com",
            "志望職種": "エンジニア"
        },
        "tags": [
            {
                "id": 41739,
                "name": "性別フォーム回答済み",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41737,
                "name": "男性",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41457,
                "name": "VIP",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41304,
                "name": "エンジニア",
                "tag_folder_id": 1922,
                "tag_folder": {
                    "id": 1922,
                    "name": "職種"
                }
            },
            {
                "id": 42195,
                "name": "RMT3",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            },
            {
                "id": 42349,
                "name": "RMテストのコピー用",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            }
        ]
    }
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:03:19 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

59

POSTプロフィール項目更新 複数指定

{{APP_URL}}/api/v2/batch/users/profiles

複数のlineユーザープロフィールを更新するAPI

  • Bodyに指定するusersオブジェクトのidにはユーザーIDもしくはLINE IDを指定することができます。
  • 存在しないユーザーIDもしくはLINE IDを指定するとエラーとなり処理は行われません。
  • forceパラメーターにtrueを設定すると、存在しないユーザーIDを指定しても無視します。
AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Bodyraw (json)
json
{
    "users": [
        {
            "id": {{USER_ID}},
            "profiles": {
                "氏名": "山田",
                "フリガナ": "やまだ",
                "メールアドレス": "xxx@example.com",
                "志望職種": "エンジニア",
                "電話番号": "01234567890"
            }
        }
    ],
    "force": false
}
Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/batch/users/profiles' \
--data-raw '{
 "users": 
    [
        {
            "id": 451,
            "profiles": {
                "氏名": "山田",
                "フリガナ": "やまだ",
                "メールアドレス": "xxx@example.com",
                "志望職種": "エンジニア",
                "電話番号": "01234567890",
            }
        }
    ]
}'
Example Response
{
  "message": "succeed"
}
No response headers
This request doesn't return any response headers

GET/api/v2/profiles

{{APP_URL}}/api/v2/profiles

設定しているプロフィール項目の一覧を取得します。

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/profiles'
200 OK
Example Response
json
[
  "氏名",
  "フリガナ",
  "メールアドレス",
  "志望職種",
  "大学",
  "学部",
  "学科",
  "電話番号",
  "在住",
  "卒業年度",
  "知ったきっかけ"
]
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:02:58 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

57

GET/api/v2/tags

{{APP_URL}}/api/v2/tags

設定済みのタグ一覧を取得します。
タグフォルダー情報も一緒に取得します。

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/tags'
200 OK
Example Response
json
{
  "tags_count": 147,
  "tag_folers_count": 19,
  "tags": [
    {
      "id": 42155,
      "name": "イベント_201905311200",
      "tag_folder_id": 1921,
      "tag_folder": {
        "id": 1921,
        "name": "イベント・説明会"
      }
    },
    {
      "id": 42156,
      "name": "イベント_201905311200_参加予定",
      "tag_folder_id": 1921,
      "tag_folder": {
        "id": 1921,
        "name": "イベント・説明会"
      }
    }
  ]
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:03:49 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

58

POST/api/v2/tags

{{APP_URL}}/api/v2/tags

タグフォルダーとタグを生成します。

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

HEADERS
Accept

application/json

Content-Type

application/json

Bodyraw (json)
json
{
    "tags": [
        {
            "tag_folder_id": null,
            "tag_folder": "新規タグフォルダーA",
            "tag":  "新規タグ"
        },
        {
            "tag_folder_id": null,
            "tag_folder": "新規タグフォルダーB",
            "tag":  null
        }
    ]
}
Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/tags' \
--data '{
    "tags": [
        {
            "tag_folder_id": null,
            "tag_folder": "新規タグフォルダーA",
            "tag":  "新規タグ"
        },
        {
            "tag_folder_id": null,
            "tag_folder": "新規タグフォルダーB",
            "tag":  null
        }
    ]
}'
200 OK
Example Response
json
[
  {
    "tag_folder_id": 37,
    "tag_folder_name": "新規タグフォルダーA",
    "tag_folder_message": "登録しました。",
    "tag_id": 131,
    "tag": "新規タグ",
    "tag_message": "登録しました。"
  },
  {
    "tag_folder_id": 38,
    "tag_folder_name": "新規タグフォルダーB",
    "tag_folder_message": "登録しました。",
    "tag_id": null,
    "tag": null,
    "tag_message": "タグ名にnullが指定されました。"
  }
]
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.21

Cache-Control

no-cache, private

Date

Mon, 10 Aug 2020 03:22:46 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

59

POSTタグ付与 登録者番号指定

{{APP_URL}}/api/v2/users/{{USER_ID}}/tags/{{TAG_ID}}

特定のlineユーザに特定のタグを付与するためのAPI

AUTHORIZATIONBearer Token
Token

{{API_TOKEN}}

Example Request
curl
curl --location -g --request POST '{{APP_URL}}/api/v2/users/{{USER_ID}}/tags/{{TAG_ID}}'
200 OK
Example Response
json
{
    "user": {
        "id": {{USER_ID}},
        "line_id": {{LINE_ID}},
        "line_name": "yamada",
        "icon_url": "http://xxx.example.com/files/public/image/profile/xxx.jpg",
        "created_at": "2019-05-20 19:09:12",
        "profiles": {
            "氏名": "山田",
            "フリガナ": "やまだ",
            "メールアドレス": "xxx@example.com",
            "志望職種": "エンジニア"
        },
        "tags": [
            {
                "id": 41739,
                "name": "性別フォーム回答済み",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41737,
                "name": "男性",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41457,
                "name": "VIP",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41456,
                "name": "全ユーザ",
                "tag_folder_id": 1947,
                "tag_folder": {
                    "id": 1947,
                    "name": "設定変更不可(テスト用)"
                }
            },
            {
                "id": 41304,
                "name": "エンジニア",
                "tag_folder_id": 1922,
                "tag_folder": {
                    "id": 1922,
                    "name": "職種"
                }
            },
            {
                "id": 42195,
                "name": "RMT3",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            },
            {
                "id": 42349,
                "name": "RMテストのコピー用",
                "tag_folder_id": 1998,
                "tag_folder": {
                    "id": 1998,
                    "name": "RM切り替え用(変更不可)"
                }
            }
        ]
    }
}
Server

nginx

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.2.4

Cache-Control

no-cache, private

Date

Thu, 20 Jun 2019 02:04:43 GMT

X-RateLimit-Limit

60

X-RateLimit-Remaining

59

GET一斉配信APIテンプレート一覧API

{{APP_URL}}/api/v2/broadcast_mail?page=1

APIテンプレートの一覧を100件単位で返します。

PARAMS
page

1

ページ数

Example Request
curl
curl --location -g '{{APP_URL}}/api/v2/broadcast_mail?page=1'
200 OK
Example Response
json
{
  "data": [],
  "links": {
    "first": "{{APP_URL}}/api/v2/broadcast_mail?page=1",
    "last": "{{APP_URL}}/api/v2/broadcast_mail?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": null,
    "last_page": 1,
    "path": "{{APP_URL}}/api/v2/broadcast_mail",
    "per_page": 100,
    "to": null,
    "total": 0
  }
}
Server

nginx/1.21.6

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.3.33

Cache-Control

no-cache, private

Date

Thu, 11 May 2023 02:21:49 GMT

GET一斉配信APIテンプレート詳細API

{{APP_URL}}/api/v2/broadcast_mail/{{TEMPLATE_ID}}

APIテンプレートの詳細を返します。
contentsはそのAPIテンプレートで置換可能なキー一覧です。

Example Request
curl
curl --location 'http://localhost/api/v2/broadcast_mail/328'
200 OK
Example Response
json
{
  "data": {
    "id": 123,
    "name": "test2",
    "contents": [
      "MESSAGE"
    ]
  }
}
Server

nginx/1.21.6

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

X-Powered-By

PHP/7.3.33

Cache-Control

no-cache, private

Date

Thu, 11 May 2023 02:24:33 GMT