milmilmilmil
API Reference

A P I Tokens

Personal API tokens used by CLI/agents for non-interactive auth

GET
/api/v1/api-tokens

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/api-tokens"
[  {    "id": "string",    "name": "string",    "token_prefix": "string",    "last_used_at": "2019-08-24T14:15:22Z",    "last_ip": "string",    "last_user_agent": "string",    "created_at": "2019-08-24T14:15:22Z",    "is_current": true  }]
POST
/api/v1/api-tokens

Creates a named API token. The full token value is returned only once in this response — store it securely.

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/api-tokens" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "name": "string",  "token_prefix": "string",  "last_used_at": "2019-08-24T14:15:22Z",  "last_ip": "string",  "last_user_agent": "string",  "created_at": "2019-08-24T14:15:22Z",  "is_current": true,  "token": "string"}
GET
/api/v1/api-tokens/current

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/api-tokens/current"
{  "id": "string",  "name": "string",  "token_prefix": "string",  "last_used_at": "2019-08-24T14:15:22Z",  "last_ip": "string",  "last_user_agent": "string",  "created_at": "2019-08-24T14:15:22Z",  "is_current": true}
DELETE
/api/v1/api-tokens/others

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Response Body

curl -X DELETE "https://example.com/api/v1/api-tokens/others"
Empty
DELETE
/api/v1/api-tokens/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Pass an API token obtained from POST /api/v1/auth/login or POST /api/v1/api-tokens. Tokens have the prefix mlml_.

In: header

Path Parameters

id*string

Token ID

Response Body

curl -X DELETE "https://example.com/api/v1/api-tokens/string"
Empty