新規登録​

ログイン​

SendGrid

FREEMIUM
開発者​ sendgridOfficial
更新日 17時間前​
Email
7.9/10
人気度​
285ms
レイテンシ​
98%
正常稼働率​

SendGrid APIに​ついて​

このエンドポイントを使用すると、SendGridのv3 Web API経由で電子メールを送信できます。

SendGrid API V3 Overview

Welcome to SendGrid’s Web API v3! This API is RESTful, fully featured, and easy to integrate with.

Send Mail Status Codes

Response Code Reason Description
2xx 2xx responses indicate a successful request The request that you made is valid and successful.
200 OK
202 ACCEPTED YYour message is both valid, and queued to be delivered.

Errors

Sometimes your API call will generate an error. Every response to an API call that generates an error will include an error code, the reason for the error, and an error message to help you debug your request.

Code Reason Description
4xx 4xx responses indicate an error with your request There was a problem with your request.
400 BAD REQUEST
401 UNAUTHORIZED You do not have authorization to make the request.
403 FORBIDDEN
404 NOT FOUND The resource you tried to locate could not be found or does not exist.
405 METHOD NOT ALLOWED
413 PAYLOAD TOO LARGE The JSON payload you have included in your request is too large.
429 TOO MANY REQUESTS The number of requests you have made exceeds SendGrid’s rate limitations.
5xx 5xx responses indicate an error made by SendGrid The request you made was valid, but an error occurred when SendGrid attempted to process it.
500 SERVER ERROR An error occurred on a SendGrid server.
503 SERVICE NOT AVAILABLE The SendGrid v3 Web API is not available.
ログイン​新規登録​

SDKを​インストール(NodeJS)​

インストール​

Node.jsで​Unirestを​使用​するには、​NPMモジュールを​インストール​してください。​

$ npm install unirest

インストール​完了後は、​簡単に​リクエストを​行うことが​できるように​なります。​

var unirest = require('unirest');

リクエスト​

unirest.post("https://rapidprod-sendgrid-v1.p.rapidapi.com/mail/send")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/json")
.send({"personalizations":[{"to":[{"email":"john@example.com"}],"subject":"Hello, World!"}],"from":{"email":"from_address@example.com"},"content":[{"type":"text/plain","value":"Hello, World!"}]})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証​
クライアントID​
クライアントシークレット​
OAuth2認証​
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
APIを​検索​
ブラウザ上で​即座にテスト​
接続用スニペットの​自動生成​
ダッシュボードで​一括管理​