Skip to main content
POST
/
api
/
v2
/
api-key
Create API key
curl --request POST \
  --url https://demo.api.loopcrypto.xyz/api/v2/api-key \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --header 'entity-id: <api-key>' \
  --data '{
  "name": "Loop API key",
  "grantPermissions": [
    "CreateEntity"
  ]
}'
{
  "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

Body

application/json
name
string
required

The name that identifies the API key

Example:

"Loop API key"

grantPermissions
string[]
required

The list of grant permissions that define what operations this API key is authorized to perform

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:
["CreateEntity"]

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