Skip to content
PostyAPIv0.3.81
Menu

API reference

Workspace settings

Get workspace

get/v1/workspace

Get the current workspace's settings as the settings page shows them: name, logo, approval mode, review locking, campaigns, timezone and posting times, the approval modes the plan allows, and the caller's permissions. Needs workspace:view.

Response 200

Workspace

  • idstringrequired
  • namestringrequired
  • logoUrlstringrequirednullable
  • approvalModestringrequired

    One ofnoneoptionalrequiredmulti_level

  • lockDuringReviewbooleanrequired
  • campaignsEnabledbooleanrequired
  • settingsobjectrequired
    Child attributes
    • autoScheduleOnApprovalbooleanrequired
    • timezonestringrequirednullable
    • postingPreferencesobjectrequired
      Child attributes
      • defaultPostingTimesobjectrequired
        Child attributes
        • morningstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • middaystringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • laterAfternoonstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • otherstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

      • showDefaultPostingTimesbooleanrequired
      • timeWiggleEnabledbooleanrequired
  • allowedApprovalModesarray of stringrequired

    One ofnoneoptionalrequiredmulti_level

  • permissionsarray of stringrequired

Errors

401
Unauthenticated
403
Missing workspace:view
Request
curl "https://api.posty.social/v1/workspace" \
  -H "Authorization: Bearer $POSTY_API_KEY"
Response 200
{
  "id": "string",
  "name": "string",
  "logoUrl": "string",
  "approvalMode": "none",
  "lockDuringReview": true,
  "campaignsEnabled": true,
  "settings": {
    "autoScheduleOnApproval": true,
    "timezone": "string",
    "postingPreferences": {
      "defaultPostingTimes": {
        "morning": "string",
        "midday": "string",
        "laterAfternoon": "string",
        "other": "string"
      },
      "showDefaultPostingTimes": true,
      "timeWiggleEnabled": true
    }
  },
  "allowedApprovalModes": [
    "none"
  ],
  "permissions": [
    "string"
  ]
}

Update workspace settings

patch/v1/workspace

Update the current workspace's name, approval mode, review locking, campaigns switch, timezone, auto scheduling on approval or default posting times. Only the fields you send change. An approval mode outside the plan's allowedApprovalModes is refused. Needs workspace:update.

Request body

  • namestring

    Min length 1 · Max length 30

  • approvalModestring

    One ofnoneoptionalrequiredmulti_level

  • lockDuringReviewboolean
  • campaignsEnabledboolean
  • settingsobject
    Child attributes
    • autoScheduleOnApprovalboolean
    • timezonestring

      Min length 1 · Max length 100

    • postingPreferencesobject
      Child attributes
      • defaultPostingTimesobject
        Child attributes
        • morningstring

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • middaystring

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • laterAfternoonstring

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • otherstring

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

      • showDefaultPostingTimesboolean
      • timeWiggleEnabledboolean

Response 200

Workspace updated

  • idstringrequired
  • namestringrequired
  • logoUrlstringrequirednullable
  • approvalModestringrequired

    One ofnoneoptionalrequiredmulti_level

  • lockDuringReviewbooleanrequired
  • campaignsEnabledbooleanrequired
  • settingsobjectrequired
    Child attributes
    • autoScheduleOnApprovalbooleanrequired
    • timezonestringrequirednullable
    • postingPreferencesobjectrequired
      Child attributes
      • defaultPostingTimesobjectrequired
        Child attributes
        • morningstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • middaystringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • laterAfternoonstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

        • otherstringrequired

          Pattern ^(?:[01]\d|2[0-3]):[0-5]\d$

      • showDefaultPostingTimesbooleanrequired
      • timeWiggleEnabledbooleanrequired

Errors

400
Invalid request
401
Unauthenticated
403
Missing workspace:update, or approval mode not on the plan
Request
curl -X PATCH "https://api.posty.social/v1/workspace" \
  -H "Authorization: Bearer $POSTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "approvalMode": "none",
  "lockDuringReview": true,
  "campaignsEnabled": true,
  "settings": {
    "autoScheduleOnApproval": true,
    "timezone": "string",
    "postingPreferences": {
      "defaultPostingTimes": {
        "morning": "string",
        "midday": "string",
        "laterAfternoon": "string",
        "other": "string"
      },
      "showDefaultPostingTimes": true,
      "timeWiggleEnabled": true
    }
  }
}'
Response 200
{
  "id": "string",
  "name": "string",
  "logoUrl": "string",
  "approvalMode": "none",
  "lockDuringReview": true,
  "campaignsEnabled": true,
  "settings": {
    "autoScheduleOnApproval": true,
    "timezone": "string",
    "postingPreferences": {
      "defaultPostingTimes": {
        "morning": "string",
        "midday": "string",
        "laterAfternoon": "string",
        "other": "string"
      },
      "showDefaultPostingTimes": true,
      "timeWiggleEnabled": true
    }
  }
}