Create a credential

Request

Creates an authentication credential.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Credential resource.

usernamestringrequired

Username associated with the credential.

passwordstring, (password)write-onlyrequired

Password associated with the credential.

customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
expiredTimestring or null, (date-time)

Date and time when the credential expires.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/credentials \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "username": "string",
    "password": "pa$$word",
    "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
    "expiredTime": "2019-08-24T14:15:22Z"
  }'

Responses

Credential created.

Headers
Locationstring, (uri)

Location of the related resource.

Example:"https://api.rebilly.com/example"
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the credential.

Example:"cus_crd_0YV9Y706QGCB39FQD380G1ZHZH"
usernamestringrequired

Username associated with the credential.

customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
expiredTimestring or null, (date-time)

Date and time when the credential expires.

Response
{ "id": "cus_crd_0YV9Y706QGCB39FQD380G1ZHZH", "username": "string", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "expiredTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }