All URIs are relative to https://api.mailmojo.no
| Method | HTTP request | Description |
|---|---|---|
| create_account | POST /v1/accounts/ | Create an account. |
| get_account_by_username | GET /v1/accounts/{username}/ | Retrieve account details. |
| get_domain | GET /v1/domains/{domain}/ | Retrieve domain details and authentication status. |
| update_account | POST /v1/accounts/{username}/ | Update account details. |
User create_account(user)
Create an account.
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.AccountApi(mailmojo_sdk.ApiClient(configuration))
user = mailmojo_sdk.UserCreation() # UserCreation |
try:
# Create an account.
api_response = api_instance.create_account(user)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->create_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user | UserCreation |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User get_account_by_username(username)
Retrieve account details.
This endpoint can be used to get details about your own account, or a subuser associated with you as a partner. If the username of your current authenticated user is unknown, you may use the special username 'me' to retrieve details about the authenticated user account.
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.AccountApi(mailmojo_sdk.ApiClient(configuration))
username = 'username_example' # str | Username of the account to get details for, or the special username `me` to get details about your authenticated user.
try:
# Retrieve account details.
api_response = api_instance.get_account_by_username(username)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->get_account_by_username: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| username | str | Username of the account to get details for, or the special username `me` to get details about your authenticated user. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Domain get_domain(domain)
Retrieve domain details and authentication status.
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.AccountApi(mailmojo_sdk.ApiClient(configuration))
domain = 'domain_example' # str |
try:
# Retrieve domain details and authentication status.
api_response = api_instance.get_domain(domain)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->get_domain: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| domain | str |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User update_account(username)
Update account details.
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.AccountApi(mailmojo_sdk.ApiClient(configuration))
username = 'username_example' # str | Username of the user to update.
try:
# Update account details.
api_response = api_instance.update_account(username)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->update_account: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| username | str | Username of the user to update. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]