Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.

Commit 4163e4a

Browse files
committed
Merge pull request #1438 from sendgrid/kb_docs_move
Knowledge Base -> Docs Move
2 parents 0861fa5 + fb65b2e commit 4163e4a

File tree

345 files changed

+7972
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

345 files changed

+7972
-214
lines changed

source/API_Reference/Web_API_v3/Marketing_Campaigns/campaigns.apiblueprint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Returns an empty array if no campaigns exist
253253
"list_ids": "You must select at least 1 segment or 1 list to send to."
254254
"unsubscribe_tag": "An [unsubscribe] tag in both your html and plain content is required to send a campaign."
255255
"suppression_group_id": "Either a suppression_group_id or custom_unsubscribe_url is required to send a campaign."
256-
"": "You do not have enough credits to send this campaign. <a href='https://app.sendgrid.com/settings/billing'>Upgrade your plan to send more.</a>"
256+
"": " credits to send this campaign. <a href='https://app.sendgrid.com/settings/billing'>Upgrade your plan to send more.</a>"
257257

258258
+ Response 403
259259

source/Classroom/Basics/API/Icon

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
seo:
3+
title: Does Sendgrid offer a sandbox or test environment?
4+
description: Does Sendgrid offer a sandbox or test environment?
5+
keywords: box, throughput, development, dev, staging, sand, speed, developers, test, sandbox, environment, trial
6+
title: Does Sendgrid offer a sandbox or test environment?
7+
weight: 0
8+
layout: page
9+
zendesk_id: 203891358
10+
navigation:
11+
show: true
12+
---
13+
14+
We do not offer a true "sandbox" environment, however we do have a [Free plan](https://sendgrid.com/transactional-email/pricing) which allows you to send 400 emails per day, and also gives you access to almost all of the features offered with our higher package levels. The Free plan does not include access to a dedicated IP or&nbsp;IP whitelabeling.
15+
16+
We also have a [sink email address](http://support.sendgrid.com/hc/en-us/articles/201995663-Safely-Test-Your-Sending-Speed)&nbsp;that can help you test message throughput&nbsp;for your integration.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
seo:
3+
title: How do I Integrate with SendGrid?
4+
description: How do I Integrate with SendGrid?
5+
keywords: marketing, webhook, newsletter, getting, started, whitelabel, getting_started, email, api, integration, smtp, what, warm
6+
title: How do I Integrate with SendGrid?
7+
weight: 0
8+
layout: page
9+
zendesk_id: 200182018
10+
navigation:
11+
show: true
12+
---
13+
14+
There are many&nbsp;different ways to use SendGrid’s email services so it all comes down to what&nbsp;_you_&nbsp;need. We have numerous examples for how to configure mail clients such as Outlook and Apple Mail to send through our system as well as integration examples for a multitude of programming languages and libraries on our&nbsp; [SendGrid Integration Page](http://sendgrid.com/docs/Integrate/index.html).
15+
16+
**The main ways you can integrate with Sendgrid:&nbsp;**
17+
18+
- [SMTP](http://support.sendgrid.com/hc/en-us/articles/202821898-What-is-SMTP-)&nbsp;- Send using a desktop mail client, or existing program/service with [your smtp credentials](http://support.sendgrid.com/hc/en-us/articles/200328026-What-are-my-settings-for-SMTP-integration-).&nbsp;
19+
- [Web API](https://sendgrid.com/docs/API_Reference/Web_API/index.html)&nbsp;- Send from your app using&nbsp; [your api key](http://support.sendgrid.com/hc/en-us/articles/200181818-What-is-my-API-key-). Check out our [API Guide](http://go.sendgrid.com/rs/sendgrid/images/SendGrid_API_Guide-101.pdf) for more info.
20+
- [Email Marketing App and API](https://sendgrid.com/docs/Marketing_Emails/index.html)&nbsp;- Send from our content creation UI and manage your lists via the website.&nbsp;
21+
22+
&nbsp;
23+
24+
**Things to consider before you start sending:**
25+
26+
- We recommend that all Silver and higher customers complete [Whitelabeling](http://support.sendgrid.com/entries/21195838-whitelabel-why-do-i-need-to-make-dns-changes-silver) for their accounts. This process helps your emails look as legitimate as possible!
27+
- Also consider implementing the&nbsp; [Event API](http://sendgrid.com/docs/API_Reference/Webhooks/event.html)&nbsp;to track and log your email data more thoroughly. For more info on the benefits of Event API, check out our&nbsp; [_Why Event API_](http://support.sendgrid.com/entries/21233621-why-event-api)&nbsp;article. The Event API is available to all account levels except for Lite.
28+
- We _ **highly** _ recommend that if you are a Silver or&nbsp;higher customer, you [warm up your IP](https://sendgrid.com/docs/User_Guide/warming_up.html) as part of your getting started checklist. Warming up is one of the best ways to prevent delivery issues down the road!
29+
30+
&nbsp;
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
seo:
3+
title: How to Create a Subuser with the API
4+
description: How to Create a Subuser with the API
5+
keywords: subuser, api, IP, account, new, create, /customer.
6+
title: How to Create a Subuser with the API
7+
weight: 0
8+
layout: page
9+
zendesk_id: 201750787
10+
navigation:
11+
show: true
12+
---
13+
14+
<center>Creating a new subuser through SendGrid's API is a multi-step process. This guide will walk you through the necessary steps in order to create a new subuser account using only API calls.</center>
15+
16+
**1. Establish the New Subuser&nbsp;** (required)
17+
18+
With the [subuser creation API call](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/subusers.html)&nbsp;you will be able to establish the new subuser's account and profile settings. This call will create the new subuser account, however it does not apply the sending IP for the account, nor does it establish a whitelabel entry or enable website/SMTP access for the subuser.
19+
20+
**Call Example:** https://api.sendgrid.com/apiv2/customer.add.json?api\[email protected]&api\_key=xxxxxx&username=newsubuser\_username&website=yourdomain.com&password=newsubuser\_password&confirm\_password=newsubuser\_password&first\_name=Ryan&last\_name=Burrer&address=555\_anystreet&city=any\_city&state=CO&zip=80203&[email protected]&country=US&phone=555-5555
21+
22+
<center>
23+
<strong>Success Message<br></strong><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/5e355c42-487e-442a-bd2b-89c9d80dd7d0/00000094.png" alt=""><center><strong> <br>Failure Message<br></strong></center>
24+
<img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/d8482205-976f-4f82-ad3a-77503e867c2f/00000095.png" alt=""> <strong><span class="wysiwyg-font-size-medium"><br><br></span></strong>
25+
</center>
26+
27+
**2. Assign an IP to be Used by the New Subuser** &nbsp;(required)
28+
29+
Now that you have created the new subuser account, you will need to [add an IP](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/ip_management.html#-Subuser-IP-Assignment)&nbsp;so that it can send emails. We advise that you first find an available IP for this subuser. You can do so by using the following call:
30+
31+
**Call Example:** https://api.sendgrid.com/apiv2/customer.ip.xml?api\[email protected]&api\_key=xxxxxx&list=all
32+
33+
When defining the parameter 'list' there are a few options you can choose:
34+
35+
- **All&nbsp;** = Will list all of the IPs on your account, taken or available.
36+
- **Free&nbsp;** = Will list all the free IPs on your account. &nbsp;For instance, if an IP is in use by a subuser or parent account then that IP will not be listed.
37+
- **Taken&nbsp;** = Will list all of the IP addresses that are assigned to your parent and/or subuser accounts.
38+
- **Available&nbsp;** = Will list all of the unassigned IP addresses for the account. If a subuser is deactivated&nbsp;_and it&nbsp;_is assigned an IP, that IP will show up on this list since that IP address is not technically in use.
39+
<center>
40+
<strong>Response Example<br></strong><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/0dc1923b-fff9-4446-aff1-5dcab41929a4/00000096.png" alt="" align="middle">
41+
</center>
42+
43+
After you have selected the IP that you wish to assign to your subuser account, simply make the API call to [append the IP address](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/ip_management.html#-Subuser-IP-Assignment).
44+
45+
**Call Example:** https://api.sendgrid.com/apiv2/customer.sendip.json?api\[email protected]&api\_key=xxxxxx&task=append&set=specify&user=newsubuser\_username&ip[]=255.255.255.250&ip[]=255.255.255.255
46+
47+
When defining this call's 'set' parameter, you have a few options for appending the subuser's IP:
48+
49+
- **None&nbsp;** = removes all of the IPs on the associated account.
50+
- **All&nbsp;** = applies all of the possible IPs to the account.
51+
- **Specify** =&nbsp;Specify the IPs to the subuser
52+
<center>
53+
<strong>Success Message</strong>
54+
<p class="wysiwyg-text-align-left"><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/5e355c42-487e-442a-bd2b-89c9d80dd7d0/00000094.png" alt="" align="middle"></p>
55+
<strong>Failure Message</strong>
56+
<p class="wysiwyg-text-align-left"><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/d8482205-976f-4f82-ad3a-77503e867c2f/00000095.png" alt="" align="middle"></p>
57+
</center>
58+
59+
&nbsp;
60+
61+
**3. Assign a Whitelabel for the Subuser Account&nbsp;** (optional)
62+
63+
After you have created the subuser account and have appended an IP address, you are now ready to assign an _existing_&nbsp; [whitelabel](https://sendgrid.zendesk.com/hc/en-us/articles/200548228-All-You-Need-to-Know-About-Whitelabeling) to the account. If you have not yet created the required records for whitelabeling for your chosen domain then this step should be skipped. Unfortunately, new whitelabel records cannot be established through API calls.
64+
65+
First, you should find out what whitelabel entries you have associated with your account. This call will [list your available whitelabel domains](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/whitelabel.html#-List):
66+
67+
**Call Example:&nbsp;** https://api.sendgrid.com/apiv2/customer.whitelabel.json?api\[email protected]&api\_key=xxxxxx&task=list
68+
69+
<center>
70+
<strong>Response Example</strong>
71+
<p class="wysiwyg-text-align-left"><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/9d491f57-d3c8-4376-a31d-a04b49590747/00000097.png" alt=""></p>
72+
</center>
73+
74+
The&nbsp;API response above shows that email.sendgrid.com and email.example.com are both already established whitelabel entries, and can be used by this subuser. &nbsp;If none are displayed then the next step in this process should be skipped.
75+
76+
If you have a whitelabel entry that you wish to apply to your subuser then you will need to [append the whitelabel entry](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/whitelabel.html#-Append) to your subuser:
77+
78+
**Call Example:** &nbsp;https://api.sendgrid.com/apiv2/customer.whitelabel.json?api\[email protected]&api\_key=xxxxxx&task=append&user=newsubuser\_username&mail\_domain=YOUR.ALREADY.EXISTING.WHITELABEL
79+
80+
<center>
81+
<strong>Success Message</strong>
82+
<p class="wysiwyg-text-align-left"><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/5e355c42-487e-442a-bd2b-89c9d80dd7d0/00000094.png" alt="" align="middle"></p>
83+
<strong>Failure Message</strong>
84+
<p><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/d8482205-976f-4f82-ad3a-77503e867c2f/00000095.png" alt=""></p>
85+
</center>
86+
87+
**4. Authenticating the Subuser to Have Website/SMTP Access&nbsp;** (required)
88+
89+
The final step in creating your new subuser requires you to simply [activate the subuser](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/authenticate_a_subuser.html) account so that they have website and SMTP access.
90+
91+
**Call Example:** &nbsp;https://api.sendgrid.com/apiv2/customer.auth.json?api\[email protected]&api\_key=xxxxxx&user=newsubuser\_username&password=newsubuser\_password
92+
93+
<center>
94+
<strong>Success Message</strong>
95+
<p><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/5e355c42-487e-442a-bd2b-89c9d80dd7d0/00000094.png" alt="" align="middle"></p>
96+
<strong>Failure Message</strong>
97+
<p><img src="http://content.screencast.com/users/Ryan.Burrer/folders/Jing/media/d8482205-976f-4f82-ad3a-77503e867c2f/00000095.png" alt=""></p>
98+
</center>
99+
<center>
100+
<br><strong>That's All, Folks!</strong>
101+
</center>
102+
103+
If you have followed all of these steps then you have just created a new subuser using the Subuser API. Give yourself a high five! &nbsp;
104+
105+
But wait, there's more... &nbsp;
106+
107+
Now that you have created a new subuser you can change the [Event Notification URL](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/event_notification_url.html), the subuser's enabled [apps](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/apps.html), and even set [account limits](http://sendgrid.com/docs/API_Reference/Customer_Subuser_API/account_limits.html) for the subuser. &nbsp;&nbsp;
108+
109+
<center>
110+
<p> </p>
111+
</center>
112+
113+
&nbsp;
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
seo:
3+
title: HTTP POSTing The Right Way
4+
description: HTTP POSTing The Right Way
5+
keywords: event, webhook, http, https, post, parse, header, body
6+
title: HTTP POSTing The Right Way
7+
weight: 0
8+
layout: page
9+
zendesk_id: 200181828
10+
navigation:
11+
show: true
12+
---
13+
14+
**Issue** : You're getting an error when using WebAPI and a very long URI string consisting of all of the parameter data in the URI string. Error returned may be “414 request-URI Too Large.”
15+
16+
**Cause** : Instead of putting the appropriate parameters (i.e. to, from, body, html (etc)) in the body of the HTTP POST request, the user is putting them in the URI string as such:
17+
18+
http://sendgrid.net/api/mail.send?to=email@address&[email protected]
19+
20+
If the content is too long (in the case of many TO/CC/BCC addresses and lengthy TEXT and HTML content), the error will be generated.
21+
22+
An example using Curl which is not correct (when used on the command line):
23+
24+
$ curl https://sendgrid.com/api/mail.send.json?api_user=MyName&api_key=MyPassword&[email protected]&[email protected]&text=some+really+long+text+also+notice+how+this+is+all+part+of+the+mail.send.json+URI
25+
26+
The above Curl request is putting all of the parameters as part of the URL (https://sendgrid.com/api/mail.send.json) instead as seperate fields.
27+
28+
Resolution/Best Practices:
29+
When performing the HTTP POST, ensure that the parameters are being posted as part of the body instead of with the URI.
30+
31+
Example using Curl which is correct (when used on the command line):
32+
33+
$ curl -F [email protected] -F [email protected] -F text=some+really+long+text+that+is+now+going+to+work+correctly -F api_user=MyUserName -F api_key=MyPassword https://sendgrid.com/api/mail.send.json
34+
35+
The above Curl request is now submitting the parameters as fields (“-F”) which will put the parameters in the HTTP POST body instead of as part of the URI string. This will allow the customer to not run into the above error under normal circumstances.
36+
37+
For more information, please see the following links:
38+
39+
- Doing HTTP POST the right way: [http://www.jmarshall.com/easy/http/#postmethod](http://www.jmarshall.com/easy/http/#postmethod)
40+
- SendGrid WebAPI (see Examples): [http://docs.sendgrid.com/documentation/api/web-api/mail/](http://docs.sendgrid.com/documentation/api/web-api/mail/)
41+
- Curl POST via PHP: [http://davidwalsh.name/execute-http-post-php-curl](http://davidwalsh.name/execute-http-post-php-curl)
42+
(notice how the data is put into the CURL\_POSTFIELDS variable instead of the CURL\_URL variable)
43+
44+
&nbsp;
45+
46+
_last updated: Jayson Sperling - 09 Apr 2013_
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
seo:
3+
title: What is my API key?
4+
description: What is my API key?
5+
keywords: password, credentials, api, key, api_key, credential
6+
title: What is my API key?
7+
weight: 0
8+
layout: page
9+
zendesk_id: 200181818
10+
navigation:
11+
show: true
12+
---
13+
14+
SendGrid offers customers the ability to manage the security of their accounts and their sending with [API keys](https://app.sendgrid.com/settings/api_keys).
15+
16+
API Keys allow you to generate an authentication credential that is separate from your username and password. They are independent from one another and are easily disposable. You should create unique API keys for each of your applications or servers so that you can easily revoke them without disrupting other systems if needed.
17+
18+
&nbsp;
19+
20+
Example:
21+
22+
> Authorization: Bearer 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
23+
24+
\*For sending via SMTP, provide the string `apikey` as the SMTP username, and use your API Key as the password.
25+
26+
&nbsp;
27+
28+
For more information please feel free to review our [documentation](https://sendgrid.com/docs/Classroom/Send/api_keys.html) page.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
seo:
3+
title: Why Event API?
4+
description: Why Event API?
5+
keywords: event, webhook, notification, api
6+
title: Why Event API?
7+
weight: 0
8+
layout: page
9+
zendesk_id: 200182028
10+
navigation:
11+
show: true
12+
---
13+
14+
Wouldn't it be nice if you could get information about every email you've ever sent, every message that's ever been opened, and any link that's ever been clicked? If you ever talk to SendGrid Support Agents, we'll almost always recommend implementing our Event API if you haven't done so. This article highlights the major benefits of the Event API and why we always recommend it.
15+
16+
&nbsp;
17+
18+
Due to the sheer volume of email we send (more than 3 _billion_ in March of 2012), we can only store so much information regarding the emails passing through our system. Our Email Activity page holds records for 2 days with a max 500 entries and our internal database records only go back about 30 days. After that, unfortunately, specific email data is gone (stats are permanent). Fortunately, you can receive and store all of this information on your end though by implementing our Event API.
19+
20+
&nbsp;
21+
22+
The Event API, available with all Essentials&nbsp;level and higher accounts, gives you HTTP POSTs for any and all requested account activity as it takes place to a provided URL. The Event API can tell you who opened what email and clicked which link as far back as the records go.&nbsp; [Events](http://docs.sendgrid.com/documentation/delivery-metrics/) we can POST include Processed, Delivered, Opens, Clicks, Unsubscribes, Spam Reports, Deferred, Bounces, and Drops with all relevant Category and Unique Argument information. This potentially gives you the entire sending activity of your account and is not&nbsp;restricted&nbsp;by our own internal storage limitations. Additionally, as Events are posted realtime you can have automated systems on your end to take action, such as removing an Unsubscribed address from your master mailing list.
23+
24+
&nbsp;
25+
26+
You can take things a step further by processing or analyzing the data to present it in intuitive charts and graphs and get much more usable information than we provide on our Statistics page. This also makes it possible to get segmented lists, such as all recipients that Opened last week, that our system does not currently provide.
27+
28+
&nbsp;
29+
30+
Although it does require a fair amount of setup, the benefits of the Event API are paramount. More information about setup can be found in our [SendGrid Event API Documentation](https://sendgrid.com/docs/API_Reference/Webhooks/index.html). If you have any specific questions about the Event API please do not hesitate to contact our Support team via email, chat, or phone call.
31+
32+
Need additional functionality with your Event API integration? Check out the open-source [Event Kit App](https://github.com/sendgrid/eventkit), as well as out friends over at [Keen.io](https://keen.io/).

source/Classroom/Basics/Account/Icon

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
seo:
3+
title: Adding an additional dedicated IP to your account
4+
description: Adding an additional dedicated IP to your account
5+
keywords: address, purchase, silver, dedicated, IP, account, add, additional
6+
title: Adding an additional dedicated IP to your account
7+
weight: 0
8+
layout: page
9+
zendesk_id: 200181948
10+
navigation:
11+
show: true
12+
---
13+
14+
In order to add additional IPs to your account please contact either SendGrid Support or the SendGrid Sales team. Please feel free to use the options below to contact Support.&nbsp;
15+
16+
Make sure you know and inform us if the IP will be for the Parent account, both Primary and [Subuser](http://support.sendgrid.com/forums/20690237-subusers "Link: http://support.sendgrid.com/forums/20690237-subusers") account, or Subuser account use only.&nbsp;
17+
18+
Additional IPs cost an extra $20 per IP per month.&nbsp;

0 commit comments

Comments
 (0)