# Management API

Automate project administration, flag changes and user or segment synchronization with the management API at `https://api.dipswitch.co`. Its `/v1` routes use organization API tokens, which an owner or admin creates in the panel. Keep a token on the server or in your CI secret store.

Send the token as a Bearer credential. Every token has the same organization-wide access to project resources. Members, invitations, organization management, billing, usage and token management require a member session. A request with a Bearer token uses the token even when it also carries a panel session cookie.

```ts
export async function listProjects(token: string): Promise<unknown> {
  const response = await fetch('https://api.dipswitch.co/v1/projects', {
    headers: { Authorization: `Bearer ${token}` },
  })
  if (!response.ok) throw new Error(`Dipswitch returned ${response.status}`)
  return response.json()
}
```

Import the [generated Management API specification](/docs/api.openapi.json) into an OpenAPI tool to browse every operation, request and response. The [Edge specification](/docs/edge.openapi.json) covers flag evaluation. See [Rate limits](/docs/rate-limits/) for retry behavior.
