Retrieve service credentials

Retrieves a list of service credentials.

SecuritySecretApiKey or JWT
Request
path Parameters
type
required
string

Type of service credential.

Enum: "smtp" "webhook" "mailgun" "sendgrid" "aws-ses" "oauth2" "postmark" "experian" "taxjar" "avalara" … 1 more
query Parameters
filter
string

Filters the collection items. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filter with collections.

limit
integer [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offset
integer >= 0

Specifies the starting point within the collection of items to be returned.

sort
Array of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -.

q
string

Use this field to perform a partial search of text fields.

Responses
200

List of service credentials retrieved.

Response Schema: application/json
Array
host
required
string

SMTP host name.

type
required
string

Type of credential.

id
string <= 36 characters

ID of the credential.

hash
string <= 36 characters
Deprecated

ID of the credential. Use id field instead.

status
string

Status of the credential.

Enum: Description
active

Credential is active and can be used.

inactive

Credential is temporarily inactivated and cannot be used until reactivated.

deactivated

Credential is permanently deactivated and cannot be reactivated.

deactivationTime
string or null <date-time>

Date and time when the credential is deactivated.

port
integer [ 1 .. 65535 ]
Default: 25

SMTP port value.

encryption
string
Default: "none"

Encryption value.

Enum: "none" "tls" "ssl"
object (SmtpAuthorization)

Authentication type and details.

type
required
string
Default: "none"
Array of objects (SelfLink)

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

get/service-credentials/{type}
Request samples
// type is required, other parameters are optional
const firstCollection = await api.serviceCredentials.getAll({type: 'webhook'});

// alternatively you can specify one or more of them
const params = {type: 'webhook', limit: 20, offset: 100};
const secondCollection = await api.serviceCredentials.getAll(params);

// access the collection items, each item is a ServiceCredential
secondCollection.items.forEach(serviceCredential => console.log(serviceCredential.fields.status));
Response samples
application/json
[
  • {
    }
]