All URIs are relative to https://api.mailmojo.no
Method | HTTP request | Description |
---|---|---|
get_page_by_id | GET /v1/pages/{id}/ | Retrieve a landing page. |
get_pages | GET /v1/pages/ | Retrieve all landing pages. |
track_page_view | PATCH /v1/pages/{id}/track/view/ | Track a view of a landing page. |
update_page | PATCH /v1/pages/{id}/ | Update a landing page partially. |
Page get_page_by_id(id)
Retrieve a landing page.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.PageApi(mailmojo_sdk.ApiClient(configuration))
id = 56 # int | ID of the landing page to retrieve.
try:
# Retrieve a landing page.
api_response = api_instance.get_page_by_id(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PageApi->get_page_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of the landing page to retrieve. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Page] get_pages()
Retrieve all landing pages.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.PageApi(mailmojo_sdk.ApiClient(configuration))
try:
# Retrieve all landing pages.
api_response = api_instance.get_pages()
pprint(api_response)
except ApiException as e:
print("Exception when calling PageApi->get_pages: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrackPageView track_page_view(id, view)
Track a view of a landing page.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.PageApi(mailmojo_sdk.ApiClient(configuration))
id = 56 # int | ID of the page to track view of.
view = mailmojo_sdk.TrackPageView() # TrackPageView |
try:
# Track a view of a landing page.
api_response = api_instance.track_page_view(id, view)
pprint(api_response)
except ApiException as e:
print("Exception when calling PageApi->track_page_view: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of the page to track view of. | |
view | TrackPageView |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Page update_page(id, page=page)
Update a landing page partially.
from __future__ import print_function
import time
import mailmojo_sdk
from mailmojo_sdk.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: mailmojo_auth
configuration = mailmojo_sdk.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = mailmojo_sdk.PageApi(mailmojo_sdk.ApiClient(configuration))
id = 56 # int | ID of the landing page to update.
page = mailmojo_sdk.Page() # Page | (optional)
try:
# Update a landing page partially.
api_response = api_instance.update_page(id, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling PageApi->update_page: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of the landing page to update. | |
page | Page | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]