Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Add send custom email to contact by API #190

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions source/includes/_api_endpoint_emails.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,35 @@ assetAttachments|array|Array of asset ids
}
```

### Send Custom HTML email to Contact
```php
<?php
$email = $emailApi->sendCustomToContact($emailId, $params);
```
Send a custom HTML email to an existing contact. This event is saved to contact's profile, same behavior as Send email button from contact's detail page.

#### HTTP Request

`POST /emails/contact/{contactId}/send/custom`

**Post Parameters**

Name|Type|Description
----|----|-----------
$params|array|Array of parameters (fromEmail - required, fromName, replyToEmail, replyToName, subject - required, content - required)

#### Response

`Expected Response Code: 200`

**Properties**
```json
{
"success": 1,
"trackingHash" : "xxxxxx"
}
```

### Send Email to Segment
```php
<?php
Expand Down
Loading