Skip to main content
PUT
/
team
/
api-keys
Create a team-level API key
curl --request PUT \
  --url https://api.wirespeed.co/team/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "role": "ADMIN",
  "expirationDays": 123
}
'
{
  "id": "<string>",
  "teamId": "<string>",
  "userId": "<string>",
  "expiration": "<string>",
  "role": "ADMIN",
  "name": "<string>",
  "createdAt": "<string>",
  "lastUsed": "<string>",
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Name for the team API key (1-100 characters)

role
enum<string>
required

Role permissions to assign to the team API key

Available options:
ADMIN,
ANALYST,
VIEWER
expirationDays
number
required

Number of days until the team API key expires

Response

id
string
required

Unique identifier for the API key

teamId
string
required

ID of the team this API key belongs to

userId
string
required

ID of the user who created this API key

expiration
string
required

Expiration date and time for the API key

role
enum<string>
required

Role permissions assigned to this API key

Available options:
ADMIN,
ANALYST,
VIEWER
name
string
required

Name assigned to the API key

createdAt
string
required

Timestamp when the API key was created

lastUsed
string | null

Timestamp when the API key was last used

token
string

The generated team API key token (only returned once upon creation)