Upsert a credential

Creates or updates (upserts) an authentication credential with a specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

Credential resource.

username
required
string

Username associated with the credential.

password
required
string <password>

Password associated with the credential.

customerId
required
string (CustomerId) <= 50 characters

Customer resource ID.

expiredTime
string <date-time>

Date and time when the credential expires.

Responses
200

Credential updated.

Response Schema: application/json
username
required
string

Username associated with the credential.

customerId
required
string (CustomerId) <= 50 characters

Customer resource ID.

id
string <= 50 characters

ID of the credential.

expiredTime
string <date-time>

Date and time when the credential expires.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer"
201

Credential created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
username
required
string

Username associated with the credential.

customerId
required
string (CustomerId) <= 50 characters

Customer resource ID.

id
string <= 50 characters

ID of the credential.

expiredTime
string <date-time>

Date and time when the credential expires.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

put/credentials/{id}
Request samples
application/json
{
  • "username": "string",
  • "password": "pa$$word",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "expiredTime": "2019-08-24T14:15:22Z"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "username": "string",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "expiredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}