> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin API

> Comprehensive guide to the Mighty Networks Admin API

## About the Admin API

The Mighty Networks Admin API provides programmatic access to manage and automate your Network operations. With the Admin API, you can manage members, content, events, and more.

## Base URL

All API requests should be made to:

```
https://api.mn.co/admin
```

## Authentication

The Admin API uses Bearer token authentication. All requests must include a valid API token.

> [card] [Authentication Guide](https://docs.mightynetworks.com/authentication.md)
>
> Learn how to generate tokens, authenticate requests, and implement security best practices.

## Getting Started

> [card] [Quickstart Guide](https://docs.mightynetworks.com/quickstart.md)
>
> Make your first API call in under 5 minutes.

> [card] [Authentication](https://docs.mightynetworks.com/authentication.md)
>
> Set up authentication and manage API tokens.

## Core Resources

The Admin API provides access to the following resources:

### Networks

Manage Network settings, information, and configuration.

### Members

* List and search members
* View member profiles and activity
* Update member information
* Manage member permissions and roles

### Content & Posts

* Create, read, update, and delete posts
* Manage comments and reactions
* Moderate content
* Work with rich media attachments

### Events

* Create and manage events
* Track RSVPs and attendance
* Update event details

### Spaces

* Manage Network spaces
* Configure space settings
* Control space membership

## Webhooks

Webhooks send HTTP notifications when events occur in your Network. See the [Webhooks guide](https://docs.mightynetworks.com/api/webhooks.md) for setup, delivery format, security, retries, and links to event payload schemas. The guide applies to integrations using either the Mighty API or the Admin REST API.

### Circuit breaker

For delivery pauses and automatic recovery after repeated endpoint failures, see [Circuit breaker](https://docs.mightynetworks.com/api/webhooks.md#circuit-breaker) in the Webhooks guide.

## Rate Limit and Quota

The Admin API is rate limited to ensure fair usage. Each plan includes a monthly request quota, with additional usage billed per request past your plan's permitted volume.

Contact your account team for the specific limits and pricing that apply to your plan.

## Error Handling

The API uses standard HTTP status codes:

| Status Code | Description |
| - | - |
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |

Error responses include a JSON body with details:

```json theme={null}
{
  "error": "unauthorized",
  "message": "Invalid API token",
  "status": 401
}
```

## Pagination

List endpoints support pagination using the following query parameters:

* `page`: Page number (default: 1)
* `per_page`: Items per page (default: 25, max: 100)

Pagination metadata is included in the response:

```json theme={null}
{
  "data": [...],
  "meta": {
    "current_page": 1,
    "total_pages": 10,
    "total_count": 250,
    "per_page": 25
  }
}
```

## Quick Reference

### Common Operations

All API operations are scoped to a specific Network:

* **List Resources** - `GET /networks/{id}/members`
* **Get Resource** - `GET /networks/{id}/members/{member_id}`
* **Create Resource** - `POST /networks/{id}/posts`
* **Update Resource** - `PATCH /networks/{id}/members/{member_id}`
* **Delete Resource** - `DELETE /networks/{id}/spaces/{space_id}/members/{user_id}`

### Request Format

All requests require authentication and use standard REST conventions:

```bash theme={null}
curl https://api.mn.co/admin/v1/networks/{network_id}/endpoint \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "User-Agent: my-app/1.0 (+https://example.com)"
```

> [!WARNING]
>
> Requests to `api.mn.co` must include a non-empty `User-Agent` header. Requests without one are blocked by bot protection and receive an HTML challenge page with HTTP `403`. We recommend `your-app-name/version (+url)`.

### Response Format

Successful list endpoints return paginated data:

```json theme={null}
{
  "items": [...],
  "links": {
    "self": "current_page_url",
    "next": "next_page_url"
  }
}
```

## Best Practices

1. **Store tokens securely** - Never expose API tokens in client-side code or public repositories
2. **Handle rate limits** - Implement exponential backoff when hitting rate limits
3. **Use pagination** - Always paginate through large result sets
4. **Validate input** - Validate data before sending to the API
5. **Monitor errors** - Log and monitor API errors for debugging

## Support

Need help with the Admin API?

> [card] [Support Center](https://docs.mightynetworks.com)
>
> Visit our FAQ and support documentation.

> [card] [Contact Support](https://www.mightynetworks.com)
>
> Get in touch with our technical support team.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.