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

# Update user data via Zapier

> Partial update — only supplied fields are modified. Supports
email preferences, council assignment, and role changes.

Requires the `X-API-Key` header (Zapier API key).




## OpenAPI

````yaml /openapi/private/specs/wp/wp-webhooks.yml patch /zapier/user/{user_id}
openapi: 3.1.0
info:
  title: >-
    SageScreen — Webhooks & CRM Integrations (Billing · Council · User · Deal ·
    Sage)
  version: 1.0.0
servers:
  - url: https://{domain}/wp-json/sagescreen/v1
    description: WordPress REST API
    variables:
      domain:
        default: api.sagescreen.app
security: []
tags:
  - name: Billing – Stripe
    description: Stripe webhook and subscription endpoints
  - name: Billing – Broadcast
    description: Postmark broadcast unsubscribe endpoint
  - name: Billing – Pipedrive
    description: Pipedrive CRM ID set-* webhook endpoints (called by Zapier)
  - name: Billing – AJAX
    description: Credit ledger, reactivation, and portal AJAX endpoints
  - name: Council – REST
    description: Zapier-facing REST endpoints for council data sync
  - name: Council – AJAX
    description: Council user and sage management AJAX endpoints
  - name: User – REST
    description: Zapier-facing REST endpoints
  - name: User – AJAX
    description: Council user management AJAX endpoints
  - name: User – Profile
    description: Self-service profile updates
  - name: Deal REST
    description: REST API endpoints authenticated via X-API-Key
  - name: Deal AJAX
    description: AJAX endpoints authenticated via WordPress nonce + capability check
  - name: Sage – REST
    description: REST API endpoints for sage operations and Python callbacks
  - name: Sage – CRUD
    description: AJAX endpoints for sage creation, editing, and status management
  - name: Sage – Build Workflow
    description: AJAX endpoints for the multi-step sage build process
paths:
  /zapier/user/{user_id}:
    patch:
      tags:
        - User – REST
      summary: Update user data via Zapier
      description: |
        Partial update — only supplied fields are modified. Supports
        email preferences, council assignment, and role changes.

        Requires the `X-API-Key` header (Zapier API key).
      operationId: zapierUpdateUser
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            examples:
              - '42'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ZapierUpdateUserRequest'
            examples:
              updatePrefs:
                summary: Update email preferences
                value:
                  email_product_updates: true
                  email_product_marketing: false
              changeCouncil:
                summary: Reassign to different council
                value:
                  council_id: new-council-uuid
                  role: council_power_user
              deactivate:
                summary: Deactivate user
                value:
                  active: false
      responses:
        '200':
          description: User updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZapierUpdateUserResponse'
              example:
                success: true
                data:
                  user_id: 42
                  updated:
                    email_product_updates: true
                    council_id: new-council-uuid
                    role: council_power_user
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPublicWPError'
              examples:
                invalidId:
                  summary: Invalid identifier
                  value:
                    code: invalid_identifier
                    message: Invalid user identifier format. Use numeric ID or UUID
                    data:
                      status: 400
                councilNotFound:
                  summary: Council UUID not found
                  value:
                    code: council_not_found
                    message: Council not found for provided council_id
                    data:
                      status: 400
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPublicWPError'
              example:
                code: invalid_api_key
                message: Invalid or missing API key
                data:
                  status: 401
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPublicWPError'
              example:
                code: user_not_found
                message: 'User not found for ID: 9999'
                data:
                  status: 404
      security:
        - apiKey: []
components:
  schemas:
    ZapierUpdateUserRequest:
      type: object
      description: Partial update — only supplied fields are modified
      properties:
        email_product_updates:
          type: boolean
          examples:
            - true
        email_product_marketing:
          type: boolean
          examples:
            - false
        council_id:
          type: string
          format: uuid
          description: Reassign to a different council (must exist)
          examples:
            - c9d8e7f6-5a4b-3c2d-1e0f-a1b2c3d4e5f6
        role:
          type: string
          enum:
            - council_admin
            - council_power_user
            - council_member
            - member
          description: Set role (invalid values silently ignored with log)
          examples:
            - council_power_user
        active:
          type: boolean
          description: If false and no `role` given, sets role to `member` (deactivated)
          examples:
            - false
    ZapierUpdateUserResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - user_id
            - updated
          properties:
            user_id:
              type: integer
              examples:
                - 42
            updated:
              type: object
              description: Only the fields that were actually modified
              additionalProperties: true
    UserPublicWPError:
      type: object
      description: Standard WordPress REST API error envelope
      required:
        - code
        - message
        - data
      properties:
        code:
          type: string
          examples:
            - user_not_found
        message:
          type: string
          examples:
            - User not found
        data:
          type: object
          required:
            - status
          properties:
            status:
              type: integer
              examples:
                - 404
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: SageScreen API key stored in `ss_zapier_api_key` option

````