Create a service credential

Creates a service credential.

SecuritySecretApiKey or JWT or ApplicationJWT
Request
path Parameters
type
required
string

Type of service credential.

Enum: "smtp" "webhook" "mailgun" "sendgrid" "aws-ses" "oauth2" "postmark" "experian" "taxjar" "avalara" … 1 more
Request Body schema: application/json

Service credential resource.

Any of:

SMTP credential.

host
required
string

SMTP host name.

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.

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"
Responses
201

Service credential created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
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"
303

Existing service credential retrieved.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/service-credentials/{type}
Request samples
application/json
{
  • "status": "active",
  • "host": "string",
  • "port": 25,
  • "encryption": "none",
  • "auth": {
    }
}
Response samples
application/json
{
  • "id": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
  • "hash": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
  • "status": "active",
  • "deactivationTime": "2019-08-24T14:15:22Z",
  • "type": "smtp",
  • "host": "string",
  • "port": 25,
  • "encryption": "none",
  • "auth": {
    },
  • "_links": [
    ]
}