Create or update a credential with predefined ID

Create or update a credential with predefined identifier string.

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

The resource identifier string.

Request Body schema: application/json

Credential resource.

username
required
string

Credential's username.

password
required
string <password>

The credential's password.

customerId
required
string (CustomerId) <= 50 characters

The customer resource ID. Defaults to UUID v4.

expiredTime
string <date-time>

The credential's expired time.

Responses
200

Credential was updated.

Response Schema: application/json
username
required
string

Credential's username.

customerId
required
string (CustomerId) <= 50 characters

The customer resource ID. Defaults to UUID v4.

id
string <= 50 characters

The credential identifier string.

expiredTime
string <date-time>

The credential's expired time.

Array of Self (object) or CustomerLink (object) non-empty

The links related to resource.

Array (non-empty)
Any of:
href
required
string

The link URL.

rel
required
string

The link type.

Value: "self"
201

Credential was created.

Response Headers
Location
string <uri>

The location of the related resource.

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

Credential's username.

customerId
required
string (CustomerId) <= 50 characters

The customer resource ID. Defaults to UUID v4.

id
string <= 50 characters

The credential identifier string.

expiredTime
string <date-time>

The credential's expired time.

Array of Self (object) or CustomerLink (object) non-empty

The links related to resource.

Array (non-empty)
Any of:
href
required
string

The link URL.

rel
required
string

The link type.

Value: "self"
401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

422

Invalid data was sent.

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