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

Ask a person to approve

POST /api/v1/content/{content}/approval-requests

The key needs the scope content:write

Creates a pending approval request for the item exactly as it stands: this text, these graphics, this channel and this time.

The item must be a draft (or already in review) with a channel and a planned time and no errors in the checks; it moves to review. The request takes no body. The person who created the API key counts as the one who asked. An earlier pending or granted approval of the item is replaced. The API cannot approve: a signed-in person does that in the app, at review_url.

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.
curl -X POST https://heymysocial.com/api/v1/content/01JDEXAMPLE0000000000000000/approval-requests \
  -H "Authorization: Bearer $HMS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Responses

202 The request is waiting for a person.

FieldTypeWhat it is
dataobjectThe request, the item and exactly what was asked for.
data.approvalobjectThe approval request that was created.
data.approval.idstringId of the approval request.
data.approval.statestringAlways pending: only a person can decide.
data.approval.requested_viastringAlways api for a request made here.
data.approval.requested_atstring (date-time)When approval was asked for.
data.contentobjectA content item in its short form.
data.content.idstringId of the content item (26 characters).
data.content.titlestring or nullTitle of the current version.
data.content.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.content.platformstringmock (the practice channel), facebook, instagram or linkedin.
data.content.channel_idstring or nullId of the channel the post is meant for, or null when none is chosen.
data.content.campaign_idstring or nullId of the campaign the post belongs to, or null.
data.content.intentstring or nullWhat the post is for: educate, prove, offer, engage or announce.
data.content.formatstringThe kind of post: text, image, carousel, video, story or link.
data.content.funnel_stagestring or nullawareness, consideration, conversion or retention.
data.content.localestringLanguage of the text: en or da.
data.content.planned_atstring or null (date-time)The planned time in UTC, or null when no time is set.
data.content.planned_localstring or nullThe same moment as local time in the workspace time zone, written YYYY-MM-DDTHH:MM.
data.content.timezonestringThe time zone of the workspace (IANA name).
data.content.versioninteger or nullNumber of the current version, starting at 1.
data.content.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.content.excerptstringThe first 160 characters of the current text.
data.content.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.content.is_demobooleanTrue for invented example data in a demo workspace.
data.content.urlstring (uri)The address of the item in the app, for a signed-in person.
data.requestedobjectExactly what approval was asked for. The approver sees the same.
data.requested.actionstringWhat would be done after approval: publish.
data.requested.channelobjectWhere it would go: the id, name, handle, provider and external_id of the channel, the name of its account, and is_demo (true for the practice channel).
data.requested.formatstringThe kind of post.
data.requested.titlestring or nullTitle of the version the request covers.
data.requested.textstringThe text as it would go out, call to action included.
data.requested.link_urlstring or nullThe link of the post.
data.requested.assetsarray of objectThe attached graphics in order, each with id, name, mime (file type), format (aspect ratio) and a checksum of the file.
data.requested.scheduled_forobjectThe planned time four ways: utc, local (in the workspace time zone), timezone and offset.
data.requested.versionintegerNumber of the version the request covers.
data.requested.version_idstringId of that version.
data.review_urlstring (uri)The page in the app where a person with the right role approves or rejects exactly this request.
{
    "data": {
        "approval": {
            "id": "01m88q4wzg1mthtpw3sw3t8ak6",
            "state": "pending",
            "requested_via": "api",
            "requested_at": "2026-11-25T09:12:44+00:00"
        },
        "content": {
            "id": "01m88q4wyk57w1zfdfycbn4qf5",
            "title": "Roof check",
            "status": "review",
            "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"
        },
        "requested": {
            "action": "publish",
            "channel": {
                "id": "01m88q4wxrssa2ecg8rsrswg76",
                "name": "Practice page",
                "handle": "@practice",
                "provider": "mock_social",
                "external_id": "practice-page",
                "account": "Practice account",
                "is_demo": true
            },
            "format": "link",
            "title": "Roof check",
            "text": "Is your roof right for solar? A 20-minute visit answers it. The visit is free and you get the numbers in writing.\n\nBook a roof check",
            "link_url": "https://nordlys-solar.example/roof-check",
            "assets": [],
            "scheduled_for": {
                "utc": "2026-12-01T08:00:00Z",
                "local": "2026-12-01 09:00",
                "timezone": "Europe/Copenhagen",
                "offset": "+01:00"
            },
            "version": 2,
            "version_id": "01m88q4wz4deg4ae3ryqp5jzx6"
        },
        "review_url": "https://heymysocial.com/calendar?open=01m88q4wyk57w1zfdfycbn4qf5"
    }
}

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, or the person who created the key may no longer write drafts in this workspace.

The error shape and every code

404 not_found: no content item with this id in the workspace of the key.

The error shape and every code

409 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: the item is not ready. It has no channel or no planned time, the checks found an error (details.issues lists them), or it is neither a draft nor in review.

The error shape and every code

429 rate_limited: too many requests with this key in one minute. Wait and send it again.

The error shape and every code