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

# Update AI playbook

> Update the company AI playbook for the workspace.

This endpoint is deliberately additive. Nothing you leave out is changed:

- Omit a section (`productsServices`, `idealCustomerProfiles`, `competitors`, `testimonials`, `faqs`) and that whole section is untouched.
- Items missing from a section's `upsert` array are untouched — sending a shorter list never removes the rest.
- Items are matched by their natural key (products, profiles and competitors by `name`; testimonials by `companyName` + `promoterName`; FAQs by `question`). A match updates the existing item, a new key creates one, and a key that was removed earlier is restored.
- The only way to remove something is to list its id in that section's `deleteIds`. Removals are reversible: sending the same key again restores the item.
- Company-level fields are written only when provided and non-empty.

`idealCompanies` and the `linkedInFilters` of an ideal customer profile are generated by Enginy and cannot be written here.

Call `GET /v1/ai-playbook` first to read the current ids and values. The response returns the full playbook after the write plus a `changes` summary of what was created, updated, restored, and deleted per section.

    > **Required scope:** `WORKSPACE_WRITE`
    >
    > **Rate limit:** 30 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json put /v1/ai-playbook
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/ai-playbook:
    put:
      tags:
        - AI Playbook
      summary: Update AI playbook
      description: >-
        Update the company AI playbook for the workspace.


        This endpoint is deliberately additive. Nothing you leave out is
        changed:


        - Omit a section (`productsServices`, `idealCustomerProfiles`,
        `competitors`, `testimonials`, `faqs`) and that whole section is
        untouched.

        - Items missing from a section's `upsert` array are untouched — sending
        a shorter list never removes the rest.

        - Items are matched by their natural key (products, profiles and
        competitors by `name`; testimonials by `companyName` + `promoterName`;
        FAQs by `question`). A match updates the existing item, a new key
        creates one, and a key that was removed earlier is restored.

        - The only way to remove something is to list its id in that section's
        `deleteIds`. Removals are reversible: sending the same key again
        restores the item.

        - Company-level fields are written only when provided and non-empty.


        `idealCompanies` and the `linkedInFilters` of an ideal customer profile
        are generated by Enginy and cannot be written here.


        Call `GET /v1/ai-playbook` first to read the current ids and values. The
        response returns the full playbook after the write plus a `changes`
        summary of what was created, updated, restored, and deleted per section.

            > **Required scope:** `WORKSPACE_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                company:
                  type: object
                  properties:
                    company:
                      type: string
                      maxLength: 20000
                      description: Company name. Omit to leave it unchanged.
                    companyIndustry:
                      type: string
                      maxLength: 20000
                      description: Company industry. Omit to leave it unchanged.
                    companyNumberOfEmployees:
                      type: string
                      maxLength: 20000
                      description: >-
                        Company size or number of employees. Omit to leave it
                        unchanged.
                    companyHeadquartersLocation:
                      type: string
                      maxLength: 20000
                      description: >-
                        Company headquarters location. Omit to leave it
                        unchanged.
                    companyFoundingYear:
                      type: string
                      maxLength: 20000
                      description: Company founding year. Omit to leave it unchanged.
                    companyWebsite:
                      type: string
                      maxLength: 20000
                      description: Company website URL. Omit to leave it unchanged.
                    companyLinkedinUrl:
                      type: string
                      maxLength: 20000
                      description: Company LinkedIn URL. Omit to leave it unchanged.
                    companyOverview:
                      type: string
                      maxLength: 20000
                      description: >-
                        Company overview used for AI personalization. Omit to
                        leave it unchanged.
                  additionalProperties: false
                  description: >-
                    Company-level playbook fields. Only the fields you provide
                    are written; empty strings and null are ignored so a field
                    is never cleared by accident.
                productsServices:
                  type: object
                  properties:
                    upsert:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Product or service name. This is the match key: an
                              existing product with this exact name is updated,
                              otherwise a new one is created.
                          description:
                            type: string
                            maxLength: 20000
                            description: >-
                              Product or service description. Required when
                              creating a new product.
                          valueProposition:
                            type:
                              - string
                              - 'null'
                            maxLength: 20000
                            description: Value proposition. Send null to clear it.
                          isMainProduct:
                            type: boolean
                            description: >-
                              Mark this product as the workspace main product.
                              Only one product can be main — setting a new one
                              unsets the previous one.
                        required:
                          - name
                        additionalProperties: false
                      maxItems: 50
                      description: >-
                        Products and services to create or update, matched by
                        name. Products not listed here are left untouched.
                    deleteIds:
                      type: array
                      items:
                        type: integer
                        exclusiveMinimum: 0
                      maxItems: 50
                      description: >-
                        IDs of products to remove. This is the only way this
                        endpoint removes a product.
                  additionalProperties: false
                  description: >-
                    Products and services. Omit this key to leave the whole
                    section untouched.
                idealCustomerProfiles:
                  type: object
                  properties:
                    upsert:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Profile name. This is the match key: an existing
                              profile with this exact name is updated, otherwise
                              a new one is created.
                          jobTitles:
                            type: array
                            items:
                              type: string
                              maxLength: 200
                            maxItems: 100
                            description: >-
                              Target job titles. Replaces the stored list when
                              provided.
                          locations:
                            type: array
                            items:
                              type: string
                              maxLength: 200
                            maxItems: 100
                            description: >-
                              Target locations. Replaces the stored list when
                              provided.
                          companyIndustry:
                            type: string
                            maxLength: 20000
                            description: >-
                              Target company industries. Required when creating
                              a new profile.
                          companySize:
                            type: string
                            maxLength: 20000
                            description: >-
                              Target company sizes. Required when creating a new
                              profile.
                          keyPainPoints:
                            type: string
                            maxLength: 20000
                            description: >-
                              Key pain points for this profile. Required when
                              creating a new profile.
                          additionalInfo:
                            type:
                              - string
                              - 'null'
                            maxLength: 20000
                            description: Additional profile context. Send null to clear it.
                          revenue:
                            type: array
                            items:
                              type: string
                              maxLength: 200
                            maxItems: 100
                            description: >-
                              Target revenue ranges. Replaces the stored list
                              when provided.
                          disqualifyingFactors:
                            type:
                              - string
                              - 'null'
                            maxLength: 20000
                            description: >-
                              Factors that disqualify prospects from this
                              profile. Send null to clear it.
                        required:
                          - name
                        additionalProperties: false
                      maxItems: 50
                      description: >-
                        Ideal customer profiles to create or update, matched by
                        name. Profiles not listed here are left untouched. Their
                        LinkedIn filters are regenerated automatically and
                        cannot be written.
                    deleteIds:
                      type: array
                      items:
                        type: integer
                        exclusiveMinimum: 0
                      maxItems: 50
                      description: >-
                        IDs of ideal customer profiles to remove. This is the
                        only way this endpoint removes a profile.
                  additionalProperties: false
                  description: >-
                    Ideal customer profiles. Omit this key to leave the whole
                    section untouched.
                competitors:
                  type: object
                  properties:
                    upsert:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Competitor name. This is the match key: an
                              existing competitor with this exact name is
                              updated, otherwise a new one is created.
                          productDifferentiator:
                            type: string
                            maxLength: 20000
                            description: >-
                              How this workspace differentiates from the
                              competitor. Required when creating a new
                              competitor.
                          linkedInUrl:
                            type:
                              - string
                              - 'null'
                            maxLength: 20000
                            description: Competitor LinkedIn URL. Send null to clear it.
                        required:
                          - name
                        additionalProperties: false
                      maxItems: 50
                      description: >-
                        Competitors to create or update, matched by name.
                        Competitors not listed here are left untouched.
                    deleteIds:
                      type: array
                      items:
                        type: integer
                        exclusiveMinimum: 0
                      maxItems: 50
                      description: >-
                        IDs of competitors to remove. This is the only way this
                        endpoint removes a competitor.
                  additionalProperties: false
                  description: >-
                    Competitors. Omit this key to leave the whole section
                    untouched.
                testimonials:
                  type: object
                  properties:
                    upsert:
                      type: array
                      items:
                        type: object
                        properties:
                          companyName:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Customer company name. Part of the match key with
                              promoterName.
                          promoterName:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Promoter name. Part of the match key with
                              companyName.
                          jobPosition:
                            type: string
                            maxLength: 20000
                            description: >-
                              Promoter job position. Required when creating a
                              new testimonial.
                          mainBenefit:
                            type: string
                            maxLength: 20000
                            description: >-
                              Main benefit from the testimonial. Required when
                              creating a new testimonial.
                        required:
                          - companyName
                          - promoterName
                        additionalProperties: false
                      maxItems: 50
                      description: >-
                        Testimonials to create or update, matched by company
                        name + promoter name. Testimonials not listed here are
                        left untouched.
                    deleteIds:
                      type: array
                      items:
                        type: integer
                        exclusiveMinimum: 0
                      maxItems: 50
                      description: >-
                        IDs of testimonials to remove. This is the only way this
                        endpoint removes a testimonial.
                  additionalProperties: false
                  description: >-
                    Testimonials. Omit this key to leave the whole section
                    untouched.
                faqs:
                  type: object
                  properties:
                    upsert:
                      type: array
                      items:
                        type: object
                        properties:
                          question:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Question. This is the match key: an existing FAQ
                              with this exact question is updated, otherwise a
                              new one is created.
                          answer:
                            type: string
                            maxLength: 20000
                            description: Answer. Required when creating a new FAQ.
                        required:
                          - question
                        additionalProperties: false
                      maxItems: 50
                      description: >-
                        FAQs to create or update, matched by question. FAQs not
                        listed here are left untouched.
                    deleteIds:
                      type: array
                      items:
                        type: integer
                        exclusiveMinimum: 0
                      maxItems: 50
                      description: >-
                        IDs of FAQs to remove. This is the only way this
                        endpoint removes a FAQ.
                  additionalProperties: false
                  description: FAQs. Omit this key to leave the whole section untouched.
              additionalProperties: false
            examples:
              addOneFaq:
                summary: Add a single FAQ and leave everything else alone
                value:
                  faqs:
                    upsert:
                      - question: Do you offer a free trial?
                        answer: Yes, 14 days.
              removeOneCompetitor:
                summary: Remove one competitor by id
                value:
                  competitors:
                    deleteIds:
                      - 42
      responses:
        '200':
          description: The playbook after the update, plus a summary of what changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      company:
                        type: object
                        properties:
                          name:
                            type:
                              - string
                              - 'null'
                            description: Workspace name.
                          company:
                            type:
                              - string
                              - 'null'
                            description: Company name used in the AI playbook.
                          companyIndustry:
                            type:
                              - string
                              - 'null'
                            description: Company industry.
                          companyNumberOfEmployees:
                            type:
                              - string
                              - 'null'
                            description: Company size or number of employees.
                          companyHeadquartersLocation:
                            type:
                              - string
                              - 'null'
                            description: Company headquarters location.
                          companyFoundingYear:
                            type:
                              - string
                              - 'null'
                            description: Company founding year.
                          companyWebsite:
                            type:
                              - string
                              - 'null'
                            description: Company website URL.
                          companyLinkedinUrl:
                            type:
                              - string
                              - 'null'
                            description: Company LinkedIn URL.
                          companyOverview:
                            type:
                              - string
                              - 'null'
                            description: Company overview used for AI personalization.
                          companyProductsServices:
                            type:
                              - string
                              - 'null'
                            description: Legacy company products and services description.
                        required:
                          - name
                          - company
                          - companyIndustry
                          - companyNumberOfEmployees
                          - companyHeadquartersLocation
                          - companyFoundingYear
                          - companyWebsite
                          - companyLinkedinUrl
                          - companyOverview
                          - companyProductsServices
                        description: Company-level AI playbook information.
                      allCompanyProductsServices:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: Product or service ID.
                            name:
                              type: string
                              description: Product or service name.
                            description:
                              type: string
                              description: Product or service description.
                            valueProposition:
                              type:
                                - string
                                - 'null'
                              description: Value proposition for this product or service.
                            minPrice:
                              type:
                                - number
                                - 'null'
                              description: Minimum price, when configured.
                            maxPrice:
                              type:
                                - number
                                - 'null'
                              description: Maximum price, when configured.
                            currency:
                              type:
                                - string
                                - 'null'
                              description: Currency for configured prices.
                            isMainProduct:
                              type: boolean
                              description: Whether this is the main product or service.
                          required:
                            - id
                            - name
                            - description
                            - valueProposition
                            - minPrice
                            - maxPrice
                            - currency
                            - isMainProduct
                        description: Products and services configured in the AI playbook.
                      idealCustomerProfiles:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: Ideal customer profile ID.
                            name:
                              type: string
                              description: Ideal customer profile name.
                            jobTitles:
                              type: array
                              items:
                                type: string
                              description: Target job titles.
                            locations:
                              type: array
                              items:
                                type: string
                              description: Target locations.
                            companyIndustry:
                              type: string
                              description: Target company industries.
                            companySize:
                              type: string
                              description: Target company sizes.
                            keyPainPoints:
                              type: string
                              description: Key pain points for this profile.
                            additionalInfo:
                              type:
                                - string
                                - 'null'
                              description: Additional profile context.
                            revenue:
                              type: array
                              items:
                                type: string
                              description: Target revenue ranges.
                            disqualifyingFactors:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Factors that disqualify prospects from this
                                profile.
                            linkedInFilters:
                              description: >-
                                LinkedIn search filters associated with this
                                profile.
                          required:
                            - id
                            - name
                            - jobTitles
                            - locations
                            - companyIndustry
                            - companySize
                            - keyPainPoints
                            - additionalInfo
                            - revenue
                            - disqualifyingFactors
                        description: Ideal customer profiles configured in the AI playbook.
                      idealCompanies:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: Ideal company ID.
                            name:
                              type: string
                              description: Ideal company name.
                            industry:
                              type:
                                - string
                                - 'null'
                              description: Ideal company industry.
                            imageUrl:
                              type:
                                - string
                                - 'null'
                              description: Ideal company image URL.
                            description:
                              type:
                                - string
                                - 'null'
                              description: Ideal company description.
                            linkedInUrl:
                              type:
                                - string
                                - 'null'
                              description: Ideal company LinkedIn URL.
                            companyUrn:
                              type: string
                              description: LinkedIn company URN.
                          required:
                            - id
                            - name
                            - industry
                            - imageUrl
                            - description
                            - linkedInUrl
                            - companyUrn
                        description: Ideal companies configured in the AI playbook.
                      competitors:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: Competitor ID.
                            name:
                              type: string
                              description: Competitor name.
                            productDifferentiator:
                              type: string
                              description: >-
                                How this workspace differentiates from the
                                competitor.
                            linkedInUrl:
                              type:
                                - string
                                - 'null'
                              description: Competitor LinkedIn URL.
                          required:
                            - id
                            - name
                            - productDifferentiator
                            - linkedInUrl
                        description: Competitors configured in the AI playbook.
                      testimonials:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: Testimonial ID.
                            companyName:
                              type: string
                              description: Customer company name.
                            promoterName:
                              type: string
                              description: Promoter name.
                            jobPosition:
                              type: string
                              description: Promoter job position.
                            mainBenefit:
                              type: string
                              description: Main benefit from the testimonial.
                          required:
                            - id
                            - companyName
                            - promoterName
                            - jobPosition
                            - mainBenefit
                        description: Testimonials configured in the AI playbook.
                      faqs:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                              description: FAQ ID.
                            question:
                              type: string
                              description: Question.
                            answer:
                              type: string
                              description: Answer.
                          required:
                            - id
                            - question
                            - answer
                        description: FAQs configured in the AI playbook.
                      changes:
                        type: object
                        properties:
                          companyFieldsUpdated:
                            type: integer
                            description: Number of company-level fields written.
                          productsServices:
                            type: object
                            properties:
                              created:
                                type: integer
                                description: Items created in this section.
                              updated:
                                type: integer
                                description: Existing items updated in this section.
                              restored:
                                type: integer
                                description: >-
                                  Previously removed items brought back in this
                                  section.
                              deleted:
                                type: integer
                                description: >-
                                  Items removed in this section, always via
                                  deleteIds.
                            required:
                              - created
                              - updated
                              - restored
                              - deleted
                          idealCustomerProfiles:
                            type: object
                            properties:
                              created:
                                type: integer
                                description: Items created in this section.
                              updated:
                                type: integer
                                description: Existing items updated in this section.
                              restored:
                                type: integer
                                description: >-
                                  Previously removed items brought back in this
                                  section.
                              deleted:
                                type: integer
                                description: >-
                                  Items removed in this section, always via
                                  deleteIds.
                            required:
                              - created
                              - updated
                              - restored
                              - deleted
                          competitors:
                            type: object
                            properties:
                              created:
                                type: integer
                                description: Items created in this section.
                              updated:
                                type: integer
                                description: Existing items updated in this section.
                              restored:
                                type: integer
                                description: >-
                                  Previously removed items brought back in this
                                  section.
                              deleted:
                                type: integer
                                description: >-
                                  Items removed in this section, always via
                                  deleteIds.
                            required:
                              - created
                              - updated
                              - restored
                              - deleted
                          testimonials:
                            type: object
                            properties:
                              created:
                                type: integer
                                description: Items created in this section.
                              updated:
                                type: integer
                                description: Existing items updated in this section.
                              restored:
                                type: integer
                                description: >-
                                  Previously removed items brought back in this
                                  section.
                              deleted:
                                type: integer
                                description: >-
                                  Items removed in this section, always via
                                  deleteIds.
                            required:
                              - created
                              - updated
                              - restored
                              - deleted
                          faqs:
                            type: object
                            properties:
                              created:
                                type: integer
                                description: Items created in this section.
                              updated:
                                type: integer
                                description: Existing items updated in this section.
                              restored:
                                type: integer
                                description: >-
                                  Previously removed items brought back in this
                                  section.
                              deleted:
                                type: integer
                                description: >-
                                  Items removed in this section, always via
                                  deleteIds.
                            required:
                              - created
                              - updated
                              - restored
                              - deleted
                        required:
                          - companyFieldsUpdated
                          - productsServices
                          - idealCustomerProfiles
                          - competitors
                          - testimonials
                          - faqs
                        description: >-
                          What this request actually changed, so the caller can
                          verify the outcome.
                    required:
                      - company
                      - allCompanyProductsServices
                      - idealCustomerProfiles
                      - idealCompanies
                      - competitors
                      - testimonials
                      - faqs
                      - changes
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            The request referenced ids or items that could not be applied.
            Nothing was written.
        '404':
          description: Workspace not found
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````