Skip to main content
POST
/
api-key
Create an API key
curl --request POST \
  --url https://app.myhero.so/api-key \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "workspace_ids": [
    "<string>"
  ],
  "expires_in_days": 1
}
'
{
  "data": {
    "accessToken": "<string>",
    "tokenId": "<string>",
    "expiresAt": 123
  }
}

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
name
string
required
Minimum string length: 1
workspace_scope
enum<string>
required
Available options:
all,
specific
workspace_ids
string[]
Minimum string length: 1
expires_in_days
integer | null
Required range: x > 0

Response

201 response

data
object
required