Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 81 additions & 2 deletions source/includes/rest/_accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@
<td><code>href</code></td>
<td>The url designated for retrieving the account record via the REST API.</td>
</tr>
<tr>
<td><code>default_email_address_id</code></td>
<td>A read-only id of the account's default From address in <code>sending_addresses</code>. Returns <code>null</code> if the account has no default From address or its default address has been deleted. Only returned when <a href="#fetch-an-account">fetching an account</a>.</td>
</tr>
<tr>
<td><code>sending_addresses</code></td>
<td>A read-only list of the account's email addresses, including unverified ones. Only returned when <a href="#fetch-an-account">fetching an account</a>. Refer to <a href="#sending-addresses">Sending addresses</a> for an overview of the properties returned here.</td>
</tr>
<tr>
<td><code>links</code></td>
<td>An object containing URLs for campaign and conversion resources. Note, conversions are represented as "Goals".</td>
Expand Down Expand Up @@ -191,13 +199,84 @@ client.fetchAccount(accountId)
> The response looks like this:

```json
# The accounts property is an array of one account object.
# The accounts property is an array of one account object,
# which also includes the account's sending addresses.
{
"links": { ... },
"accounts": [{ ... }]
"accounts": [{
"id": "9999999",
"name": "Acme, Inc.",
...
"default_email_address_id": "1234567",
"sending_addresses": [
{
"id": "1234569",
"email": "support@acme.com",
"is_default": false,
"verified": true,
"auto_generated": false
},
{
"id": "1234568",
"email": "news@acme.com",
"is_default": false,
"verified": true,
"auto_generated": false
},
{
"id": "1234567",
"email": "john@acme.com",
"is_default": true,
"verified": true,
"auto_generated": false
}
]
}]
}
```

### Sending addresses

Fetching a single account also returns the account's email addresses, newest first. Only those
with `verified: true` can be used as a From address. Deleted addresses are not included. Listing
accounts does not return them.

<table>
<thead>
<tr>
<th>Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>A read-only Drip generated id used to identify the address.</td>
</tr>
<tr>
<td><code>email</code></td>
<td>The email address.</td>
</tr>
<tr>
<td><code>is_default</code></td>
<td>Returns true for the account's default From address, which emails without their own From address are sent from.</td>
</tr>
<tr>
<td><code>verified</code></td>
<td>Returns true if Drip can send from this address: it is on a sending domain you have authenticated in Drip, or it is an address Drip generated for the account. Unverified addresses are listed, but cannot be used as a From address until their domain is authenticated.</td>
</tr>
<tr>
<td><code>auto_generated</code></td>
<td>Returns true for the no-reply address Drip creates for new accounts.</td>
</tr>
</tbody>
</table>

`default_email_address_id` is `null` when the account has no default From address, or when
its default address has been deleted. A `null` value does not mean emails have no From
address: `default_from_email` still shows the address emails without their own From address
are sent from.

### HTTP Endpoint

`GET /v2/accounts/:account_id`
Expand Down
5 changes: 5 additions & 0 deletions source/includes/rest/_campaigns.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "SEO Email Course",
"from_name": "John Doe",
"from_email": "john@example.com",
"reply_to": "support@example.com",
"postal_address": "123 Anywhere St\nFresno, CA 99999",
"minutes_from_midnight": 440,
"localize_sending_time": true,
Expand Down Expand Up @@ -75,6 +76,10 @@
<td><code>from_email</code></td>
<td>A "from email" that appears in your sent emails. This setting overrides the account's default from email.</td>
</tr>
<tr>
<td><code>reply_to</code></td>
<td>The Reply-To address set on the Email Series Campaign, or <code>null</code> if none is set. When it is <code>null</code>, replies go to the From address.</td>
</tr>
<tr>
<td><code>postal_address</code></td>
<td>As required by the <a href="http://1.usa.gov/YgrzFP" target="_blank">CAN-SPAM Act</a>, this is a postal address used for all sent emails.</td>
Expand Down
Loading