new AdminClient(apiKey, options)
Description
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
apiKey |
string | The account-level key used to access your Postmark Account and manage servers and signatures. This is not the same as your server key. |
|
options |
ClientDetfaults |
<optional> |
The options used to create this client, if not specified, the postmark.defaults will be used. |
Returns:
AdminClient
Methods
-
createDomain(options, callback) → {Promise}
-
Create a Domain.
Parameters:
Name Type Description options
object The configuration options for the Domain to be created.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
createSenderSignature(options, callback) → {Promise}
-
Create a Sender Signature.
Parameters:
Name Type Description options
object The configuration options for the Sender Signature to be created.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
createServer(options, callback) → {Promise}
-
Create a new Server from which you may send and recieve email.
Parameters:
Name Type Description options
object The configuration options to be used when creating the new Server.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
deleteDomain(id, callback) → {Promise}
-
Delete a Domain.
Parameters:
Name Type Description id
number The ID for the Domain you wish to delete.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
deleteSenderSignature(id, callback) → {Promise}
-
Delete a Sender Signature.
Parameters:
Name Type Description id
number The ID for the Sender Signature you wish to delete.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
deleteServer(id, callback) → {Promise}
-
Delete a Server with the specified ID.
NOTE: Because this is a dangerous operation and can cause serious problems in your account, you must request that this API be enabled for your account from support@postmarkapp.com
Parameters:
Name Type Description id
number The ID of the Server you wish to delete.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
editDomain(id, options, callback) → {Promise}
-
Modify an existing Domain.
Parameters:
Name Type Description id
number The ID of the Domain to be modified.
options
object The updated options for the Domain to be modified.
callback
postmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
editSenderSignature(id, options, callback) → {Promise}
-
Modify an existing Sender Signature.
Parameters:
Name Type Description id
number The ID of the Sender Signature to be modified.
options
object The updated options for the Sender Sinature to be modified.
callback
postmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
editServer(id, options, callback) → {Promise}
-
Modify an existing Server.
Parameters:
Name Type Description id
number The ID of the Server you wish to edit.
options
object The options you wish to modify on the Server.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
getDomain(id, callback) → {Promise}
-
Get a single Domain by id.
Parameters:
Name Type Description id
number The ID for the Domain you wish to retrieve.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
getSenderSignature(id, callback) → {Promise}
-
Get a single Sender Signature by id.
Parameters:
Name Type Description id
number The ID for the Sender Signature you wish to retrieve.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
getServer(id, callback) → {Promise}
-
Retrieve information for a specific Server.
Parameters:
Name Type Description id
number The ID of the Server you wish to access.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
listDomains(query, callback) → {Promise}
-
Get a list of Domains associated with this account. By default, this method returns the first 100 domains in your account.
Parameters:
Name Type Argument Description query
object <optional>
An optional filter to be used when retrieving the list of Domains.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
listSenderSignatures(query, callback) → {Promise}
-
Get a list of Sender Signatures associated with this account. By default, this method returns the first 100 signatures in your account.
Parameters:
Name Type Argument Description query
object <optional>
An optional filter to be used when retrieving the list of Sender Signatures.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
listServers(query, callback) → {Promise}
-
Get a list of Servers associated with this account. By default, the first 100 Servers associated with the account are used.
Parameters:
Name Type Argument Description query
object <optional>
An optional filter to use when retrieving the list of Servers.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
requestNewDKIMForSenderSignature(id, callback) → {Promise}
-
Request a new DKIM for the specified Sender Signature.
Parameters:
Name Type Description id
number The ID for the Sender Signature for which you wish have a new DKIM issued.
callback
PostmarkCallback A standard callback that is called when the API request completes.
- Deprecated:
-
- rotateDKIMForDomain replaces this method
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
resendSenderSignatureConfirmation(id, callback) → {Promise}
-
Request that a new confirmation email be sent to the email address associated with a Sender Signature.
Parameters:
Name Type Description id
number The ID for the Sender Signature for which you wish to have a confirmation re-sent.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
rotateDKIMForDomain(id, callback) → {Promise}
-
Rotate DKIM keys for the specified Domain.
Parameters:
Name Type Description id
number The ID for the for which you wish have a new DKIM issued.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
verifyDomainSPF(id, callback) → {Promise}
-
Request that the SPF records for Domain be verified.
Parameters:
Name Type Description id
number The ID for the Domain for which you wish to have the SPF verified.
callback
PostmarkCallback A standard callback that is called when the API request completes.
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise
-
verifySenderSignatureSPF(id, callback) → {Promise}
-
Request that the SPF records for Sender Signature be verified.
Parameters:
Name Type Description id
number The ID for the Sender Signature for which you wish to have the SPF verified.
callback
PostmarkCallback A standard callback that is called when the API request completes.
- Deprecated:
-
- verifyDomainSPF replaces this method
Returns:
If no callback is passed, returns a Promise with the JSON response from the API (or error).
- Type
- Promise