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

Commit 1b631f0

Browse files
committed
Merge pull request #1820 from sendgrid/sender_api_docs
Add Sender API docs
2 parents 212d0b0 + d700779 commit 1b631f0

File tree

1 file changed

+220
-0
lines changed

1 file changed

+220
-0
lines changed
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
---
2+
layout: page
3+
weight: 0
4+
title: Sender Identities API
5+
seo:
6+
title: Sender Identities API
7+
description: The SendGrid Marketing Campaigns Sender Identities API
8+
keywords: sender, identities, api, marketing campaigns senders
9+
navigation:
10+
show: true
11+
---
12+
The Sender Identities API allows you to create and manage sender identities for Marketing Campaigns.
13+
14+
{% anchor h2 %}
15+
Create a Sender Identity [POST]
16+
{% endanchor %}
17+
18+
This endpoint allows you to create a sender identity.
19+
20+
Sender Identities are required to be verified before use. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`.
21+
22+
{% apiv3example post POST https://api.sendgrid.com/v3/senders %}
23+
{% apiv3requestbody %}
24+
{
25+
"nickname": "My Sender ID",
26+
"from": {
27+
"email": "[email protected]",
28+
"name": "Example INC"
29+
},
30+
"reply_to": {
31+
"email": "[email protected]",
32+
"name": "Example INC"
33+
},
34+
"address": "123 Elm St.",
35+
"address_2": "Apt. 456",
36+
"city": "Denver",
37+
"state": "Colorado",
38+
"zip": "80202",
39+
"country": "United States"
40+
}
41+
{% endapiv3requestbody %}
42+
43+
{% v3response %}
44+
{
45+
"id": 1,
46+
"nickname": "My Sender ID",
47+
"from": {
48+
"email": "[email protected]",
49+
"name": "Example INC"
50+
},
51+
"reply_to": {
52+
"email": "[email protected]",
53+
"name": "Example INC"
54+
},
55+
"address": "123 Elm St.",
56+
"address_2": "Apt. 456",
57+
"city": "Denver",
58+
"state": "Colorado",
59+
"zip": "80202",
60+
"country": "United States",
61+
"verified": true,
62+
"updated_at": 1449872165,
63+
"created_at": 1449872165,
64+
"locked": false
65+
}
66+
{% endv3response %}
67+
{% endapiv3example %}
68+
69+
{% anchor h2 %}
70+
Retrieve All Sender Identities [GET]
71+
{% endanchor %}
72+
73+
This endpoint allows you to retrieve a list of all of your sender identities.
74+
75+
{% apiv3example get GET https://api.sendgrid.com/v3/senders %}
76+
{% v3response %}
77+
{
78+
"result": [
79+
{
80+
"id": 1,
81+
"nickname": "My Sender ID",
82+
"from": {
83+
"email": "[email protected]",
84+
"name": "Example INC"
85+
},
86+
"reply_to": {
87+
"email": "[email protected]",
88+
"name": "Example INC"
89+
},
90+
"address": "123 Elm St.",
91+
"address_2": "Apt. 456",
92+
"city": "Denver",
93+
"state": "Colorado",
94+
"zip": "80202",
95+
"country": "United States",
96+
"verified": true,
97+
"updated_at": 1449872165,
98+
"created_at": 1449872165,
99+
"locked": false
100+
}
101+
]
102+
}
103+
{% endv3response %}
104+
{% endapiv3example %}
105+
106+
{% anchor h2 %}
107+
Update a Sender Identity [PATCH]
108+
{% endanchor %}
109+
110+
Updates to `from.email` require re-verification. If your domain has been whitelabeled it will auto verify on creation. Otherwise an email will be sent to the `from.email`.
111+
112+
Partial updates are allowed, but fields that are marked as "required" in the POST (create) endpoint must not be nil if that field is included in the PATCH request.
113+
114+
{% apiv3example patch PATCH https://api.sendgrid.com/v3/senders/{sender_id} %}
115+
116+
{% apiv3requestbody %}
117+
{
118+
"nickname": "My Sender ID",
119+
"from": {
120+
"email": "[email protected]",
121+
"name": "Example INC"
122+
},
123+
"reply_to": {
124+
"email": "[email protected]",
125+
"name": "Example INC"
126+
},
127+
"address": "123 Elm St.",
128+
"address_2": "Apt. 456",
129+
"city": "Denver",
130+
"state": "Colorado",
131+
"zip": "80202",
132+
"country": "United States"
133+
}
134+
{% endapiv3requestbody %}
135+
136+
{% v3response %}
137+
{
138+
"id": 1,
139+
"nickname": "My Sender ID",
140+
"from": {
141+
"email": "[email protected]",
142+
"name": "Example INC"
143+
},
144+
"reply_to": {
145+
"email": "[email protected]",
146+
"name": "Example INC"
147+
},
148+
"address": "123 Elm St.",
149+
"address_2": "Apt. 456",
150+
"city": "Denver",
151+
"state": "Colorado",
152+
"zip": "80202",
153+
"country": "United States",
154+
"verified": true,
155+
"updated_at": 1449872165,
156+
"created_at": 1449872165,
157+
"locked": false
158+
}
159+
{% endv3response %}
160+
{% endapiv3example %}
161+
162+
{% anchor h2 %}
163+
Delete a Sender Identity [DELETE]
164+
{% endanchor %}
165+
166+
This endpoint allows you to delete one of your sender identities.
167+
168+
{% apiv3example patch PATCH https://api.sendgrid.com/v3/senders/{sender_id} %}
169+
170+
{% v3response %}
171+
HTTP/1.1 204
172+
{% endv3response %}
173+
{% endapiv3example %}
174+
175+
{% anchor h2 %}
176+
Resend Sender Identity Verification [POST]
177+
{% endanchor %}
178+
179+
This endpoint allows you to resend the sender identity verification email.
180+
181+
{% apiv3example post POST https://api.sendgrid.com/v3/senders/{sender_id}/resend_verification %}
182+
183+
{% v3response %}
184+
HTTP/1.1 204
185+
{% endv3response %}
186+
{% endapiv3example %}
187+
188+
{% anchor h2 %}
189+
Retrieve a Specific Sender Identity [GET]
190+
{% endanchor %}
191+
192+
This endoint allows you to retrieve a specific sender identity.
193+
194+
{% apiv3example get GET https://api.sendgrid.com/v3/senders/{sender_id} %}
195+
196+
{% v3response %}
197+
{
198+
"id": 1,
199+
"nickname": "My Sender ID",
200+
"from": {
201+
"email": "[email protected]",
202+
"name": "Example INC"
203+
},
204+
"reply_to": {
205+
"email": "[email protected]",
206+
"name": "Example INC"
207+
},
208+
"address": "123 Elm St.",
209+
"address_2": "Apt. 456",
210+
"city": "Denver",
211+
"state": "Colorado",
212+
"zip": "80202",
213+
"country": "United States",
214+
"verified": true,
215+
"updated_at": 1449872165,
216+
"created_at": 1449872165,
217+
"locked": false
218+
}
219+
{% endv3response %}
220+
{% endapiv3example %}

0 commit comments

Comments
 (0)