Create a new API key

Create and configure a new API key by providing the necessary details in the request body.

POST
/api-keys
AuthorizationBearer <token>

In: header

Request Body

application/json

The details of the API key to create.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api-testnet.dual.network/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "permissions": [      {        "resource": "api-keys",        "crud": {          "read": true,          "create": true,          "update": true,          "delete": true        }      }    ]  }'
{
  "id": "string",
  "secret": "string"
}
{
  "code": 0,
  "message": "string",
  "details": {}
}
{
  "code": 0,
  "message": "string",
  "details": {}
}