POST
/
teams
/
{team}
/
api-credentials
curl --request POST \
  --url https://api.altostrat.io/teams/{team}/api-credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "abilities": [
    "<string>"
  ],
  "expires_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "api_key": "<string>"
}

Authorizations

Authorization
string
header
required

Standard OAuth2 flow for user authentication. Use Authorization Code Grant or Implicit Grant. JWT Bearer tokens obtained are used for subsequent requests.

Path Parameters

team
string
required

UUID of the Team.

Body

application/json
name
string
required

A descriptive name for the API token.

Maximum length: 100
expires_at
string | null

Optional expiration date/time for the token. Must be after tomorrow.

Response

200
application/json
API credential created successfully. Includes the full API key.
id
string
required
name
string
required
team_id
string
required
created_at
string
required
updated_at
string
required
api_key
string
required

The full API key string (format: {tokenId}:{teamId}:{secret}). Returned ONLY on creation.

abilities
string[] | null

(Legacy/Unused?) List of abilities granted by the token. Modern permissions use JWT scopes.

expires_at
string | null
last_used_at
string | null