Skip to content
Denne side findes på dansk. Læs på dansk
HeyMySocial

Add a version

POST /api/v1/content/{content}/versions

The key needs the scope content:write

Saves new text as the next version of an item; fields you leave out keep their current value, and text that is identical to the current version adds no version.

Changing the text, link, graphics, channel, time or format of an item that was approved, scheduled or waiting for approval invalidates that approval, takes it off the schedule and returns it to draft (approval_lost is true). An item that is publishing, published, cancelled or delivery_uncertain cannot be edited.

Request

ParameterInNeededWhat it is
contentpathyesId of the content item (26 characters), as returned in data.id.
Idempotency-KeyheadernoYour own unique value for this request, 8 to 191 characters. A repeat with the same key and the same body returns the first response with the header Idempotent-Replay: true instead of doing the work twice.

Body

FieldTypeNeededWhat it is
titlestringno Title of the post, shown in the calendar and in lists. It is part of what an approval covers.
bodystringno The post text.
ctastringno Call to action. It goes out as the last line when the body does not already contain it.
link_urlstring (uri)no The link the post points to. http or https only.
asset_idsarray of stringno Ids of up to 10 graphics in this workspace, in the order they should appear. An id that does not exist here is answered with 404.
platformstringno Where the post is meant for when no channel is chosen yet. mock is the practice channel and the default. When channel_id is given, the channel decides and this field is ignored.One of: mock, facebook, instagram, linkedin
channel_idstringno Id of a channel in this workspace. An id that does not exist here is answered with 404.
campaign_idstringno Id of a campaign in this workspace. An id that does not exist here is answered with 404.
intentstringno What the post is for.One of: educate, prove, offer, engage, announce
formatstringno The kind of post. Defaults to text. Changing it on an approved item invalidates the approval.One of: text, image, carousel, video, story, link
funnel_stagestringno The stage of the funnel the post speaks to.One of: awareness, consideration, conversion, retention
localestringno Language of the text. Defaults to the language of the workspace.One of: en, da
planned_forstring or nullno Planned time as local time in the workspace time zone, written YYYY-MM-DD HH:MM. A time skipped by daylight saving is refused with details.reason dst_gap; a time that occurs twice resolves to the first. Send null to clear the time. Planning a time schedules nothing.
notestringno What changed, shown in the version history.
lock_versionintegerno The lock_version you last read. When the item has changed since, the request is refused with version_conflict (details.current is the value now) instead of overwriting the other edit. Leave it out to save regardless.
curl -X POST https://heymysocial.com/api/v1/content/01JDEXAMPLE0000000000000000/versions \
  -H "Authorization: Bearer $HMS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Is your roof right for solar? A 20-minute visit answers it. The visit is free and you get the numbers in writing.",
    "note": "Shorter second sentence",
    "lock_version": 1
}'

Responses

201 The item after the new version, with the checks run again.

FieldTypeWhat it is
dataobjectThe content item after the save.
data.idstringId of the content item (26 characters).
data.titlestring or nullTitle of the current version.
data.statusstringWhere the item is in its life: draft, review (waiting for a person to approve), approved, scheduled, publishing, published, failed, cancelled or delivery_uncertain.
data.platformstringmock (the practice channel), facebook, instagram or linkedin.
data.channel_idstring or nullId of the channel the post is meant for, or null when none is chosen.
data.campaign_idstring or nullId of the campaign the post belongs to, or null.
data.intentstring or nullWhat the post is for: educate, prove, offer, engage or announce.
data.formatstringThe kind of post: text, image, carousel, video, story or link.
data.funnel_stagestring or nullawareness, consideration, conversion or retention.
data.localestringLanguage of the text: en or da.
data.planned_atstring or null (date-time)The planned time in UTC, or null when no time is set.
data.planned_localstring or nullThe same moment as local time in the workspace time zone, written YYYY-MM-DDTHH:MM.
data.timezonestringThe time zone of the workspace (IANA name).
data.versioninteger or nullNumber of the current version, starting at 1.
data.lock_versionintegerGoes up with every saved change. Send it back when you add a version, so you never overwrite an edit you have not seen.
data.excerptstringThe first 160 characters of the current text.
data.originstringHow the item was created: manual (a person in the app), rules (the drafting rules in the app), mcp (an assistant) or import (this API).
data.is_demobooleanTrue for invented example data in a demo workspace.
data.urlstring (uri)The address of the item in the app, for a signed-in person.
data.approval_lostbooleanTrue when this save invalidated an approval the item had or was waiting for. The item is a draft again and needs a new request.
qa_issuesarray of objectWhat the brand and channel checks found in the saved text. Empty when nothing was found.
qa_issues[].sourcestringWhich check found it: brand (terms, promises and claims against your approved facts) or channel (the rules of the chosen channel).
qa_issues[].severitystringerror blocks approval; warning does not.
qa_issues[].codestringA stable name for the finding, for example unverified_number or no_channel.
qa_issues[].messagestringThe finding in words.
blocked_by_qabooleanTrue when at least one issue is an error. Approval cannot be requested until it is fixed.
{
    "data": {
        "id": "01m88q4wyk57w1zfdfycbn4qf5",
        "title": "Roof check",
        "status": "draft",
        "platform": "mock",
        "channel_id": "01m88q4wxrssa2ecg8rsrswg76",
        "campaign_id": "01m88q4wxxt1xn4npmvqhz1nee",
        "intent": "offer",
        "format": "link",
        "funnel_stage": "consideration",
        "locale": "en",
        "planned_at": "2026-12-01T08:00:00Z",
        "planned_local": "2026-12-01T09:00",
        "timezone": "Europe/Copenhagen",
        "version": 2,
        "lock_version": 2,
        "excerpt": "Is your roof right for solar? A 20-minute visit answers it. The visit is free and you get the numbers in writing.",
        "origin": "import",
        "is_demo": false,
        "url": "https://heymysocial.com/studio/01m88q4wyk57w1zfdfycbn4qf5",
        "approval_lost": false
    },
    "qa_issues": [
        {
            "source": "brand",
            "severity": "warning",
            "code": "unverified_number",
            "message": "This number is not in your approved facts: 20."
        }
    ],
    "blocked_by_qa": false
}

401 unauthenticated: the API key is missing, mistyped, revoked or expired.

The error shape and every code

403 access_denied: the key lacks the scope content:write.

The error shape and every code

404 not_found: no content item with this id in the workspace of the key, or the channel, campaign or a graphic named in the body does not exist here.

The error shape and every code

409 version_conflict: the item changed since the lock_version you sent; details.current is the value now. duplicate: the Idempotency-Key was already used with a different request, or the first request with it is still running (then retryable is true).

The error shape and every code

422 validation_failed: a field is not valid (details names it), the item can no longer be edited, or planned_for is a time the clocks skip (details.reason is dst_gap).

The error shape and every code

429 rate_limited: too many requests with this key in one minute (retryable). quota_exceeded: the workspace is read-only because the plan allows fewer workspaces than the organization has.

The error shape and every code