> The Pylo GraphQL endpoint, request format, and generated operations

# GraphQL API

Pylo's public API is GraphQL. The admin panel runs on the same API, so everything you can do in the
UI, you can do here.

## Endpoint

```
https://api.pyloapp.com/graphql
```

> **Authentication**
> All requests require authentication: a Bearer token from user login or an API token created in the
> admin panel. See [Authentication](/authentication/overview).

## Making requests

```bash filename="terminal"
curl -X POST https://api.pyloapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "pylo-api-key: YOUR_API_KEY" \
  -d '{ "query": "query { health { data { up } } }"}'
```

## Generated operations

Pylo generates GraphQL operations for each entity you define:

| Operation       | Pattern          | Example          |
| --------------- | ---------------- | ---------------- |
| List query      | `{entity}List`   | `customerList`   |
| By-ID query     | `{entity}ById`   | `customerById`   |
| Create mutation | `create{Entity}` | `createCustomer` |
| Update mutation | `update{Entity}` | `updateCustomer` |
| Delete mutation | `delete{Entity}` | `deleteCustomer` |

## System entities

Built-in entities follow the same patterns:

| Entity       | Description                        |
| ------------ | ---------------------------------- |
| `PyloUser`   | User accounts and authentication   |
| `PyloMedia`  | Files and media uploads            |
| `PyloApiKey` | API tokens for programmatic access |
| `PyloApp`    | Application configuration          |

Next: [Queries & Mutations](/reference/queries-and-mutations)
