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

# Sync From Clay

> Webhook endpoint for Clay to sync GTM demo data.

This endpoint receives data from Clay tables and upserts it into
the gtm_demos table. If a demo with the same slug exists, it will
be updated; otherwise, a new demo will be created.

Configure Clay to send a POST request to:
https://api.ontora.com/v1/demo/sync-from-clay

Optional: Set CLAY_WEBHOOK_SECRET env var and include it in
the X-Clay-Secret header for verification.



## OpenAPI

````yaml /openapi.json post /v1/demo/sync-from-clay
openapi: 3.1.0
info:
  title: Ontora API
  description: >-
    Ontora's public API. Covers interview campaigns, transcripts, synthesis
    reports, graph queries, webhooks, and workspace management. 


    **Authentication**: endpoints accept either a Clerk JWT (`Authorization:
    Bearer <token>`) or a workspace API key (`X-API-Key: ont_...`). Workspace
    keys are managed via `/v1/api-keys`.
  version: 0.1.0
servers: []
security:
  - ClerkJWT: []
  - WorkspaceApiKey: []
tags:
  - name: interviews
    description: Campaign CRUD, lifecycle, contacts, question sets.
  - name: campaign-insights
    description: Synthesis outputs — cartography, roadmap, personas, conversations.
  - name: interview-query
    description: Graph RAG query over campaign data.
  - name: interview-export
    description: Markdown / ZIP exports of transcripts and reports.
  - name: api-keys
    description: Manage workspace-scoped API keys for programmatic access.
  - name: webhook-endpoints
    description: Outbound webhook endpoints for automation.
  - name: booking
    description: Public self-scheduling endpoints for interview participants.
  - name: workspaces
    description: Workspace and membership management.
  - name: vaults
    description: Context vault management.
paths:
  /v1/demo/sync-from-clay:
    post:
      tags:
        - demo
      summary: Sync From Clay
      description: |-
        Webhook endpoint for Clay to sync GTM demo data.

        This endpoint receives data from Clay tables and upserts it into
        the gtm_demos table. If a demo with the same slug exists, it will
        be updated; otherwise, a new demo will be created.

        Configure Clay to send a POST request to:
        https://api.ontora.com/v1/demo/sync-from-clay

        Optional: Set CLAY_WEBHOOK_SECRET env var and include it in
        the X-Clay-Secret header for verification.
      operationId: sync_from_clay_v1_demo_sync_from_clay_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClayWebhookPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClayWebhookResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClayWebhookPayload:
      properties:
        slug:
          type: string
          title: Slug
          description: URL slug for the demo (e.g., 'summit-partners')
        firm_name:
          type: string
          title: Firm Name
        firm_logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Logo Url
        firm_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Description
        firm_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Location
        firm_employee_count:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Employee Count
        firm_aum:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Aum
        contact_name:
          type: string
          title: Contact Name
        contact_role:
          type: string
          title: Contact Role
        contact_avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Avatar Url
        portfolio_companies:
          items:
            $ref: '#/components/schemas/ClayPortfolioCompany'
          type: array
          title: Portfolio Companies
          default: []
        total_portfolio_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Portfolio Count
        featured_company_name:
          type: string
          title: Featured Company Name
        featured_company_logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Featured Company Logo Url
        featured_company_industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Featured Company Industry
        featured_company_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Featured Company Description
        featured_company_employee_count:
          anyOf:
            - type: string
            - type: 'null'
          title: Featured Company Employee Count
        featured_company_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Featured Company Location
        case_study_employees:
          items:
            $ref: '#/components/schemas/ClayCaseStudyEmployee'
          type: array
          title: Case Study Employees
          default: []
        status:
          type: string
          title: Status
          default: active
      type: object
      required:
        - slug
        - firm_name
        - contact_name
        - contact_role
        - featured_company_name
      title: ClayWebhookPayload
      description: |-
        Webhook payload from Clay table.

        Maps Clay columns to PE firm demo structure.
        Column names should match your Clay table headers.
    ClayWebhookResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        demo_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Demo Id
        demo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Demo Url
        action:
          type: string
          title: Action
      type: object
      required:
        - success
        - message
        - action
      title: ClayWebhookResponse
      description: Response for Clay webhook.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClayPortfolioCompany:
      properties:
        name:
          type: string
          title: Name
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        employee_count:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Count
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
      type: object
      required:
        - name
      title: ClayPortfolioCompany
      description: Portfolio company from Clay.
    ClayCaseStudyEmployee:
      properties:
        name:
          type: string
          title: Name
        role:
          type: string
          title: Role
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
      type: object
      required:
        - name
        - role
      title: ClayCaseStudyEmployee
      description: Case study employee from Clay.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ClerkJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk-issued RS256 JWT.
    WorkspaceApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key (prefix: `ont_`).'

````