Miridia
Portal
Global API

Linked accounts

The user-side linked-account routes for the Telegram assistant: mint a link code, list, rename, and revoke the caller's own links

Base URL: https://global.miridia.io. Read Authentication and Conventions before you call these operations.

MethodPathOperation
POST/api/auth/linked-accounts/codesCreate code
GET/api/auth/linked-accountsGet linked accounts
PATCH/api/auth/linked-accounts/{id}Rename
DELETE/api/auth/linked-accounts/{id}Revoke

Create code

POST/api/auth/linked-accounts/codes

Access. Send a bearer token or an API key. Any signed-in member can call this operation.

Request body

Send JSON with the shape CreateLinkedAccountCodeRequest.

FieldTypeRequiredDescription
channelenum LinkedAccountChannelYesOne of: Telegram.
businessIdstring (uuid)Yes
labelstringYes

Response

200. Returns a SingleResult envelope. The data field is LinkedAccountCodeResponse.

Request
curl -X POST "https://global.miridia.io/api/auth/linked-accounts/codes" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "Telegram",
  "businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "label": "string"
}'
Response
{
  "data": {
    "code": "string",
    "deepLink": "string",
    "expiresAt": "2026-09-29T08:00:00Z"
  },
  "statusCode": 0,
  "messages": [
    "string"
  ]
}

Get linked accounts

GET/api/auth/linked-accounts

Access. Send a bearer token or an API key. Any signed-in member can call this operation.

Response

200. Returns a JSON array. Each item is LinkedAccountResponse.

Request
curl -X GET "https://global.miridia.io/api/auth/linked-accounts" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN"
Response
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "channel": "Telegram",
    "externalDisplayName": "string",
    "label": "string",
    "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "dateCreated": "2026-09-29T08:00:00Z",
    "lastUsedAt": "2026-09-29T08:00:00Z",
    "expiresAt": "2026-09-29T08:00:00Z",
    "revokedAt": "2026-09-29T08:00:00Z",
    "revokedReason": "UserRemoved",
    "status": "Active"
  }
]

Rename

PATCH/api/auth/linked-accounts/{id}

Access. Send a bearer token or an API key. Any signed-in member can call this operation.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)Yes

Request body

Send JSON with the shape UpdateLinkedAccountRequest.

FieldTypeRequiredDescription
labelstringYes

Response

200. Returns a SingleResult envelope. The data field is LinkedAccountResponse.

Request
curl -X PATCH "https://global.miridia.io/api/auth/linked-accounts/{id}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "string"
}'
Response
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "channel": "Telegram",
    "externalDisplayName": "string",
    "label": "string",
    "organizationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "businessId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "dateCreated": "2026-09-29T08:00:00Z",
    "lastUsedAt": "2026-09-29T08:00:00Z",
    "expiresAt": "2026-09-29T08:00:00Z",
    "revokedAt": "2026-09-29T08:00:00Z",
    "revokedReason": "UserRemoved",
    "status": "Active"
  },
  "statusCode": 0,
  "messages": [
    "string"
  ]
}

Revoke

DELETE/api/auth/linked-accounts/{id}

Access. Send a bearer token or an API key. Any signed-in member can call this operation.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is boolean.

Request
curl -X DELETE "https://global.miridia.io/api/auth/linked-accounts/{id}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN"
Response
{
  "data": true,
  "statusCode": 0,
  "messages": [
    "string"
  ]
}

Models

The operations on this page use these object types. Select a type to see its fields.

LinkedAccountCodeResponse
FieldTypeDescription
codestring
deepLinkstring
expiresAtstring (date-time)
LinkedAccountResponse
FieldTypeDescription
idstring (uuid)
channelenum LinkedAccountChannelOne of: Telegram.
externalDisplayNamestring
labelstring
organizationIdstring (uuid)
businessIdstring (uuid)
dateCreatedstring (date-time)
lastUsedAtstring (date-time)
expiresAtstring (date-time)
revokedAtstring (date-time)
revokedReasonenum LinkedAccountRevokedReasonOne of: UserRemoved, ChatUnlink, Replaced, StampChanged, UserDeactivated, MembershipRemoved.
statusenum LinkedAccountStatusOne of: Active, Expired, Revoked.