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

# Check whether the current identity has a project permission

> Debug endpoint. Resolves the caller identity and returns whether it holds the given project-scoped permission.



## OpenAPI

````yaml https://api.sapt.ai/openapi.json get /auth/check-permission
openapi: 3.1.0
info:
  title: Sapt Platform API
  version: 1.0.0
  description: >-
    API for Sapt platform - project management, authentication, and email
    services
servers:
  - url: https://api.sapt.ai
    description: Production
  - url: http://localhost:8787
    description: Local development
security: []
tags:
  - name: Accounts
    description: >-
      The social accounts connected to a project. Start here — the `id` of an
      account is the `socialAccountId` that every posting, scheduling and
      analytics call takes.
  - name: Actions
  - name: Ads
  - name: Agents
  - name: Analytics
    description: >-
      Account- and post-level organic performance for connected Instagram and
      Facebook accounts.
  - name: Assets
  - name: Auth
  - name: CMS
  - name: CRM
  - name: Calendar
  - name: Comments
    description: >-
      Read, reply to, hide and delete comments on published Instagram and
      Facebook posts.
  - name: Content Calendar
    description: >-
      Create, schedule, update and publish organic posts, and stage the media
      they carry. Publishing a post whose status is `failed` retries it.
  - name: Contracts
  - name: Conversions
    description: >-
      Meta server-side Conversions API (CAPI): discover pixels, connect a pixel
      + CAPI token, and send deduped server-side conversions.
  - name: Dashboard Sidebar
  - name: Emails
  - name: Engagement
    description: >-
      Act as the Page or account on published posts: comment, like, unlike, and
      delete a published post.
  - name: Geo
  - name: Google Ads
  - name: Google Analytics
  - name: Google Business
  - name: Integrations
    description: >-
      Connect third-party providers (Meta, Gmail, Google Business Profile, …).
      List providers, mint OAuth connect links, and poll connection status.
  - name: Invitations
  - name: Memory
  - name: OAuth Clients
  - name: Project Roles
  - name: Project Templates
  - name: Projects
  - name: Schedules
  - name: Service Accounts
  - name: Socials
    description: >-
      Organic social: the connected accounts, the content calendar, media
      staging, publishing, comments and engagement across Instagram, Facebook,
      TikTok, YouTube and Google Business Profile.
  - name: Team
  - name: Users
  - name: Web Analytics
  - name: Workflows
paths:
  /auth/check-permission:
    get:
      tags:
        - Auth
      summary: Check whether the current identity has a project permission
      description: >-
        Debug endpoint. Resolves the caller identity and returns whether it
        holds the given project-scoped permission.
      operationId: checkPermission
      parameters:
        - schema:
            type: string
            enum:
              - settings:read
              - settings:write
              - settings:manage
              - members:read
              - members:write
              - members:manage
              - roles:read
              - roles:write
              - roles:manage
              - audit_log:read
              - audit_log:write
              - audit_log:manage
              - crm_types:read
              - crm_types:write
              - crm_types:manage
              - crm_objects:read
              - crm_objects:write
              - crm_objects:manage
              - cms_types:read
              - cms_types:write
              - cms_types:manage
              - cms_items:read
              - cms_items:write
              - cms_items:manage
              - meta_planner:read
              - meta_planner:write
              - meta_planner:manage
              - assets:read
              - assets:write
              - assets:manage
              - workflows:read
              - workflows:write
              - workflows:manage
              - integrations:read
              - integrations:write
              - integrations:manage
              - oauth_clients:read
              - oauth_clients:write
              - oauth_clients:manage
              - agents:read
              - agents:write
              - agents:manage
              - web_analytics:read
              - web_analytics:write
              - web_analytics:manage
              - social:read
              - social:write
              - social:manage
              - tenant_email:read
              - tenant_email:write
              - tenant_email:manage
              - meta_ads:read
              - meta_ads:write
              - meta_ads:manage
              - google_ads:read
              - google_ads:write
              - google_ads:manage
              - google_business:read
              - google_business:write
              - google_business:manage
              - contracts:read
              - contracts:write
              - contracts:manage
              - service_accounts:read
              - service_accounts:write
              - service_accounts:manage
              - support_tickets:read
              - support_tickets:write
              - support_tickets:manage
              - billing:read
              - billing:write
              - billing:manage
              - calendar:read
              - calendar:write
              - calendar:manage
              - sub_projects:read
              - sub_projects:write
              - sub_projects:manage
              - project_templates:read
              - project_templates:write
              - project_templates:manage
          required: true
          name: permission
          in: query
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: query
      responses:
        '200':
          description: Permission check result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckPermissionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
      security:
        - bearerAuth: []
components:
  schemas:
    CheckPermissionResponse:
      type: object
      properties:
        allowed:
          type: boolean
      required:
        - allowed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT token obtained from /api/auth/token endpoint. Token is verified
        using JWKS and must include a valid user identifier.

````