> ## 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 Gtm From Clay

> Webhook endpoint for Clay to sync data into GTM tables.

Upserts into gtm_companies, gtm_employees, and gtm_portfolio_companies
(the actual tables used by the admin page and demo pages).

Configure Clay to send a POST request to:
https://api.ontora.com/v1/demo/sync-gtm-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-gtm-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-gtm-from-clay:
    post:
      tags:
        - demo
      summary: Sync Gtm From Clay
      description: |-
        Webhook endpoint for Clay to sync data into GTM tables.

        Upserts into gtm_companies, gtm_employees, and gtm_portfolio_companies
        (the actual tables used by the admin page and demo pages).

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

        Optional: Set CLAY_WEBHOOK_SECRET env var and include it in
        the X-Clay-Secret header for verification.
      operationId: sync_gtm_from_clay_v1_demo_sync_gtm_from_clay_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClayGTMSyncPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClayGTMSyncResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClayGTMSyncPayload:
      properties:
        firm_name:
          type: string
          title: Firm Name
        firm_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Domain
        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_linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Linkedin Url
        firm_industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Industry
        firm_employee_count:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Employee Count
        firm_aum:
          anyOf:
            - type: string
            - type: 'null'
          title: Firm Aum
        firm_founded:
          anyOf:
            - type: integer
            - type: 'null'
          title: Firm Founded
        contact_name:
          type: string
          title: Contact Name
        contact_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Title
        contact_linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Linkedin Url
        contact_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Email
        contact_avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Avatar Url
        contact_first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact First Name
        contact_last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Last Name
        portfolio_companies:
          items:
            $ref: '#/components/schemas/ClayGTMPortfolioCompany'
          type: array
          title: Portfolio Companies
          default: []
        status:
          type: string
          title: Status
          default: draft
      type: object
      required:
        - firm_name
        - contact_name
      title: ClayGTMSyncPayload
      description: |-
        Webhook payload from Clay to sync into GTM tables.

        Upserts into gtm_companies, gtm_employees, and gtm_portfolio_companies.
    ClayGTMSyncResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        company_id:
          type: string
          format: uuid
          title: Company Id
        employee_id:
          type: string
          format: uuid
          title: Employee Id
        action:
          type: string
          title: Action
        demo_url:
          type: string
          title: Demo Url
      type: object
      required:
        - success
        - message
        - company_id
        - employee_id
        - action
        - demo_url
      title: ClayGTMSyncResponse
      description: Response for Clay GTM sync.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClayGTMPortfolioCompany:
      properties:
        name:
          type: string
          title: Name
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        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
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
      type: object
      required:
        - name
      title: ClayGTMPortfolioCompany
      description: Portfolio company in Clay GTM sync payload.
    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_`).'

````