v1 of the MailMojo API
This package is automatically generated by the Swagger Codegen project:
- API version: 1.1.0
- Package version: 0.5.0
For more information, please visit https://mailmojo.dev
PHP 5.5.0 and later
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"eliksir/mailmojo-php-sdk": "0.5.0"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/mailmojo/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure. The following is an automatically generated example executing one operation, just to illustrate how the library is used in general:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: mailmojo_auth
MailMojo\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new MailMojo\Api\WebhookApi();
$id = 56; // int | ID of the webhook.
try {
$api_instance->deleteWebhook($id);
} catch (Exception $e) {
echo 'Exception when calling WebhookApi->deleteWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.mailmojo.no
Class | Method | HTTP request | Description |
---|---|---|---|
AccountApi | createAccount | POST /v1/accounts/ | Create an account. |
AccountApi | getAccountByUsername | GET /v1/accounts/{username}/ | Retrieve account details. |
AccountApi | getDomain | GET /v1/domains/{domain_id}/ | Retrieve domain details and authentication status. |
AccountApi | getDomains | GET /v1/domains/ | Retrieve a list of all domains and their status. |
AccountApi | updateAccount | POST /v1/accounts/{username}/ | Update account details. |
AutomationApi | getCampaignById | GET /v1/campaigns/{campaign_id}/ | Retrieve an automation campaign by id. |
ContactApi | getContactByEmail | GET /v1/contacts/{email}/ | Retrieve a contact in any list by email. |
ContactApi | getContacts | GET /v1/contacts/ | Retrieve all contacts across every list. |
ContactApi | getHistoricalContactStats | GET /v1/contacts/stats/ | Retrieve historical stats over contacts across every list. |
ContactApi | getSubscriberOnListByEmail | GET /v1/lists/{list_id}/subscribers/{email}/ | Retrieve a subscriber. |
ContactApi | getSubscribersOnList | GET /v1/lists/{list_id}/subscribers/ | Retrieve subscribers on a list. |
ContactApi | getUnsubscribedOnList | GET /v1/lists/{list_id}/unsubscribed/ | Retrieve unsubscribed contacts on a list. |
ContactApi | subscribeContactToList | POST /v1/lists/{list_id}/subscribers/ | Subscribe a contact to the email list. |
ContactApi | unsubscribeContactOnListByEmail | DELETE /v1/lists/{list_id}/subscribers/{email}/ | Unsubscribe a contact. |
ContactApi | updateContact | PATCH /v1/contacts/{email}/ | Update details about a contact. |
EmbedApi | createEmbedSession | POST /v1/embed/ | Create a new embedded application session. |
FormApi | formAddSubscriber | PATCH /v1/forms/{id}/subscribers/ | Add a subscriber through a form and track the conversion. |
FormApi | getFormById | GET /v1/forms/{id}/ | Retrieve a form. |
FormApi | getForms | GET /v1/forms/ | Retrieve all forms. |
FormApi | trackFormView | PATCH /v1/forms/{id}/track/view/ | Track a view of a form. |
FormApi | updateForm | PATCH /v1/forms/{id}/ | Update a form partially. |
ListApi | createList | POST /v1/lists/ | Create an email list. |
ListApi | createSegment | POST /v1/lists/{list_id}/segments/ | Create a segment in the email list. |
ListApi | getListById | GET /v1/lists/{list_id}/ | Retrieve an email list. |
ListApi | getLists | GET /v1/lists/ | Retrieve all email lists. |
ListApi | getSubscriberOnListByEmail | GET /v1/lists/{list_id}/subscribers/{email}/ | Retrieve a subscriber. |
ListApi | getSubscribersOnList | GET /v1/lists/{list_id}/subscribers/ | Retrieve subscribers on a list. |
ListApi | getUnsubscribedOnList | GET /v1/lists/{list_id}/unsubscribed/ | Retrieve unsubscribed contacts on a list. |
ListApi | importSubscribersToList | POST /v1/lists/{list_id}/subscribers/import/ | Subscribe contacts to the email list. |
ListApi | subscribeContactToList | POST /v1/lists/{list_id}/subscribers/ | Subscribe a contact to the email list. |
ListApi | unsubscribeContactOnListByEmail | DELETE /v1/lists/{list_id}/subscribers/{email}/ | Unsubscribe a contact. |
ListApi | updateList | PATCH /v1/lists/{list_id}/ | Update an email list partially. |
NewsletterApi | cancelNewsletter | PUT /v1/newsletters/{newsletter_id}/cancel/ | Cancel a newsletter. |
NewsletterApi | createNewsletter | POST /v1/newsletters/ | Create a newsletter draft. |
NewsletterApi | getNewsletterById | GET /v1/newsletters/{newsletter_id}/ | Retrieve a newsletter by id. |
NewsletterApi | getNewsletters | GET /v1/newsletters/ | Retrieve all newsletters. |
NewsletterApi | sendNewsletter | PUT /v1/newsletters/{newsletter_id}/send/ | Send a newsletter. |
NewsletterApi | testNewsletter | POST /v1/newsletters/{newsletter_id}/send_test/ | Send a test newsletter. |
NewsletterApi | updateNewsletter | PATCH /v1/newsletters/{newsletter_id}/ | Update a newsletter draft partially. |
PageApi | getPageById | GET /v1/pages/{id}/ | Retrieve a landing page. |
PageApi | getPages | GET /v1/pages/ | Retrieve all landing pages. |
PageApi | trackPageView | PATCH /v1/pages/{id}/track/view/ | Track a view of a landing page. |
PageApi | updatePage | PATCH /v1/pages/{id}/ | Update a landing page partially. |
SegmentApi | createSegment | POST /v1/lists/{list_id}/segments/ | Create a segment in the email list. |
TemplateApi | getTemplates | GET /v1/templates/ | Retrieve all templates. |
WebhookApi | createWebhook | POST /v1/webhooks/ | Create a webhook. |
WebhookApi | deleteWebhook | DELETE /v1/webhooks/{id}/ | Delete a webhook. |
- AddFormSubscriber
- BaseContact
- CampaignDetail
- CampaignStatistics
- Category
- Contact
- ContactList
- Domain
- Embed
- EmbedOptions
- Form
- FormConversion
- HistoricalContactsStats
- ImportResult
- InlineResponse200
- ListDetail
- MinimalSegment
- ModelList
- NewsletterCreation
- NewsletterDetail
- NewsletterSend
- NewsletterSendTest
- NewsletterUpdate
- Page
- PageMeta
- Schema
- Segment
- SegmentCreation
- SegmentTagPredicate
- Statistics
- Subscriber
- Template
- TrackFormView
- TrackPageView
- User
- UserCreation
- WebhookCreation
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://api.mailmojo.no/oauth/authorize/
- Scopes:
- account: Manage your MailMojo account.
- account_creation: Create new MailMojo accounts.
- account_creation.trial_30: Create new MailMojo accounts with a 30 day trial period.
- account_settings: Manage your MailMojo account settings.
- campaigns: Manage your automated campaigns.
- campaigns:read: Retrieve your automated campaigns.
- contacts: Manage your contacts across all your email lists.
- contacts:read: Retrieve your contacts across all your email lists.
- embed: Give you an embedded MailMojo application with access to your account.
- events: Track events on your forms and landing pages.
- forms: Manage your forms.
- forms:read: Retrieve your forms.
- lists: Manage your email lists, excluding subscribers.
- lists:read: Retrieve your email lists, excluding subscribers.
- newsletters: Manage your newsletters.
- newsletters:read: Retrieve your newsletters.
- pages: Manage your landing pages.
- pages:read: Retrieve your landing pages.
- subscribe: Add subscribers to email lists.
- templates: Manage your templates.
- templates:read: Retrieve your templates
- webhooks: Manage your webhooks.