Tokens
API token management
GET
/api/tokensList API Tokens
List all API tokens for the authenticated user.
Auth:OAuth2
Responses
200Tokens retrieved successfully
array of
| Field | Type | Description |
|---|---|---|
| id | string | |
| label | string | |
| maxPerTransaction | number | |
| dailyLimit | number | |
| monthlyLimit | number | |
| networks | string[] | show nested schemaarray of string |
| createdAt | string<date-time> | |
| revoked | boolean |
401Unauthorized - invalid or missing authentication
| Field | Type | Description |
|---|---|---|
| error | string | |
| error_description | string | |
| message | string |
Example (cURL)
curl -X GET 'https://api.agnic.ai/api/tokens' \
-H 'X-Agnic-Token: YOUR_TOKEN'POST
/api/generate-n8n-tokenCreate API Token
Generate a new API token with specified spending limits.
Auth:OAuth2
Request body *
| Field | Type | Description |
|---|---|---|
| maxPerTransaction* | number | Maximum payment per transaction in USD |
| dailyLimit* | number | Daily spending limit in USD |
| monthlyLimit* | number | Monthly spending limit in USD |
| networks | "base" | "solana"[] | show nested schemaarray of "base" | "solana" |
| label | string | Optional label for the token |
Responses
200Token created successfully
| Field | Type | Description |
|---|---|---|
| token | string | The API token (only shown once) |
| id | string | |
| label | string |
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string | |
| error_description | string | |
| message | string |
401Unauthorized - invalid or missing authentication
object — circular
Example (cURL)
curl -X POST 'https://api.agnic.ai/api/generate-n8n-token' \
-H 'X-Agnic-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"key":"value"}'POST
/api/revoke-tokenRevoke API Token
Revoke an existing API token.
Auth:OAuth2
Request body *
| Field | Type | Description |
|---|---|---|
| tokenId* | string | ID of the token to revoke |
Responses
200Token revoked successfully
| Field | Type | Description |
|---|---|---|
| success | boolean | |
| message | string |
401Unauthorized - invalid or missing authentication
| Field | Type | Description |
|---|---|---|
| error | string | |
| error_description | string | |
| message | string |
404Token not found
Example (cURL)
curl -X POST 'https://api.agnic.ai/api/revoke-token' \
-H 'X-Agnic-Token: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"key":"value"}'