Skip to main content

AI Subscriptions

Purchase and manage team AI subscriptions and payment methods.

GET /api/teams/{id}/ai/subscriptions

Get team's AI subscriptions.

Response:

{
"_links": {
"self": { "href": "/api/teams/{id}/ai/subscriptions" }
},
"_embedded": {
"inf:ai-subscription": [
{
"id": "sub-uuid",
"teamId": "team:analytics",
"plan": "standard",
"seats": 10,
"status": "active",
"currentPeriodStart": "2024-01-01T00:00:00Z",
"currentPeriodEnd": "2024-02-01T00:00:00Z",
"cancelAtPeriodEnd": false
}
]
},
"start": 0,
"count": 1,
"total": 1
}

POST /api/teams/{id}/ai/subscriptions/_purchase

Purchase a new AI subscription.

Permissions: Team admin

Request Body:

{
"plan": "standard",
"seats": 10,
"paymentMethodId": "card-uuid"
}

Response:

201 Created with subscription object.

Use Case:

Add AI seats to a team by purchasing a subscription.


Payment Cards

GET /api/teams/{id}/ai/cards

Get team's payment methods.

Response:

{
"_links": {
"self": { "href": "/api/teams/{id}/ai/cards" }
},
"_embedded": {
"inf:payment-card": [
{
"id": "card-uuid",
"teamId": "team:analytics",
"last4": "4242",
"brand": "Visa",
"expiryMonth": 12,
"expiryYear": 2025,
"isDefault": true
}
]
},
"start": 0,
"count": 1,
"total": 1
}

POST /api/teams/{id}/ai/cards

Add a payment method.

Request Body:

{
"token": "stripe-token",
"isDefault": true
}

DELETE /api/teams/{id}/ai/cards/{cardId}

Remove a payment method.

Response:

204 No Content on success.