Parse API

本エンドポイントはInbound Parse Webhook設定の管理を行います。

Get Parse Settings [GET]

全Parse Webhook設定の一覧を取得します。
URI引数 必須 条件 説明
limit No number 結果を取得する件数
Example: 20
offset No number ページオフセット
Example: 1

Request

1
GET https://api.sendgrid.com/v3/user/webhooks/parse/settings?limit={limit}&offset={offset} HTTP/1.1

Response

1
2
3
4
5
6
7
8
9
10
11
HTTP/1.1 200
{
  "result": [
    {
      "url": "http://mydomain.com/parse",
      "hostname": "mail.mydomain.com",
      "spam_check": true,
      "send_raw": true
    }
  ]
}

Create Parse Setting [POST]

Inbound parse設定を新しく作成します。

Request

1
POST https://api.sendgrid.com/v3/user/webhooks/parse/settings HTTP/1.1
Request Body
1
2
3
4
5
6
{
  "hostname": "myhostname.com",
  "url": "http://email.myhosthame.com",
  "spam_check": true,
  "send_raw": false
}

Response

1
2
3
4
5
6
7
HTTP/1.1 201
{
  "url": "http://email.myhostname.com",
  "hostname": "myhostname.com",
  "spam_check": false,
  "send_raw": true
}

Get Parse Setting [GET]

指定したParse Webhook設定を取得します。

Request

1
GET https://api.sendgrid.com/v3/user/webhooks/parse/settings/{hostname} HTTP/1.1

Response

1
2
3
4
5
6
7
HTTP/1.1 200
{
  "url": "http://mydomain.com/parse",
  "hostname": "mail.mydomain.com",
  "spam_check": true,
  "send_raw": true
}

Update Parse Setting [PATCH]

Parse Webhook設定を更新します。

Request

1
PATCH https://api.sendgrid.com/v3/user/webhooks/parse/settings/{hostname} HTTP/1.1
Request Body
1
2
3
4
5
{
  "url": "http://newdomain.com/parse",
  "spam_check": false,
  "send_raw": true
}

Response

1
2
3
4
5
6
7
HTTP/1.1 200
{
  "url": "http://mydomain.com/parse",
  "hostname": "mail.mydomain.com",
  "spam_check": true,
  "send_raw": true
}

Delete Parse Setting [DELETE]

Parse Webhook設定を削除します。

Request

1
DELETE https://api.sendgrid.com/v3/user/webhooks/parse/settings/{hostname} HTTP/1.1

Response

1
HTTP/1.1 204