POST
/
users
/
generateApiKey
curl --request POST \
  --url https://api.pinata.cloud/users/generateApiKey \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyName": "<string>",
  "permissions": {
    "admin": true,
    "endpoints": {
      "data": {
        "pinList": true,
        "userPinnedDataTotal": true
      },
      "pinning": {
        "hashMetadata": true,
        "hashPinPolicy": true,
        "pinByHash": true,
        "pinFileToIPFS": true,
        "pinJSONToIPFS": true,
        "pinJobs": true,
        "unpin": true,
        "userPinPolicy": true
      }
    }
  },
  "maxUses": 123
}'
"<any>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Body is comprised of keyName, permissions, and maxUses (optional).
keyName
string
required
permissions
object
required
maxUses
integer

Response

200
application/json
{ "pinata_api_key": "KEY", "pinata_api_secret": "SECRET", "JWT": "JWT" }

The response is of type any.