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

# CreateApprovalPolicyAPI creates a standing policy without executing the


> action it covers.




## OpenAPI

````yaml /api/openapi.json post /v1/approval-policies
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-10-22'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/approval-policies:
    post:
      summary: |
        CreateApprovalPolicyAPI creates a standing policy without executing the
      description: |
        action it covers.
      operationId: POST:mcp.CreateApprovalPolicyAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                action_key:
                  type: string
                decision:
                  title: |
                    "always_approve", "always_require"
                  type: string
                expires_at:
                  format: date-time
                  type: string
                  nullable: true
                parameter_constraints:
                  type: object
                  nullable: true
                scope_id:
                  format: uuid
                  title: |
                    job_id, workstream_id, or user_id (NULL for org-wide)
                  type: string
                  nullable: true
                scope_type:
                  title: |
                    "organization", "job", "workstream", "user"
                  type: string
              type: object
              required:
                - action_key
                - scope_type
                - decision
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  policy:
                    $ref: '#/components/schemas/types.ApprovalPolicy'
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    types.ApprovalPolicy:
      properties:
        action_key:
          type: string
        created_at:
          format: date-time
          type: string
        created_by_user_id:
          format: uuid
          type: string
        decision:
          type: string
        expires_at:
          format: date-time
          type: string
          nullable: true
        id:
          format: uuid
          type: string
        organization_id:
          format: uuid
          type: string
        parameter_constraints:
          type: object
          nullable: true
        scope_id:
          format: uuid
          type: string
          nullable: true
        scope_type:
          type: string
      title: |
        ApprovalPolicy represents a standing approval policy.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

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