# Organization integrations

> Connect your organization to Discord and set up the game proxy your customers' players join through.

Source: https://docs.coritan.com/organizations/integrations/

In the dashboard:

- /dashboard/organizations/…/integrations: https://www.coritan.com/dashboard/organizations

The **Integrations** tab connects your organization to services outside Coritan. Only owners and admins can open it; other members see a note that their role cannot.

## What you can connect

| Integration | What it does |
| --- | --- |
| [Discord](/organizations/integrations/discord/) | Runs your own bot in your community's Discord server: support tickets in a staff channel, slash commands for customers, role menus, and your server's public channels on your storefront. |
| [Game proxy](/organizations/integrations/game-proxy/) | Sets the join addresses your customers' game servers get, and the messages players see in their server list and when they join. |
| Medal quest | Gives a free server extra memory for a while when a player finishes your quest on Medal. Coritan sets it up with you, as described below. |

Every change on the tab goes on your organization's [audit log](/organizations/audit-log/).

## The Medal quest

In a Medal quest, a player records a Minecraft clip, posts it on Medal, and enters the address players use to join their server. When the player finishes, Medal's servers call your organization's endpoint, and the free server at that address gets extra memory until the boost ends.

Coritan sets the quest up for your organization: the amount of memory, how long it lasts, the limits per server and per player, and the key Medal uses. [Contact support](https://www.coritan.com/dashboard/support) to start one. The key starts with `mdl_`, and Coritan can show it only once, when it is made.

### The call Medal makes

Medal calls this endpoint from its own servers. No member or customer token works on it; only your organization's Medal key does.

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/partners/medal/boosts" \
  -H "Authorization: Bearer $MEDAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"server_address": "myworld.example.com", "claim_id": "qc_7f2a91"}'
```

The fields can also arrive as form fields or in the query string. A field in the body wins over the same one in the query string.

| Field | Required | Meaning |
| --- | --- | --- |
| `server_address` | Yes | The address the player typed: the server's join address or a custom domain linked to it. Case, a trailing dot, a scheme and a port are ignored. An IP address never matches. |
| `claim_id` | No | An ID for this quest completion, up to 128 characters. A retry with the same `claim_id` answers with the grant already made. |
| `medal_user_id` | No | The player's Medal account ID, up to 128 characters. The per-player cooldown only applies when Medal sends it. |
| `dry_run` | No | `true` checks the address and every rule and grants nothing. The answer's `status` is then `eligible`. |

A grant answers `201` with `status: granted`, the `boost` (`memory_mb`, `granted_at`, `expires_at`), the `server` and a `message` written for the player. A replayed `claim_id` answers `200` with `replayed: true`.

A refusal answers `{"detail": {"code": "...", "message": "..."}}` and changes nothing, so the player can fix a typo and try again:

| Status | `code` | When |
| --- | --- | --- |
| `400` | `invalid_request` | `server_address` is missing, a field is too long, or the body cannot be read. |
| `401` | `unauthorized` | The key is missing or wrong, belongs to another organization, or the call came from outside the allowed addresses. |
| `403` | `integration_disabled` | The quest is switched off, or the organization is not active. |
| `404` | `server_not_found` | No server of your organization has that address. |
| `409` | `server_already_boosted` | The server holds as many boosts as it may. `expires_at` says when it can take another. |
| `409` | `user_cooldown` | This Medal account claimed recently. `next_eligible_at` says when it can claim again. |
| `422` | `not_eligible` | `reason` is `paid_plan` (boosts are for free servers) or `server_unavailable`. |
| `429` | `rate_limited` | The key made too many calls this hour. Wait for the time in the `Retry-After` header. |

The server's memory limit rises at once. As the grant's `message` tells the player, the server's owner raises the Java memory in the server's settings and restarts the server to use it.

## Related

- [Connect a Discord server](/organizations/integrations/discord/)
- [Customise the game proxy messages](/organizations/integrations/game-proxy/)
- [Roles and permissions](/organizations/roles-and-permissions/)

## API

- `POST /api/v1/orgs/{org_slug}/partners/medal/boosts`: Grant a free server the brand's Medal RAM boost (https://docs.coritan.com/api/reference/organizations/partners/#op-post-api-v1-orgs-org-slug-partners-medal-boosts)
