Create an API credential

How to create an API credential via API

To create a new API credential, send a POST request to the /api/api_credentials endpoint, passing the resource arguments in the request body.

Request

POST https://provisioning.commercelayer.io/api/api_credentials

Arguments

Body Parameter
Type
Required

type

string

Required

attributes.name

string

Required

attributes.kind

string

Required

attributes.redirect_uri

string

Optional

attributes.expires_in

integer

Optional

attributes.mode

string

Optional

attributes.custom

boolean

Optional

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

relationships.organization

object

Required

relationships.role

object

Optional

Example

The following request creates a new API credential:

Last updated