Skip to content
reelspanDocs

Networks

Post to Dev.to

Publish Markdown articles to Dev.to with tags and a canonical URL, published at once or saved as a draft, connected with an API key.

Reelspan publishes articles to your Dev.to account from Markdown. Dev.to takes text posts only: send them with Post text.

What you can post

Post How it appears
Text An article: a title, a Markdown body, up to 4 tags and an optional canonical URL

The title is devto_title, else the first line of the caption, up to 250 characters. The body is devto_description, else description, else the whole caption (its first line included).

The cleanest request sends the article's title as title and the Markdown body as description. If you send devto_title, the caption becomes that title too, so the body must come from devto_description or description.

Videos and photos can't be sent: Dev.to's API takes no uploads, and the request is refused with UNSUPPORTED_POST_TYPE. To show an image, link one already online in the Markdown.

The result's url is the article on dev.to and post_id its id.

Connect your account

You need an API key. Setup takes about a minute.

  1. On dev.to, open Settings → Extensions and scroll to DEV Community API Keys.
  2. Describe it as Reelspan and click Generate API Key.
  3. In the Reelspan dashboard, open Accounts → Connect account, choose the profile and Dev.to, and paste the key.

Reelspan checks the key with Dev.to before saving it, encrypted.

With the API

curl -X POST https://api.reelspan.com/v1/accounts/devto \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_username": "my-brand", "api_key": "..."}'
{ "success": true, "platform": "devto", "account": "@yourname", "reconnected": false }
Field Required Also accepted (Upload-Post)
api_key Yes The same name

Connecting again replaces the Dev.to account on that profile. See Connect with credentials.

Example post

An article with tags and a canonical URL:

curl -X POST https://api.reelspan.com/v1/posts/text \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user": "my-brand",
    "platform": ["devto"],
    "title": "How we cut our build time in half",
    "description": "## The problem\n\nOur CI took 14 minutes...\n\n## What we changed\n\n...",
    "devto_tags": "devops, ci, webdev",
    "devto_canonical_url": "https://example.com/blog/faster-builds"
  }'

Fields

Field Meaning
devto_title The article's title. Falls back to the caption's first line.
devto_description The article's Markdown body. Falls back to description.
description The body, when devto_description isn't sent.
title The caption: its first line is the title and the whole of it the body, when the fields above aren't sent.
devto_tags Tags, separated by commas. Each is lowercased and keeps only letters, digits and -. The first 4 are used.
devto_canonical_url Where the article was first published, for search engines.
devto_published false saves the article as a draft on Dev.to. Default: published.

In the dashboard composer, the Dev.to tab has Tags, Canonical URL and Save as a draft.

Limits and behaviour

  • Tags: 4 per article. With more, the first 4 are used and the result carries a warning.
  • Title: up to 250 characters; longer is cut.
  • Drafts: a draft answers with a warning, "Saved as a draft on Dev.to".
  • No first comment: a first_comment isn't posted; the result says "first_comment": "unsupported" with a warning.
  • Analytics: reactions, comments and, when Dev.to returns them, page views per article. See Analytics.

Common errors

Code When Fix
INVALID_TOKEN Connecting: Dev.to didn't accept the key Generate a new key under Settings → Extensions.
UNSUPPORTED_POST_TYPE The request is a video or photo post Send articles with POST /v1/posts/text.
title_required The title came out empty Send a title (or devto_title) with text on its first line.
reauth_required Dev.to answered 401: the key was revoked Generate a new key and connect again.
devto_error Dev.to refused the article. Retried automatically on 429 and 5xx Read error for Dev.to's reason.
MISSING_FIELD Connecting without api_key Send it.

Errors when connecting come back as a 400 with the code in error_code. UNSUPPORTED_POST_TYPE refuses the whole request with a 400. Errors when posting are in that network's result. See Errors.

Something unclear or missing? Write to [email protected] and we’ll fix the page.