---
title: "Issue a one-time Telegram connection command"
method: POST
path: "/accounts/telegram/connection-code"
tags: ["Accounts"]
---

# Issue a one-time Telegram connection command

`POST /accounts/telegram/connection-code`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/accounts/telegram/connection-code`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

Returns the signed command exactly once. It expires after 15 minutes and is never placed in a URL, job, log, or later response.

## Request body

- IssueTelegramConnectionCodeInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `expected_chat_id` string, required: Canonical non-zero numeric Telegram chat ID that must redeem the command
  - `workspace_id` string, required: Workspace receiving the Telegram destination

## Response `200`

OK

- IssueTelegramConnectionCodeResponse
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `bot_username` string, required: Instance-owned Telegram bot username
  - `code` string, required: One-time command to post in the destination chat. Returned only by this issuance response.
  - `expires_at` string, date-time, required: When the one-time command expires

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `422`: Unprocessable Entity
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
