Connections

Connect a credential-based account directly

Headless connection for credential-based platforms: telegram, bluesky, discord, wordpress, devto, hashnode, and lemmy. Call GET /api/v1/connect/{platform} first: credential_fields lists exactly which keys to send, and supports_direct_credentials confirms the platform accepts this flow. OAuth platforms and mastodon are rejected with credentials_not_supported; create a browser connect session for those instead. Upsert semantics: reconnecting the same account updates it in place and returns 200 either way. Prefer scoped secrets (app passwords, bot tokens, webhook URLs, API tokens) over primary passwords. Credential values are never echoed back in errors or logs. Rate limit: 20 credential connect attempts per hour per user.

post/api/v1/connect/{platform}/credentials

Request

  • Base URL: https://www.poster.ly
  • URL: https://www.poster.ly/api/v1/connect/{platform}/credentials
  • Auth: HTTP bearer

Path parameters

platformstring required

Credential-based connection target: telegram, bluesky, discord, wordpress, devto, hashnode, or lemmy.

Request body

credentialsobject required

Credential fields for the platform, exactly the keys listed in the connect option credential_fields. Unknown keys are rejected; required keys must be non-empty strings. Values are used to authenticate with the provider and are never echoed back.

workspace_idstring uuid

Optional workspace to connect the account into. You must be a member. Workspace-scoped API keys ignore this and use their bound workspace.

connect_session_idstring uuid

Optional connect session created via POST /api/v1/connect/{platform}/sessions; it is marked connected or failed based on the outcome.

Example request

{
  "credentials": {
    "handle": "posterly.bsky.social",
    "app_password": "xxxx-xxxx-xxxx-xxxx"
  }
}

Response

Account connected (or reconnected) successfully

connectedboolean required
workspace_idstring uuid required

Example response

{
  "connected": true,
  "account": {
    "id": 4321,
    "platform": "bluesky",
    "username": "posterly.bsky.social",
    "did": "did:plc:example"
  },
  "workspace_id": "2d0a6d4c-9eef-4ee2-9026-2ca0dc29c8d6"
}

Changes

No recorded changes to this operation across all 1 revision of this API.