Skip to content

Creates a merchant API key

Request

POST {{baseURL}}/v2/api-keys

Creates a new API key for a merchant.

If the API token used for this endpoint was created from a partner API key, an API key can be created only for merchants associated with that partner.

If the API token used for this endpoint was created from a merchant API key, an API key can be created only for that merchant.

See Also:
To list available keys, see GET /v2/api-keys.
To revoke an API key, see DELETE /v2/api-keys/{{clientId}}.

Security
Bearer
Bodyapplication/json
merchantIdstring, (uuid)required

Identifies the merchant identifier.

Example: 5611f824-48ef-4255-978d-91ce13953bbd

Example:"5611f824-48ef-4255-978d-91ce13953bbd"
apiKeyNamestring, non-emptyrequired

Specifies a display name for the API key.

Example: Production integration key

Example:"Production integration key"
curl -i -X POST \
  https://sandbox.api.flute.com/v2/api-keys \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "merchantId": "0b627967-4204-4d7a-aa13-e6eb0d58f543",
    "apiKeyName": "Production API Key"
  }'

Responses

OK

Bodyapplication/json
clientIdstring, (uuid)

Indicates the client identifier.

Example: 919c19ac-09cf-40c1-b093-413b9cabde43

Example:"919c19ac-09cf-40c1-b093-413b9cabde43"
clientSecretstring or null, (UUID)

Indicates the client secret.

The client secret is returned once and only during its creation here. Store it securely. Protect the clientSecret as if it were a password.

Example: bcaa0840-2872-44ea-9122-552a804a054a

Example:"bcaa0840-2872-44ea-9122-552a804a054a"
Response
{ "clientId": "97e7c13c-059c-4734-b017-2a20847a79d0", "clientSecret": "1f80d6e1-9901-48b6-a862-6cfad1612e99" }