Skip to main content
PATCH
/
api
/
v2
/
api-key
/
{apiKeyId}
Update API key
curl --request PATCH \
  --url https://demo.api.loopcrypto.xyz/api/v2/api-key/{apiKeyId} \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "name": "Loop API key",
  "grantPermissions": [
    "GetPaymentTypes"
  ],
  "revokePermissions": [
    "GetPaymentTypes"
  ]
}'
{
  "id": "1234567890abcdef",
  "name": "Loop API key",
  "apiKey": "550e8400-e29b-41d4-a716-446655440000",
  "permissions": [
    "CreateEntity",
    "GetPaymentTypes"
  ],
  "dateCreated": 1716211200
}

Authorizations

api-key
string
header
required
entity-id
string
header
required

Path Parameters

apiKeyId
string
required

The unique identifier of the API key to be updated. This must be a valid API key ID associated with your entity. This is not the API key value, but the unique identifier for the API key that can be obtained using the list API keys endpoint.

Body

application/json
name
string

(Optional) The new name that identifies the API key

Example:

"Loop API key"

grantPermissions
string[]

(Optional) The list of additional permissions to grant to the API key. These will be added to any existing permissions

Valid values: CreateEntities, UpdateEntities, CreateApiKeys, UpdateApiKey, GetApiKeys, DeactivateApiKey, CreateMerchants, UpdateMerchants, GetMerchants, CreatePaymentTypes, GetPaymentTypes, DeletePaymentTypes, CreatePayoutDestinations, GetPayoutDestinations, DeletePayoutDestinations, UpdatePayoutDestinations, CreatePaymentMethods, GetPaymentMethods, UpdatePaymentMethods, DeletePaymentMethods, CreatePayins, GetPayins, UpdatePayins, CreateCustomers, GetCustomers, CreateWebhooks, GetWebhooks, DeleteWebhooks, UpdateWebhooks, CreateWebhookSecret, GetWebhookSecret, GetTokens, CreateCheckoutSessions, UpdateCheckoutSessions, ListCheckoutSessions, GetCheckoutSessions, DeleteCheckoutSessions, CreateAuthTokens, CreateUsers, GetUsers, DeleteUsers

Example:
["GetPaymentTypes"]
revokePermissions
string[]

(Optional) The list of permissions to revoke from the API key. These will be removed from any existing permissions

Valid values: CreateEntities, UpdateEntities, CreateApiKeys, UpdateApiKey, GetApiKeys, DeactivateApiKey, CreateMerchants, UpdateMerchants, GetMerchants, CreatePaymentTypes, GetPaymentTypes, DeletePaymentTypes, CreatePayoutDestinations, GetPayoutDestinations, DeletePayoutDestinations, UpdatePayoutDestinations, CreatePaymentMethods, GetPaymentMethods, UpdatePaymentMethods, DeletePaymentMethods, CreatePayins, GetPayins, UpdatePayins, CreateCustomers, GetCustomers, CreateWebhooks, GetWebhooks, DeleteWebhooks, UpdateWebhooks, CreateWebhookSecret, GetWebhookSecret, GetTokens, CreateCheckoutSessions, UpdateCheckoutSessions, ListCheckoutSessions, GetCheckoutSessions, DeleteCheckoutSessions, CreateAuthTokens, CreateUsers, GetUsers, DeleteUsers

Example:
["GetPaymentTypes"]

Response

Ok

id
string
required

The unique identifier for the API key

Example:

"1234567890abcdef"

name
string
required

The name that identifies the API key

Example:

"Loop API key"

apiKey
string
required

The created API key

Example:

"550e8400-e29b-41d4-a716-446655440000"

permissions
string[]
required

The list of permissions that define what operations this API key can perform

Example:
["CreateEntity", "GetPaymentTypes"]
dateCreated
number
required

The date the API key was created, represented as a Unix timestamp in seconds.

Example:

1716211200

I