> For the complete documentation index, see [llms.txt](https://docs.portmii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portmii.com/portmii-connect.md). Agents can also search and read this documentation through its [MCP server](https://docs.portmii.com/~gitbook/mcp).

# Portmii-Connect

## GET /license

> Retrieve License information

```json
{"openapi":"3.1.0","info":{"title":"Portmii-Connect","version":"1.0"},"servers":[{"url":"https://api.portmii.com/connect/api/v1/","description":"API Portmii"}],"paths":{"/license":{"get":{"summary":"Retrieve License information","operationId":"get-connect-license","parameters":[{"name":"Authorization","in":"header","description":"Public or Secret Key","schema":{"type":"string"}},{"name":"x-license-key","in":"header","description":"License Key from the user","schema":{"type":"string"}},{"name":"extend","in":"query","description":"Extend the information you want to receive: Currently supported are [DISCORD, CUSTOMER, TELEGRAM]","schema":{"type":"array"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"metdadata":{"type":"object"},"status":{"type":"string"},"createdAt":{"type":"string"},"customer":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}}},"discordClient":{"type":"object","properties":{"username":{"type":"string"},"discordUserId":{"type":"string"},"avatar":{"type":"string"}}},"telegramClient":{"type":"object","properties":{"username":{"type":"string"},"telegramUserId":{"type":"string"},"avatar":{"type":"string"}}}}}}}},"400":{"$ref":"#/components/responses/VALIDATION_ERROR"},"404":{"$ref":"#/components/responses/NOT_FOUND"},"500":{"$ref":"#/components/responses/INTERNAL_SERVER_ERROR"}}}}},"components":{"responses":{"VALIDATION_ERROR":{"description":"The Request you sent was not formatted correctly","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"NOT_FOUND":{"description":"The requested Resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"INTERNAL_SERVER_ERROR":{"description":"Something went wrong in Portmii, try again later or contact support","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}}}}}
```

## PUT /license/metadata

> Set custom metadata

```json
{"openapi":"3.1.0","info":{"title":"Portmii-Connect","version":"1.0"},"servers":[{"url":"https://api.portmii.com/connect/api/v1/","description":"API Portmii"}],"paths":{"/license/metadata":{"put":{"summary":"Set custom metadata","operationId":"put-license-metadata","parameters":[{"name":"Authorization","in":"header","description":"SECRET_KEY (sk_...)","schema":{"type":"string"}},{"name":"x-license-key","in":"header","description":"License Key","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"string"},"timestamp":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/VALIDATION_ERROR"},"401":{"$ref":"#/components/responses/UNAUTHORIZED"},"404":{"$ref":"#/components/responses/NOT_FOUND"},"500":{"$ref":"#/components/responses/INTERNAL_SERVER_ERROR"}}}}},"components":{"responses":{"VALIDATION_ERROR":{"description":"The Request you sent was not formatted correctly","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"UNAUTHORIZED":{"description":"Check your API Key and ensure it has the correct rights","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"NOT_FOUND":{"description":"The requested Resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"INTERNAL_SERVER_ERROR":{"description":"Something went wrong in Portmii, try again later or contact support","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}}}}}
```

## GET /discord/unlink

> Your GET endpoint

```json
{"openapi":"3.1.0","info":{"title":"Portmii-Connect","version":"1.0"},"servers":[{"url":"https://api.portmii.com/connect/api/v1/","description":"API Portmii"}],"paths":{"/discord/unlink":{"get":{"summary":"Your GET endpoint","operationId":"get-connect-discord-unlink","parameters":[{"name":"Authorization","in":"header","description":"SECRET KEY","schema":{"type":"string"}},{"name":"x-license-key","in":"header","description":"License Key","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"string"},"timestamp":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/UNAUTHORIZED"},"404":{"$ref":"#/components/responses/NOT_FOUND"},"500":{"$ref":"#/components/responses/INTERNAL_SERVER_ERROR"}}}}},"components":{"responses":{"UNAUTHORIZED":{"description":"Check your API Key and ensure it has the correct rights","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"NOT_FOUND":{"description":"The requested Resource was not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}},"INTERNAL_SERVER_ERROR":{"description":"Something went wrong in Portmii, try again later or contact support","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"errorCode":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"}}}}}}}}}
```
