---
title: "Connect a credential-based platform (telegram, bluesky, mastodon, discord, wordpress, devto, hashnode, slack, nostr)"
method: POST
path: "/api/connect"
---

# Connect a credential-based platform (telegram, bluesky, mastodon, discord, wordpress, devto, hashnode, slack, nostr)

`POST /api/connect`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/connect`
- Auth: HTTP bearer

## Request body

- object
  - `platform` 'telegram' | 'bluesky' | 'mastodon' | 'discord' | 'wordpress' | 'devto' | 'hashnode' | 'slack' | 'nostr', required
  - `credentials` object, required: telegram { bot_token, chat_id } · bluesky { handle, app_password } · mastodon { instance_url, access_token } · discord { webhook_url } · wordpress { site_url, username, app_password, default_status? (publish|draft) } · devto { api_key, default_status? } · hashnode { token, publication? (the blog's address or id; default: the first blog), default_status? } · slack { webhook_url (https://hooks.slack.com/services/…) } · nostr { nsec, relays? (wss:// list or comma-separated; default: public relays) }. Checked with the network before they are saved; a refusal comes back as code invalid_credentials with what to fix.
  - `dry_run` boolean: true: only test the credentials with the network (the dashboard's Test connection); nothing is saved. Answers { ok, tested: true, connected: false } or the same invalid_credentials error a connect would.
  - `brand_id` string, uuid

## Response `200`

Connected

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
