> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an invitation

> Change the role an invitation is for, or send it again.

> [!NOTE]
>
> Needs `team:update`, and a role in the workspace that can edit the team: owners and admins can. See [Permissions](/docs/essentials/authentication.md#permissions).

`{id}` is the invitation's `invitation_id` from [the team list](/docs/api-reference/team/list.md), and the body names the workspace in `workspace_id`. Send one of:

* `role`: the role they join with when they accept, a `name` from `roles`. It emails no one.
* `resend_invitation: true`: sends the invitation again. The invited person gets one email with a new link that works for 7 days, and the old link stops working. An expired invitation is sent again this way. One invitation goes to an address for each workspace a day, new or sent again, and invitations sent from the app's Team page count toward it: a second the same day answers `429` with `error: rate_limited`, a `Retry-After` header, and the wait in the message. It goes once an hour at most: inside the hour the answer is `429` with `error: invitation_recently_sent`.

Not both in one request: change the role first, then send the invitation again.

Changing the role works on every plan, Free included. Sending the invitation again is on paid plans: when the workspace owner is on Free, nothing is sent and the answer is `403` with `error: plan_limit_reached` and `limit: team`.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `team:update`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role in the workspace can't edit the team. | No. |
| 403 | `plan_limit_reached` | `resend_invitation` while the workspace owner is on Free (`limit: team`). | After the owner upgrades. |
| 403 | `team_read_only` | You're a member, not the owner, of a team that is read-only: the owner's plan stopped including one 7 days ago or more ([Team read-only](/docs/essentials/error-handling.md#team-read-only)). Nothing changed. | After the owner upgrades. |
| 404 | | No invitation still open with that id in the workspace: it was accepted, declined or cancelled. | No. |
| 422 | | Neither `role` nor `resend_invitation`, both, a role that isn't one of `roles`, or a workspace the key can't reach. | No: fix the request. |
| 429 | `rate_limited` | An invitation to this workspace already went to this address today, from the API or the app's Team page. Nothing was sent. | Yes, after `Retry-After` seconds. |
| 429 | `invitation_recently_sent` | It was sent again in the last hour. Nothing more was sent. | Yes, after `Retry-After` seconds. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [List team members](/docs/api-reference/team/list.md): the team and its invitations.
* [Cancel an invitation](/docs/api-reference/team/cancel-invitation.md): take it back.


## OpenAPI

````yaml PUT /team-members/invitations/{id}
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 14 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /team-members/invitations/{id}:
    put:
      tags:
        - Team
      summary: Update an invitation
      description: >-
        Needs `team:update`. Your role in the workspace must also let you edit
        the team: owners and admins can. Send `role` to change the role an
        invitation not accepted yet is for: they join with it when they accept,
        and it emails no one. Or send `resend_invitation: true` to send it
        again: the invited person gets one email with a new link that works for
        7 days, and the old link stops working. Not both in one request. One
        invitation goes to an address for each workspace a day, new or sent
        again, and invitations sent from the app's Team page count toward it: a
        second the same day answers `429` with `error: rate_limited`, a
        `Retry-After` header and the wait in the message. Changing the role
        works on every plan; sending it again is on paid plans.
      operationId: updateTeamInvitation
      parameters:
        - name: id
          in: path
          required: true
          description: 'The invitation''s id: `invitation_id` in the team list.'
          schema:
            type: integer
            example: 7
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
              properties:
                workspace_id:
                  type: integer
                  description: The workspace. It must be one the key can reach.
                role:
                  type: string
                  enum:
                    - APP_MANAGER
                    - APP_CONTENT_MANAGER
                    - APP_CONTENT_CREATOR
                    - APP_CLIENT
                  description: >-
                    The role they join with: a `name` from `roles` in the team
                    list. `APP_MANAGER` is Admin in the app and
                    `APP_CONTENT_MANAGER` is Publisher. Required unless
                    `resend_invitation` is true.
                resend_invitation:
                  type: boolean
                  description: >-
                    True to send the invitation again, with a new link and 7
                    more days. Leave `role` out.
            examples:
              default:
                summary: A new role
                value:
                  workspace_id: 12
                  role: APP_CONTENT_MANAGER
              resend_invitation:
                summary: Send the invitation again
                value:
                  workspace_id: 12
                  resend_invitation: true
      responses:
        '200':
          description: The invitation after the change.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
              examples:
                default:
                  summary: A new role
                  value:
                    id: null
                    workspace_id: 12
                    invitation_id: 7
                    name: null
                    email: mara@haldencoffee.com
                    avatar_url: >-
                      https://ui-avatars.com/api/?name=mara%40haldencoffee.com&color=FFFFFF&background=6366F1
                    role:
                      name: APP_CONTENT_MANAGER
                      label: Publisher
                      description: >-
                        Writes, edits, deletes, publishes and approves posts.
                        Sets up blog feeds. Writes and moderates team notes.
                        Replies to, hides and deletes comments on the social
                        networks. Manages the media library, campaigns, labels
                        and snippets. Uses AI on the workspace’s credits. Sees
                        social accounts, analytics and the calendar.
                      summary: Publishes and approves posts.
                      capabilities:
                        - key: posts.write
                          label: Write and edit posts
                          can: 'yes'
                        - key: posts.publish
                          label: Publish without approval
                          can: 'yes'
                        - key: posts.blog
                          label: Set up blog feeds
                          can: 'yes'
                        - key: posts.approve
                          label: Approve posts
                          can: 'yes'
                        - key: team-notes.write
                          label: Write team notes on posts
                          can: 'yes'
                        - key: team-notes.moderate
                          label: Delete other people’s team notes
                          can: 'yes'
                        - key: comments.reply
                          label: Reply to comments on the social networks
                          can: 'yes'
                        - key: comments.moderate
                          label: Hide and delete comments on the social networks
                          can: 'yes'
                        - key: accounts.manage
                          label: Connect and manage social accounts
                          can: view
                        - key: media-library.manage
                          label: Media library
                          can: 'yes'
                        - key: campaigns.manage
                          label: Campaigns
                          can: 'yes'
                        - key: labels.manage
                          label: Labels
                          can: 'yes'
                        - key: snippets.manage
                          label: Snippets
                          can: 'yes'
                        - key: team-members.manage
                          label: Invite and manage the team
                          can: 'no'
                        - key: workspace.settings
                          label: Change the workspace settings
                          can: 'no'
                        - key: workspace.delete
                          label: Delete the workspace
                          can: 'no'
                        - key: notifications.alerts
                          label: Set up Slack, Discord, Telegram and webhook alerts
                          can: 'no'
                        - key: ai.use
                          label: Use AI on the workspace’s credits
                          can: 'yes'
                        - key: billing.manage
                          label: Billing
                          can: 'no'
                        - key: api_integrations.manage
                          label: API keys
                          can: 'no'
                        - key: analytics.view
                          label: See analytics
                          can: 'yes'
                        - key: calendar.view
                          label: See the calendar
                          can: 'yes'
                      has_approval_permission: true
                      has_publishing_permission: true
                    is_active: false
                    joined_at: null
                    invited_at: '2030-03-15T09:00:00+00:00'
                    expires_at: '2030-03-22T09:00:00+00:00'
                    expired: false
                    invitation_url: >-
                      https://app.postsyncer.com/invitation?token=INVITATION_TOKEN
                    pending_approvals: 0
                resend_invitation:
                  summary: Sent again
                  value:
                    id: null
                    workspace_id: 12
                    invitation_id: 7
                    name: null
                    email: mara@haldencoffee.com
                    avatar_url: >-
                      https://ui-avatars.com/api/?name=mara%40haldencoffee.com&color=FFFFFF&background=6366F1
                    role:
                      name: APP_CONTENT_CREATOR
                      label: Content Creator
                      description: >-
                        Writes, edits and deletes posts. Their posts wait for
                        approval before they go out. Doesn’t set up blog feeds.
                        Writes and moderates team notes. Replies to, hides and
                        deletes comments on the social networks. Manages the
                        media library, campaigns, labels and snippets. Uses AI
                        on the workspace’s credits. Sees social accounts,
                        analytics and the calendar.
                      summary: Writes posts for approval.
                      capabilities:
                        - key: posts.write
                          label: Write and edit posts
                          can: 'yes'
                        - key: posts.publish
                          label: Publish without approval
                          can: 'no'
                        - key: posts.blog
                          label: Set up blog feeds
                          can: 'no'
                        - key: posts.approve
                          label: Approve posts
                          can: 'no'
                        - key: team-notes.write
                          label: Write team notes on posts
                          can: 'yes'
                        - key: team-notes.moderate
                          label: Delete other people’s team notes
                          can: 'yes'
                        - key: comments.reply
                          label: Reply to comments on the social networks
                          can: 'yes'
                        - key: comments.moderate
                          label: Hide and delete comments on the social networks
                          can: 'yes'
                        - key: accounts.manage
                          label: Connect and manage social accounts
                          can: view
                        - key: media-library.manage
                          label: Media library
                          can: 'yes'
                        - key: campaigns.manage
                          label: Campaigns
                          can: 'yes'
                        - key: labels.manage
                          label: Labels
                          can: 'yes'
                        - key: snippets.manage
                          label: Snippets
                          can: 'yes'
                        - key: team-members.manage
                          label: Invite and manage the team
                          can: 'no'
                        - key: workspace.settings
                          label: Change the workspace settings
                          can: 'no'
                        - key: workspace.delete
                          label: Delete the workspace
                          can: 'no'
                        - key: notifications.alerts
                          label: Set up Slack, Discord, Telegram and webhook alerts
                          can: 'no'
                        - key: ai.use
                          label: Use AI on the workspace’s credits
                          can: 'yes'
                        - key: billing.manage
                          label: Billing
                          can: 'no'
                        - key: api_integrations.manage
                          label: API keys
                          can: 'no'
                        - key: analytics.view
                          label: See analytics
                          can: 'yes'
                        - key: calendar.view
                          label: See the calendar
                          can: 'yes'
                      has_approval_permission: false
                      has_publishing_permission: false
                    is_active: false
                    joined_at: null
                    invited_at: '2030-03-15T09:00:00+00:00'
                    expires_at: '2030-03-22T09:00:00+00:00'
                    expired: false
                    invitation_url: >-
                      https://app.postsyncer.com/invitation?token=INVITATION_TOKEN
                    pending_approvals: 0
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `team:update`, its user is inactive, your role in the
            workspace can't edit the team, you're a member, not the owner, of a
            read-only team (`team_read_only`: the owner's plan stopped including
            one 7 days ago or more), or the invitation is sent again while the
            workspace owner is on Free (`plan_limit_reached`, `limit: team`).
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PlanLimitError'
                  - $ref: '#/components/schemas/Error'
              examples:
                team_read_only:
                  summary: A member of a read-only team
                  value:
                    message: >-
                      Mira Okafor's plan doesn't include a team, so you can only
                      view posts and write team notes in Halden Coffee. Ask them
                      to upgrade.
                    error: team_read_only
                missing_permission:
                  summary: The key lacks team:update
                  value:
                    message: >-
                      This API key does not have the "team:update" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                role:
                  summary: The role can't edit team members
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to edit team members. Ask the workspace owner or an
                      admin to do it, or to change your role.
                team_paid:
                  summary: 'Free: the team is one person'
                  value:
                    message: >-
                      Team members are on paid plans. Upgrade to invite your
                      team.
                    owner_plan: false
                    error: plan_limit_reached
                    limit: team
                    used: 0
                    allowed: 0
                    plan: free
                    resets_at: null
                    upgrade_url: >-
                      https://app.postsyncer.com/dashboard?action=settings&section=billing
                    upgrade_plan:
                      plan: starter-v2
                      name: Starter
                      monthly_price: 29
                      yearly_price: 24
                      accounts: 10
                      accounts_per_workspace: false
                team_paid_member:
                  summary: 'Free, asked by an admin: the owner must upgrade'
                  value:
                    message: >-
                      Team members are on paid plans, and this workspace's owner
                      is on the free plan. Only the workspace owner can upgrade,
                      so ask them to.
                    owner_plan: true
                    error: plan_limit_reached
                    limit: team
                    used: 0
                    allowed: 0
                    plan: free
                    resets_at: null
                    upgrade_url: null
                    upgrade_plan: null
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          description: >-
            No invitation still open with that id in the workspace: never sent,
            or already accepted, declined or cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  summary: No open invitation
                  value:
                    message: Invitation not found.
        '422':
          description: >-
            A field is missing or wrong, both `role` and `resend_invitation` are
            sent, or the workspace isn't one the key can reach.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/Error'
              examples:
                role_missing:
                  summary: Neither role nor resend_invitation
                  value:
                    message: The role field is required.
                    errors:
                      role:
                        - The role field is required.
                role:
                  summary: Not a role someone can be moved to
                  value:
                    message: The selected role is invalid.
                    errors:
                      role:
                        - The selected role is invalid.
                both:
                  summary: Both role and resend_invitation
                  value:
                    message: >-
                      Send role or resend_invitation, not both: change the role
                      first, then send the invitation again.
                    errors:
                      role:
                        - >-
                          Send role or resend_invitation, not both: change the
                          role first, then send the invitation again.
                workspace_id:
                  summary: Not a workspace the key can reach
                  value:
                    message: Invalid workspace ID.
                    errors:
                      workspace_id:
                        - Invalid workspace ID.
        '429':
          description: >-
            `resend_invitation` when an invitation to this workspace already
            went to this address today, from the API or the app's Team page
            (`error: rate_limited`), or another request sent the same invitation
            at the same moment (`error: invitation_recently_sent`): nothing more
            was sent. Or more than 60 requests in a minute from this key's user
            (`Too Many Attempts.`, with the `X-RateLimit-*` headers). Nothing
            was done. Wait `Retry-After` seconds.
          headers:
            Retry-After:
              description: Seconds until requests are allowed again.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: Requests allowed a minute.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left this minute.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: When requests are allowed again, as a Unix timestamp.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                address:
                  summary: This address was invited today
                  value:
                    error: rate_limited
                    message: >-
                      An invitation to this workspace already went to this
                      address today. You can send another in 24 hours.
                recently_sent:
                  summary: Sent by another request at the same moment
                  value:
                    error: invitation_recently_sent
                    message: >-
                      You already resent this invitation in the last hour. You
                      can resend it in 1 hour.
                too_many_attempts:
                  summary: Too many requests
                  value:
                    message: Too Many Attempts.
components:
  schemas:
    TeamMember:
      type: object
      description: >-
        A teammate, or an invitation not accepted yet. A member is named by
        `id`, their account id; an invitation by `invitation_id`, with `id`
        null: no account or membership exists for it until it is accepted.
      required:
        - id
        - workspace_id
        - invitation_id
        - name
        - email
        - avatar_url
        - role
        - is_active
        - joined_at
        - invited_at
        - expires_at
        - expired
        - invitation_url
        - pending_approvals
      properties:
        id:
          type: integer
          nullable: true
          description: >-
            A member's account id: the `{id}` in `/team-members/{id}`. Null for
            an invitation.
        workspace_id:
          type: integer
        invitation_id:
          type: integer
          nullable: true
          description: >-
            An invitation's id: the `{id}` in `/team-members/invitations/{id}`.
            Null for a member.
        name:
          type: string
          nullable: true
          description: >-
            A member's name. Until they set one, it is the email address's part
            before the @. Null for an invitation.
        email:
          type: string
          format: email
        avatar_url:
          type: string
          description: >-
            Their photo, or a picture of their initials (of the address, for an
            invitation).
        role:
          $ref: '#/components/schemas/TeamRole'
        is_active:
          type: boolean
          description: True for a member, false for an invitation not accepted yet.
        joined_at:
          type: string
          format: date-time
          nullable: true
          description: When a member joined. Null for an invitation.
        invited_at:
          type: string
          format: date-time
          nullable: true
          description: When an invitation was last sent. Null for a member.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When an invitation's link stops working: 7 days after it was last
            sent. Null for a member.
        expired:
          type: boolean
          description: >-
            True for an invitation whose link has expired. Send it again for a
            new link and 7 more days.
        invitation_url:
          type: string
          nullable: true
          description: >-
            An invitation's link to send that person yourself, when the key has
            `team:create` and its user may invite. Null otherwise, and for a
            member. It isn't the link in the invitation email: it opens the same
            invitation, but the invited person signs in (or signs up) before
            they can accept, and it never makes an account or signs anyone in.
        pending_approvals:
          type: integer
          description: >-
            Posts in this workspace waiting for this member's approval (not
            approved by them yet). Removing them sends any post left with no one
            asked who can approve it to the workspace's approvers. Always 0 for
            an invitation.
    PlanLimitError:
      type: object
      description: >-
        403: the workspace owner's plan doesn't include this, or its limit is
        used up. Nothing was saved. `limit` says which.
      required:
        - message
        - owner_plan
        - error
        - limit
        - used
        - allowed
        - plan
        - resets_at
        - upgrade_url
        - upgrade_plan
      properties:
        message:
          type: string
          description: What the plan doesn't allow, and what to do.
        owner_plan:
          type: boolean
          description: >-
            True when the plan is someone else's (the key's user isn't the
            workspace owner): only the owner can change it, and `message` says
            to ask them.
        error:
          type: string
          enum:
            - plan_limit_reached
        limit:
          type: string
          enum:
            - accounts
            - posts
            - workspaces
            - team
            - labels
            - campaigns
            - ai
            - moderation
            - contacts
            - crm
            - products
            - analytics
            - free_accounts
            - client_signoff
          description: >-
            What ran out: `accounts`, `posts` (this month's posts) and
            `workspaces` are counted; `free_accounts` is a post to an account
            other than the 2 a Free owner posts to outside a first week (the
            account's `plan_allows_posting` is `false`); `team`, `labels`,
            `campaigns`, `ai`, `moderation` (comment moderation), `contacts`
            (contact collection), `crm` (contacts and contact lists) and
            `products` and `client_signoff` (client sign-off and client
            reviewers) are on paid plans only. `analytics` (more than the last 7
            days) comes from the app only: API v1 and MCP don't refuse analytics
            on Free, they keep the numbers to the last 7 days, outside an
            owner's first week, and say so in `range_limited`.
        used:
          type: integer
          description: How much of the limit is used; 0 for a paid-plan feature.
        allowed:
          type: integer
          description: What the plan allows; 0 for a paid-plan feature.
        plan:
          type: string
          description: The owner's plan, like `free`.
        resets_at:
          type: string
          format: date-time
          nullable: true
          description: When a monthly limit starts again; null for the others.
        upgrade_url:
          type: string
          nullable: true
          description: Where the owner picks a plan; null when the plan is someone else's.
        upgrade_plan:
          type: object
          nullable: true
          description: >-
            The smallest plan that lifts the limit; null when the plan is
            someone else's or no plan lifts it.
          required:
            - plan
            - name
            - monthly_price
            - yearly_price
            - accounts
            - accounts_per_workspace
          properties:
            plan:
              type: string
              description: The plan's key.
            name:
              type: string
              description: The plan's name.
            monthly_price:
              type: integer
            yearly_price:
              type: integer
            accounts:
              type: integer
              description: The social accounts the plan includes.
            accounts_per_workspace:
              type: boolean
              description: True when `accounts` counts per workspace rather than in all.
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
    TeamRole:
      type: object
      description: A role in a workspace.
      required:
        - name
        - label
        - description
        - summary
        - capabilities
        - has_approval_permission
        - has_publishing_permission
      properties:
        name:
          type: string
          enum:
            - APP_OWNER
            - APP_MANAGER
            - APP_CONTENT_MANAGER
            - APP_CONTENT_CREATOR
            - APP_CLIENT
          description: >-
            The role to send as `role`. `APP_OWNER` is the workspace owner's,
            and is never given. `APP_MANAGER` is Admin in the app and
            `APP_CONTENT_MANAGER` is Publisher.
        label:
          type: string
          description: >-
            The role as the app names it: Owner, Admin, Publisher, Content
            Creator or Client.
        description:
          type: string
          description: >-
            What the role can do, in full. Written from the same rules
            PostSyncer checks, so it changes when they do.
        summary:
          type: string
          description: What the role can do, in short, as the app's role picker shows it.
        capabilities:
          type: array
          description: >-
            What the role can do, one row per thing, as the app's Roles table
            shows it. Rows may be added as features change; a row's `key` stays
            the same, so treat a key you don't know like any other row.
          items:
            type: object
            required:
              - key
              - label
              - can
            properties:
              key:
                type: string
                description: The same for every role, such as `posts.publish`.
              label:
                type: string
                description: What it is, such as `Publish without approval`.
              can:
                type: string
                enum:
                  - 'yes'
                  - view
                  - 'no'
                description: '`yes`: the role can; `view`: it only sees it; `no`: it can''t.'
        has_approval_permission:
          type: boolean
          description: Whether the role can approve posts.
        has_publishing_permission:
          type: boolean
          description: Whether the role can publish without approval.
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.