Skip to content

Goals

How often each account should post, the caps it should stay under, and how far it is this week or month.

3 endpoints

GET/groups/{groupId}/goals

The group's posting goals and caps, and its goal pauses

Any key

A group goal (account_id: null) counts original posts and every account inherits it; an account's own goal of the same kind replaces it.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

Returns

200 with these fields; an error answers in the Error envelope.

  • goalsarray of objects
    Show 6 fields
    • account_iduuid or null

      Null: the group's goal, which every account inherits.

    • kindstring

      What it counts. "original": posts, articles, quotes, polls and reels.

      originalpostarticlereplyquotepollreelstoryrepostcomment
    • directionstring

      "goal": at least target. "cap": at most target.

      goalcap
    • targetinteger or null

      Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null: an account opts out of the group's goal.

      -9007199254740991 to 9007199254740991

    • periodstring
      dayweekmonth
    • weekdaysarray of integers

      The days a daily goal counts, 0 = Monday.

  • pausesarray of objects
    Show 4 fields
    • iduuid
    • account_iduuid or null

      Null: the whole group.

    • starts_onstring

      matches ^\d{4}-\d{2}-\d{2}$

    • ends_onstring

      The last paused day, inclusive.

      matches ^\d{4}-\d{2}-\d{2}$

curl https://postacio.com/api/v1/groups/$GROUP_ID/goals \
  -H "Authorization: Bearer $POSTACIO_API_KEY"
PUT/groups/{groupId}/goals

Replace the group's posting goals and caps

Any key

Send the whole set: a goal left out is removed. Changed and removed goals are closed, never overwritten, so past periods keep the goals they had. A field the group can't hold is 400 validation naming it in param (goals[2].target); a paused group is 409.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

Body

  • goalsarray of objectsrequired

    The whole set. A goal left out is removed; history is kept.

    up to 200 items

    Show 6 fields
    • kindstringrequired

      What it counts. "original": posts, articles, quotes, polls and reels.

      originalpostarticlereplyquotepollreelstoryrepostcomment
    • targetinteger or nullrequired

      Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null only on an account's original goal: none there.

      1 to 200

    • periodstringrequired
      dayweekmonth
    • account_iduuid or null

      An account of the group. Null or absent: the group's goal (kind original only).

      up to 36 characters

    • directionstring

      "goal": at least target. "cap": at most target.

      goalcap
    • weekdaysarray of integers

      Daily goals: the days it counts, 0 = Monday. Default: every day.

      up to 7 items

Returns

200 with these fields; an error answers in the Error envelope.

  • goalsarray of objects
    Show 6 fields
    • account_iduuid or null

      Null: the group's goal, which every account inherits.

    • kindstring

      What it counts. "original": posts, articles, quotes, polls and reels.

      originalpostarticlereplyquotepollreelstoryrepostcomment
    • directionstring

      "goal": at least target. "cap": at most target.

      goalcap
    • targetinteger or null

      Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null: an account opts out of the group's goal.

      -9007199254740991 to 9007199254740991

    • periodstring
      dayweekmonth
    • weekdaysarray of integers

      The days a daily goal counts, 0 = Monday.

  • pausesarray of objects
    Show 4 fields
    • iduuid
    • account_iduuid or null

      Null: the whole group.

    • starts_onstring

      matches ^\d{4}-\d{2}-\d{2}$

    • ends_onstring

      The last paused day, inclusive.

      matches ^\d{4}-\d{2}-\d{2}$

curl -X PUT https://postacio.com/api/v1/groups/$GROUP_ID/goals \
  -H "Authorization: Bearer $POSTACIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "goals": [
      {
        "account_id": null,
        "kind": "original",
        "target": 3,
        "period": "week"
      },
      {
        "account_id": "8c1d0f3e-5b2a-4e7c-9a61-2f4b7d9e0c13",
        "kind": "story",
        "target": 1,
        "period": "day",
        "weekdays": [
          0,
          1,
          2,
          3,
          4
        ]
      }
    ]
  }'
GET/groups/{groupId}/goals/progress

How far each account is through its goals this period

Any key

Per account and goal, in the group's timezone: published (done), scheduled (planned), waiting for approval, and remaining to schedule. Only posts published through Postacio count.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

Returns

200 with a GoalProgress object; an error answers in the Error envelope.

curl https://postacio.com/api/v1/groups/$GROUP_ID/goals/progress \
  -H "Authorization: Bearer $POSTACIO_API_KEY"

Ready to send your first draft?

Start your free trial, create a key in Settings, and call the API in a minute.