Documentation
MilaMila.gg

Get Started

Core

REST API

Agents

Pricing

Back to Mila
REST API

Servers

Servers are collaborative workspaces where content is organized. Each document, sheet, or slide can belong to a server or to your personal files (no server).

By default, content created via the API is saved to your personal files. Pass a server_id when creating content to place it in a specific server.


List Servers

Endpoint
GET /v1/servers

Returns all servers accessible to your API key. No scope required.

bash
curl https://api.mila.gg/v1/servers \
  -H "Authorization: Bearer mila_sk_your_key_here"

Response:

JSON
{
  "success": true,
  "data": [
    {
      "id": "xK9mP2wQ",
      "name": "Engineering",
      "uuid": "abc123",
      "description": "Engineering team workspace",
      "profile_image_url": null,
      "created_at": "2026-01-15T10:00:00.000Z",
      "updated_at": "2026-02-20T14:30:00.000Z"
    }
  ]
}

Filtering Content by Server

All list endpoints (GET /documents, GET /sheets, GET /slides) accept an optional server_id query parameter:

ValueEffect
(omitted)Returns all accessible content (personal + all servers)
personalReturns only personal files (not in any server)
<id>Returns only content in that specific server

Examples:

bash
# All documents across personal files and all servers
curl https://api.mila.gg/v1/documents \
  -H "Authorization: Bearer mila_sk_your_key_here"

# Only personal documents
curl "https://api.mila.gg/v1/documents?server_id=personal" \
  -H "Authorization: Bearer mila_sk_your_key_here"

# Only documents in a specific server
curl "https://api.mila.gg/v1/documents?server_id=xK9mP2wQ" \
  -H "Authorization: Bearer mila_sk_your_key_here"

Creating Content in a Server

Pass server_id in the request body when creating documents, sheets, or slides:

bash
curl -X POST https://api.mila.gg/v1/documents \
  -H "Authorization: Bearer mila_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Sprint Planning",
    "content": "<h1>Sprint 24</h1><p>Goals for this sprint...</p>",
    "server_id": "xK9mP2wQ"
  }'

If server_id is omitted or null, the content is saved to your personal files. If the server doesn't exist or you don't have access, you'll get a 400 error.