openapi: 3.1.0
info:
  title: Influencer Hero API
  version: 1.4.2
  description: API documentation for the Influencer Hero platform.
  contact:
    name: Influencer Hero Support
    url: https://help.influencer-hero.com/
    email: support@influencer-hero.com
servers:
  - url: https://api.influencer-hero.com
security:
  - ApiKeyAuth: []
x-tagGroups:
  - name: Getting Started
    tags:
      - Test endpoints
  - name: Influencer Discovery
    tags:
      - Search & Reports
      - Identify influencers
      - Helper endpoints
  - name: Influencer CRM
    tags:
      - Import influencers
      - Influencer Page
      - Affiliate Tracking
      - Account Search
  - name: Webhooks
    tags:
      - Managing Webhooks
      - Webhooks
paths:
  /v1/public/hello:
    get:
      operationId: publicHello
      tags:
        - Test endpoints
      summary: Public Hello Endpoint
      description: |
        A public endpoint to verify the API is working without authentication.
        Use `/v1/account/hello` to test authenticated requests.
      responses:
        '200':
          description: Public request well received.
          content:
            application/json:
              example:
                message: >-
                  Public request well received. Use /v1/account/hello to test
                  authenticated requests.
  /v1/account/hello:
    get:
      operationId: accountHello
      tags:
        - Test endpoints
      summary: Authenticated Hello Endpoint
      description: |
        An authenticated endpoint to verify user credentials.
      responses:
        '200':
          description: Authenticated request successfully processed.
          content:
            application/json:
              example:
                message: You are logged in - <account_id> - <user_id>
  /v1/search/identify_influencers:
    post:
      operationId: identifyInfluencers
      tags:
        - Identify influencers
      summary: Identify Influencers by Email (async)
      description: >-
        Identifies influencers based on email addresses. This can be used e.g.
        to identify influencers from your customer lists. This endpoint is
        asynchronous and will return a success message immediately. The
        influencers will be processed in the background and will appear in the
        "Your customers" tab of the influencer finder after a few minutes.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                influencer_list:
                  type: array
                  items:
                    type: string
                  description: List of email addresses.
                  example:
                    - influencer1@example.com
                    - influencer2@example.com
                brand_id:
                  type: integer
                  description: >-
                    ID of the brand. If not provided, the first brand in the
                    account will be used.
                  example: 4819
                source_type:
                  type: string
                  description: >-
                    Source type for your reference (will be shown in the IH
                    dashboard).
                  example: sendinblue
              required:
                - influencer_list
      responses:
        '200':
          description: Successfully sent contact details to the processing queue.
          content:
            application/json:
              example:
                message: >-
                  Successfully sent contact details to queue. Please allow for
                  up to an hour for the system to process the data
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missingInfluencers:
                  summary: Missing influencer_list
                  value:
                    message: influencer_list is required
                noBrandsFound:
                  summary: No Brands in Account
                  value:
                    message: No brands found in account
                brandNotFound:
                  summary: Brand Not Found
                  value:
                    message: Brand not found
  /v1/search/identify_influencers_real_time:
    get:
      operationId: identifyInfluencersRealTime
      tags:
        - Identify influencers
      summary: Identify Influencer by Email (real-time)
      description: >
        Identifies a single influencer based on their email address in
        real-time. 

        Unlike the async endpoint, this returns the influencer data immediately
        if a match is found.

        Please use the async endpoint for high-throughput use cases or when
        possible.
      parameters:
        - name: brand_id
          in: query
          required: true
          schema:
            type: integer
          description: ID of the brand.
          example: 4810
        - name: influencer_email
          in: query
          required: true
          schema:
            type: string
          description: Email address of the influencer to identify.
          example: influencer@example.com
      responses:
        '200':
          description: Influencer identification result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  is_influencer:
                    type: boolean
                    description: Whether the email belongs to a known influencer.
                  type:
                    type: string
                    description: The social media platform (if influencer is found).
                    example: instagram
                  user_id:
                    type: string
                    description: The platform-specific user ID (if influencer is found).
                    example: '308206489'
                  url:
                    type: string
                    description: URL to the influencer's profile (if influencer is found).
                    example: https://www.instagram.com/therock/
                  username:
                    type: string
                    description: The influencer's handle/username (if influencer is found).
                    example: therock
                  fullname:
                    type: string
                    description: The influencer's display name (if influencer is found).
                    example: Dwayne Johnson
                  picture:
                    type: string
                    description: >-
                      URL to the influencer's profile picture (if influencer is
                      found).
                  followers:
                    type: integer
                    description: Number of followers (if influencer is found).
                    example: 1347
                  is_verified:
                    type: boolean
                    description: >-
                      Whether the influencer is verified on the platform (if
                      influencer is found).
              examples:
                influencerFound:
                  summary: Influencer Found
                  value:
                    is_influencer: true
                    type: instagram
                    user_id: '308206489'
                    url: https://www.instagram.com/therock/
                    username: therock
                    fullname: Dwayne Johnson
                    picture: https://example.com/profile.jpg
                    followers: 1347
                    is_verified: false
                notFound:
                  summary: No Influencer Found
                  value:
                    is_influencer: false
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missingParams:
                  summary: Missing Required Parameters
                  value:
                    message: influencer_email and brand_id are required
                invalidEmail:
                  summary: Invalid Email Format
                  value:
                    message: Invalid email format
  /v1/crm/new_influencer_click:
    post:
      operationId: increaseInfluencerClicks
      tags:
        - Affiliate Tracking
      summary: New Influencer Click
      description: Increases the number of tracked clicks on an influencer's deal page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                influencer_handle:
                  type: string
                  description: >-
                    Influencer handle. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: therock
                deal_id:
                  type: string
                  description: >-
                    Deal ID or URL. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: ETUNQ6ZTW1
                collab_id:
                  type: string
                  description: >-
                    Collaboration ID. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: V2KYU6F9
                brand_id:
                  type: integer
                  description: >-
                    Brand ID (optional, used to find the correct collaboration
                    if multiple exist).
                  example: 4819
                increase_clicks:
                  type: integer
                  description: Number of clicks to add. Defaults to 0.
                  example: 10
                country_code:
                  type: string
                  description: Country code for click origin.
                  example: US
              required:
                - increase_clicks
      responses:
        '200':
          description: Clicks successfully added.
          content:
            application/json:
              example:
                deal_id: ETUNQ6ZTW1
                collab_id: V2KYU6F9
                new_clicks_value: 150
                message: Clicks successfully added.
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missingDealOrHandle:
                  summary: Missing Deal/Handle
                  value:
                    message: deal_id or influencer_handle is required
                collaborationNotFound:
                  summary: Collaboration Not Found
                  value:
                    message: Collaboration not found
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/new_influencer_referral:
    post:
      operationId: newInfluencerReferral
      tags:
        - Affiliate Tracking
      summary: New Influencer Referral
      description: Adds a new order/referral to an influencer's affiliate performance.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                influencer_handle:
                  type: string
                  description: >-
                    Influencer handle. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: therock
                deal_id:
                  type: string
                  description: >-
                    Deal ID or URL. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: ETUNQ6ZTW1
                collab_id:
                  type: string
                  description: >-
                    Collaboration ID. Either deal_id, influencer_handle, or
                    collab_id is required.
                  example: V2KYU6F9
                brand_id:
                  type: integer
                  description: >-
                    Brand ID (optional, used to find the correct collaboration
                    if multiple exist).
                  example: 4819
                order_id:
                  type: string
                  description: Order ID. Recommended to include for tracking purposes.
                  example: '891237123'
                order_revenue:
                  type: number
                  description: Revenue of the order.
                  example: 150.5
                order_platform:
                  type: string
                  description: Platform of the order.
                  example: shopify
                order_discount_codes_used:
                  type: string
                  description: Discount codes used.
                  example: DISCOUNT50
                order_notes:
                  type: string
                  description: Notes about the order.
                  example: High-value customer.
                currency:
                  type: string
                  description: >-
                    Currency code for the order (e.g., USD, EUR). Defaults to
                    account currency.
                  example: USD
      responses:
        '200':
          description: Order successfully added.
          content:
            application/json:
              example:
                deal_id: ETUNQ6ZTW1
                collab_id: V2KYU6F9
                message: Order successfully added.
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missingDealOrHandle:
                  summary: Missing Deal/Handle
                  value:
                    message: deal_id or influencer_handle is required
                collaborationNotFound:
                  summary: Collaboration Not Found
                  value:
                    message: Collaboration not found
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/get_deal_details:
    get:
      operationId: getDealDetails
      tags:
        - Influencer Page
      summary: Get Deal Information
      description: Retrieves information about a specific deal in the CRM.
      parameters:
        - name: influencer_handle
          in: query
          required: false
          schema:
            type: string
          description: Influencer handle. Either deal_id or influencer_handle is required.
          example: therock
        - name: deal_id
          in: query
          required: false
          schema:
            type: string
          description: Deal ID or URL. Either deal_id or influencer_handle is required.
          example: ETUNQ6ZTW1
      responses:
        '200':
          description: Success response
          content:
            application/json:
              example:
                deal_info:
                  id: ETUNQ6ZTW1
                  influencer_handle: therock
                  brand_id: 4819
                  is_active: true
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                message: username is required
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/create_deal:
    post:
      operationId: createDeal
      tags:
        - Import influencers
      summary: Create CRM Deal
      description: >
        Creates a new influencer deal page in the specified campaign
        board/dealflow.

        The difference between this and the "Submit Influencers to campaign"
        endpoint 

        is that this directly adds the influencer to the CRM, bypassing the
        outreach step.

        This is useful for manually adding influencers that you already work
        with or have a relationship with.

        This is like manually adding an influencer via the CSV import feature.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                influencer_handle:
                  type: string
                  description: Influencer handle.
                  example: therock
                platform:
                  type: string
                  description: Social media platform.
                  example: instagram
                first_name:
                  type: string
                  description: Influencer's first name.
                  example: Dwayne
                last_name:
                  type: string
                  description: Influencer's last name.
                  example: Johnson
                email:
                  type: string
                  description: Influencer's email address.
                  example: dwayne.johnson@example.com
                brand_id:
                  type: integer
                  description: Brand ID.
                  example: 4819
                dealflow_id:
                  type: string
                  description: Dealflow ID.
                  example: D_FSSI4P
                funnel_step:
                  type: integer
                  description: The funnel step to set for the deal.
                  example: 2
                address_line:
                  type: string
                  description: Street address or other address details.
                  example: 123 Hollywood Blvd
                postcode:
                  type: string
                  description: Postal code.
                  example: '90038'
                region:
                  type: string
                  description: Region or state.
                  example: California
                city:
                  type: string
                  description: City of residence.
                  example: Los Angeles
                country_code:
                  type: string
                  description: Country code (e.g., 'US', 'GB').
                  example: US
                phone_nr:
                  type: string
                  description: Phone number.
                  example: +1 310 555 0100
                total_payouts:
                  type: number
                  description: Total payouts already made to this influencer.
                  example: 250
                total_commission_earned:
                  type: number
                  description: Total commission earned by this influencer so far.
                  example: 500.5
                total_fixed_fee_earned:
                  type: number
                  description: Total fixed fee earned by this influencer so far.
                  example: 1000
                total_sales:
                  type: number
                  description: Total sales so far attributed to this influencer.
                  example: 4500
                total_referrals:
                  type: number
                  description: Total referral count from this influencer.
                  example: 25
                code:
                  type: string
                  description: Discount code to associate with the collaboration.
                  example: THEROCK50
                code_perc:
                  type: number
                  description: Percentage discount for the code (0 to 100).
                  example: 15
                custom_url:
                  type: string
                  description: Custom affiliate URL to track.
                  example: /therock
                custom_url_target:
                  type: string
                  description: Landing page or reference name for `custom_url`.
                  example: /
                commission_perc:
                  type: number
                  description: Commission percentage for affiliate sales.
                  example: 10
                create_affiliate_details:
                  type: boolean
                  description: >-
                    Whether to create affiliate details automatically. If true,
                    we will create the discount code and custom link (if there
                    are any) in your shopify/CMS integration. If not we will
                    just insert it in the deal page (sales with that discount
                    code will still be correctly tracked)
                  example: true
              required:
                - influencer_handle
                - platform
                - brand_id
                - dealflow_id
      responses:
        '200':
          description: Successfully created deal.
          content:
            application/json:
              example:
                deal_id: ETUNQ6ZTW1
                deal_page_url: https://app.influencer-hero.com/deal/ETUNQ6ZTW1
                message: Successfully created deal.
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missingField:
                  summary: Missing required fields
                  value:
                    message: platform is required
                brandNotFound:
                  summary: Brand Not Found
                  value:
                    message: Brand not found
                dealflowNotFound:
                  summary: Dealflow Not Found
                  value:
                    message: Dealflow not found
  /v1/crm/create_note:
    post:
      operationId: createNote
      tags:
        - Influencer Page
      summary: Create Note
      description: Creates a new note on a deal.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deal_id:
                  type: string
                  description: The ID of the deal to add the note to.
                  example: ETUNQ6ZTW1
                note_description:
                  type: string
                  description: The content of the note.
                  example: Spoke with influencer, they are interested in the campaign.
              required:
                - deal_id
                - note_description
      responses:
        '200':
          description: Note successfully created.
          content:
            application/json:
              example:
                message: Successfully created note
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/create_task:
    post:
      operationId: createTask
      tags:
        - Influencer Page
      summary: Create Task
      description: Creates a new task on a deal.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deal_id:
                  type: string
                  description: The ID of the deal to add the task to.
                  example: ETUNQ6ZTW1
                tasktype:
                  type: string
                  description: >-
                    The type of task. Use "todo_task" for a standard task or
                    "wait_task" for a waiting/follow-up task.
                  enum:
                    - todo_task
                    - wait_task
                  example: todo_task
                task_title:
                  type: string
                  description: The title of the task.
                  example: Follow up on product shipment
                task_description:
                  type: string
                  description: A detailed description of the task.
                  example: >-
                    Confirm that the product was received and schedule the
                    content creation call.
                deadline:
                  type: string
                  description: The deadline for the task in DD-MM-YYYY format.
                  example: 25-12-2025
                assigned_to:
                  type: string
                  description: >-
                    The user ID to assign the task to. Can be null for
                    unassigned tasks.
                  example: user_123
                  nullable: true
              required:
                - deal_id
                - tasktype
                - task_title
                - task_description
                - deadline
                - assigned_to
      responses:
        '200':
          description: Task successfully created.
          content:
            application/json:
              example:
                message: Successfully created task
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/update_dealstage:
    post:
      operationId: updateDealstage
      tags:
        - Influencer Page
      summary: Update Deal Stage
      description: |
        Updates the funnel stage or the dealflow of a deal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deal_id:
                  type: string
                  description: The ID of the deal to update.
                  example: ETUNQ6ZTW1
                new_stage:
                  type: integer
                  description: |
                    The new funnel stage for the deal.
                  example: 3
                dashboard_id:
                  type: string
                  description: >-
                    Optional. The dealflow ID to move the deal to. If provided,
                    the deal will be moved to this dealflow.
                  example: D_FSSI4P
              required:
                - deal_id
                - new_stage
      responses:
        '200':
          description: Deal stage successfully updated.
          content:
            application/json:
              example:
                message: Deal stage successfully updated
                ugc_tracking_activated: false
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal not found
  /v1/crm/update_deal_info:
    post:
      operationId: updateDealInfo
      tags:
        - Influencer Page
      summary: Update Deal Info
      description: >
        Updates the contact and profile information for an influencer deal.

        Use `status_update_only: true` to only update the active status without
        modifying other fields.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deal_id:
                  type: string
                  description: The ID of the deal to update.
                  example: ETUNQ6ZTW1
                status_update_only:
                  type: boolean
                  description: >-
                    If true, only updates the is_active status and ignores other
                    fields.
                  example: false
                new_deal_info:
                  type: object
                  description: The updated deal information.
                  properties:
                    is_active:
                      type: boolean
                      description: Whether the deal is active.
                      example: true
                    main_name:
                      type: string
                      description: The influencer's display name or handle.
                      example: therock
                    notes:
                      type: string
                      description: Internal notes about the deal.
                      example: Great engagement on recent posts
                    email:
                      type: string
                      description: Primary email address.
                      example: contact@therock.com
                    other_emails:
                      type: string
                      description: Additional email addresses.
                      example: manager@therock.com
                    first_name:
                      type: string
                      description: Influencer's first name.
                      example: Dwayne
                    last_name:
                      type: string
                      description: Influencer's last name.
                      example: Johnson
                    address_line:
                      type: string
                      description: Street address.
                      example: 123 Main St
                    city:
                      type: string
                      description: City.
                      example: Los Angeles
                    postcode:
                      type: string
                      description: Postal code.
                      example: '90001'
                    region:
                      type: string
                      description: State or region.
                      example: California
                    country:
                      type: string
                      description: Country.
                      example: USA
                    phone_nr:
                      type: string
                      description: Phone number.
                      example: '+1234567890'
                    has_manager:
                      type: boolean
                      description: Whether the influencer has a manager.
                      example: true
                    manager_firstname:
                      type: string
                      description: Manager's first name.
                      example: John
                    manager_lastname:
                      type: string
                      description: Manager's last name.
                      example: Smith
                    manager_email:
                      type: string
                      description: Manager's email address.
                      example: john.smith@agency.com
                    other_information:
                      type: string
                      description: Any other relevant information.
                      example: Preferred contact via manager
              required:
                - deal_id
                - new_deal_info
      responses:
        '200':
          description: Deal info successfully updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  deal_info:
                    type: object
                    description: The updated deal information.
              example:
                message: Successfully updated deal info
                deal_info:
                  deal_id: ETUNQ6ZTW1
                  main_name: therock
                  email: contact@therock.com
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                noDealId:
                  summary: No Deal ID
                  value:
                    message: No deal id specified
                noDealInfo:
                  summary: No Deal Info
                  value:
                    message: No deal info specified
        '404':
          description: Deal Not Found
          content:
            application/json:
              example:
                message: Deal Not Found
  /v1/crm/update_post_capture:
    post:
      operationId: updatePostCapture
      tags:
        - Influencer Page
      summary: Enable UGC Capture
      description: >
        Enables or disables UGC (User Generated Content) capture for an
        influencer collaboration.

        When enabled, the system will automatically capture posts from the
        influencer's social media profiles.

        You can listen for UGC posts via webhooks or periodically retrieve the
        UGC posts from the API.

        Tracked UGC posts will also be available in the content library of your
        account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collab_id:
                  type: string
                  description: >-
                    The collaboration ID to update. Either collab_id or deal_id
                    is required.
                  example: V2KYU6F9
                deal_id:
                  type: string
                  description: >-
                    The deal ID to update. Either collab_id or deal_id is
                    required.
                  example: ETUNQ6ZTW1
                post_capture_status:
                  type: boolean
                  description: Whether to enable (true) or disable (false) UGC capture.
                  example: true
                post_capture_until:
                  type: integer
                  description: >-
                    Unix timestamp until when to capture posts. This can help
                    save UGC capture credits. Optional.
                  example: 1735689600
                post_capture_disable_on_post:
                  type: boolean
                  description: >-
                    If true, automatically disables capture after a post is
                    detected. This can help save UGC capture credits.
                  example: false
              required:
                - post_capture_status
      responses:
        '200':
          description: UGC capture settings updated successfully.
          content:
            application/json:
              example:
                message: UGC Capture updated
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                collabNotFound:
                  summary: Collaboration Not Found
                  value:
                    message: Collaboration not found
                brandNotFound:
                  summary: Brand Not Found
                  value:
                    message: Brand was not found
  /v1/search/submit_influencers:
    post:
      operationId: submitInfluencers
      tags:
        - Import influencers
      summary: Submit Influencers to campaign
      description: >
        This endpoint adds the influencers to the specified campaign. 

        The influencer is scheduled for outreach if the campaign is set to send
        one.

        This is like adding influencers to a campaign from the Influencer
        Finder.


        **Credit Usage:**

        - Each influencer added costs 0.04 search credits.

        - Duplicate influencers (already in the account) are automatically
        skipped.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                outreach_id:
                  type: string
                  description: The ID of the outreach campaign to add influencers to.
                  example: O_I4SFHB
                influencer_ids:
                  type: array
                  items:
                    type: string
                  description: List of influencer user IDs to add to the campaign.
                  example:
                    - '703787'
                    - '703739'
                    - '703738'
                platform:
                  type: string
                  enum:
                    - instagram
                    - tiktok
                    - youtube
                  description: The social media platform of the influencers.
                  example: instagram
              required:
                - outreach_id
                - influencer_ids
                - platform
      responses:
        '200':
          description: Influencers successfully added to the campaign.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Summary message of the operation.
                  total_added:
                    type: integer
                    description: Number of influencers successfully added.
                  duplicates_ignored:
                    type: integer
                    description: Number of duplicate influencers that were skipped.
                  success:
                    type: boolean
                  status:
                    type: integer
              example:
                message: 5 influencers added to the campaign and 2 duplicates ignored.
                total_added: 5
                duplicates_ignored: 2
                success: true
                status: 200
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                noCampaign:
                  summary: No Campaign Selected
                  value:
                    message: Please select a campaign
                noInfluencers:
                  summary: No Influencers Selected
                  value:
                    message: Please select at least one influencer
                invalidPlatform:
                  summary: Invalid Platform
                  value:
                    message: Invalid platform
                noBrand:
                  summary: Campaign Not Connected to Brand
                  value:
                    message: >-
                      Selected outreach list is not connected to a brand. Please
                      select a brand in the 'Outreach Manager'
        '402':
          description: Insufficient Credits
          content:
            application/json:
              example:
                message: >-
                  Insufficient search credit balance, please upgrade your plan
                  to continue searching.
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                campaignNotFound:
                  summary: Campaign Not Found
                  value:
                    message: Campaign not found
                brandNotFound:
                  summary: Brand Not Found
                  value:
                    message: Brand selected for this campaign does not exist
                noContactDetails:
                  summary: No Contact Details Found
                  value:
                    message: >-
                      We did not find contact details for the selected
                      influencers
  /v1/account/search_dealflows:
    get:
      operationId: searchDealflows
      tags:
        - Account Search
      summary: Dealflow Search
      description: Retrieves all dealflows in the user's account.
      responses:
        '200':
          description: Success response
          content:
            application/json:
              example:
                - id: D_FSSI4P
                  name: Dealflow 1
                - id: '67890'
                  name: Dealflow 2
  /v1/account/search_brands:
    get:
      operationId: searchBrands
      tags:
        - Account Search
      summary: Brand Search
      description: Searches for brands in the platform account.
      responses:
        '200':
          description: Success response
          content:
            application/json:
              example:
                - id: 4819
                  name: Brand A
                - id: 6789
                  name: Brand B
  /v1/crm/autocomplete:
    get:
      operationId: crmAutocomplete
      tags:
        - Account Search
      summary: Deal Search
      description: >
        Searches for influencers in your CRM by name or handle.

        Returns matching deals that can be used for navigation or further
        operations.
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search term (must be more than 2 characters).
          example: therock
        - name: return_detailed_results
          in: query
          required: false
          schema:
            type: boolean
          description: If true, returns detailed deal information instead of basic results.
          example: true
      responses:
        '200':
          description: Search results returned successfully.
          content:
            application/json:
              examples:
                basicResults:
                  summary: Basic Results
                  value:
                    results:
                      - id: /deal/ETUNQ6ZTW1
                        text: therock
                        is_active: true
                      - id: /deal/ABCD1234
                        text: therockjr
                        is_active: false
                    pagination:
                      more: false
                detailedResults:
                  summary: Detailed Results (with return_detailed_results=true)
                  value:
                    - deal_id: ETUNQ6ZTW1
                      main_name: therock
                      picture_url: https://example.com/pic.jpg
                      nr_followers: 350000000
                      is_active: true
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                noSearchTerm:
                  summary: No Search Term
                  value:
                    message: No search term provided
                tooShort:
                  summary: Search Term Too Short
                  value:
                    message: Please enter > 2 characters
  /v1/account/create_webhook:
    post:
      operationId: createWebhook
      tags:
        - Managing Webhooks
      summary: Create Webhook
      description: Creates a webhook for various triggers.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_url:
                  type: string
                  description: Webhook target URL.
                  example: https://example.com/webhook
                webhook_type:
                  type: string
                  description: >-
                    Type of webhook. Must be one of
                    ["product_sent","update_discount_code","update_commission","update_custom_link",
                    "new_payout_request","new_email_sent","new_influencer_reply",
                    "new_influencer_post","new_max_bid","new_influencer_order"].
                  example: new_influencer_reply
              required:
                - webhook_url
                - webhook_type
      responses:
        '200':
          description: Successfully created webhook.
          content:
            application/json:
              example:
                message: Successfully created webhook.
        '400':
          description: Invalid Webhook Type
          content:
            application/json:
              example:
                message: Invalid webhook type
  /v1/account/get_webhooks:
    get:
      operationId: getWebhooks
      tags:
        - Managing Webhooks
      summary: Get Webhooks
      description: Returns all webhooks configured for your account.
      responses:
        '200':
          description: Successfully retrieved webhooks.
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      type: object
                      properties:
                        webhook_type:
                          type: string
                          description: Type of webhook.
                          example: new_influencer_reply
                        webhook_url:
                          type: string
                          description: Target URL for the webhook.
                          example: https://example.com/webhook
                        settings:
                          type: object
                          description: Additional webhook settings.
                        brand_id:
                          type: integer
                          description: >-
                            Brand ID if the webhook is brand-specific
                            (optional).
              example:
                webhooks:
                  - webhook_type: new_influencer_reply
                    webhook_url: https://example.com/webhook
                    settings: {}
                  - webhook_type: new_payout_request
                    webhook_url: https://example.com/payouts
                    settings: {}
                    brand_id: 4819
  /v1/search/get_search:
    post:
      operationId: getSearch
      tags:
        - Search & Reports
      summary: Get Search
      description: >
        Endpoint for the influencer finder. Each request provides 10
        influencers, costing 1 search credits for every new influencer seen.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                platform:
                  type: string
                  description: Platform to search.
                  enum:
                    - instagram
                    - youtube
                    - tiktok
                filter:
                  type: object
                  description: >-
                    Object of optional filters (see properties). Use IDs from
                    `/v1/search/locations` for `geo` and `audience_geo`.
                  properties:
                    filter_ids:
                      type: array
                      description: >-
                        Search for individual influencers using the user id.
                        (instagram, tiktok, youtube) Fetch user_id via
                        `/v1/search/database_influencers` using `type=search`
                    text:
                      type: string
                      description: >-
                        Keyword in influencer bio/profile description.
                        (instagram, tiktok, youtube)
                    keywords:
                      type: string
                      description: >-
                        Single keyword in influencer posts. (instagram, tiktok,
                        youtube)
                    relevance:
                      type: object
                      description: >-
                        Lookalike-based influencer filter. (instagram, tiktok,
                        youtube) Fetch possible handles via
                        `/v1/search/database_influencers` using
                        `type=topic-tags`.
                      properties:
                        value:
                          type: string
                    audience_relevance:
                      type: object
                      description: >-
                        Lookalike-based audience filter. (instagram, tiktok,
                        youtube) Fetch possible handles via
                        `/v1/search/database_influencers` using
                        `type=topic-tags`.
                      properties:
                        value:
                          type: string
                    last_posted:
                      type: string
                      description: Days since last posted. (instagram, tiktok, youtube)
                      enum:
                        - '30'
                        - '90'
                        - '180'
                    audience_age_range:
                      type: object
                      description: >-
                        Audience age bracket + minimum share. (instagram,
                        tiktok, youtube)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '13'
                            - '18'
                            - '25'
                            - '35'
                            - '45'
                            - '65'
                        right_number:
                          type: string
                          enum:
                            - '13'
                            - '18'
                            - '25'
                            - '35'
                            - '45'
                            - '65'
                            - ''
                        weight:
                          type: string
                          enum:
                            - '0.01'
                            - '0.05'
                            - '0.1'
                            - '0.15'
                            - '0.20'
                            - '0.30'
                            - '0.40'
                            - '0.50'
                            - '0.60'
                            - '0.70'
                            - '0.80'
                            - '0.90'
                            - '0.95'
                    age:
                      type: object
                      description: Influencer’s age bracket. (instagram, tiktok, youtube)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '13'
                            - '18'
                            - '25'
                            - '35'
                            - '45'
                            - '65'
                        right_number:
                          type: string
                          enum:
                            - '13'
                            - '18'
                            - '25'
                            - '35'
                            - '45'
                            - '65'
                            - ''
                    audience_lang:
                      type: object
                      description: Audience language. (instagram, tiktok, youtube)
                      properties:
                        code:
                          type: string
                          enum:
                            - en
                            - es
                            - pt
                            - fr
                            - ar
                            - ru
                            - it
                            - de
                            - fa
                            - id
                            - tr
                            - ja
                            - pl
                            - th
                            - zh
                            - hi
                            - ms
                            - uk
                            - ko
                            - nl
                            - arz
                            - ne
                            - az
                            - pa
                            - gu
                            - sv
                            - kk
                            - he
                            - ro
                            - ckb
                            - cs
                            - vi
                            - ur
                            - mr
                            - ky
                            - hu
                            - el
                            - ml
                            - bn
                            - ca
                            - fi
                            - 'no'
                            - da
                            - bg
                            - sr
                            - sw
                            - hr
                            - sq
                            - tl
                            - sk
                            - ta
                            - sh
                            - sl
                            - ps
                            - mk
                            - km
                            - hy
                            - kn
                            - uz
                            - gl
                            - ce
                            - azb
                            - af
                            - lt
                            - ceb
                            - si
                            - et
                            - tg
                            - tt
                            - pnb
                            - as
                            - ka
                            - bs
                            - lv
                            - lo
                            - te
                            - am
                            - my
                            - is
                            - mn
                            - sah
                            - mzn
                            - ku
                            - sd
                            - or
                            - gd
                            - fy
                            - so
                            - be
                            - war
                            - als
                            - mhr
                            - ie
                            - ba
                            - tk
                            - ia
                            - nds
                            - jv
                            - dv
                            - jbo
                            - ug
                            - gn
                            - bo
                            - nap
                            - ilo
                            - mg
                            - lez
                            - su
                            - io
                            - ga
                            - min
                            - ht
                            - kw
                            - bh
                            - yue
                            - ast
                            - new
                            - yi
                            - cv
                            - mai
                            - pms
                            - hsb
                            - bar
                            - sa
                            - sco
                            - xmf
                            - pam
                            - xh
                            - krc
                            - lrc
                            - zu
                            - rw
                            - bpy
                            - mrj
                            - wuu
                            - os
                            - gv
                            - cbk
                            - eml
                            - lmo
                            - gom
                            - myv
                            - rm
                            - li
                            - scn
                            - kv
                            - bcl
                            - bxr
                            - vep
                            - av
                            - sc
                            - xal
                            - tyv
                            - diq
                            - nah
                            - mwl
                            - yo
                            - dty
                            - vec
                            - rue
                            - vls
                            - dsb
                            - pfl
                            - co
                            - frr
                    lang:
                      type: object
                      description: Profile language. (instagram, tiktok, youtube)
                      properties:
                        code:
                          type: string
                          enum:
                            - en
                            - es
                            - pt
                            - fr
                            - ar
                            - ru
                            - it
                            - de
                            - fa
                            - id
                            - tr
                            - ja
                            - pl
                            - th
                            - zh
                            - hi
                            - ms
                            - uk
                            - ko
                            - nl
                            - arz
                            - ne
                            - az
                            - pa
                            - gu
                            - sv
                            - kk
                            - he
                            - ro
                            - ckb
                            - cs
                            - vi
                            - ur
                            - mr
                            - ky
                            - hu
                            - el
                            - ml
                            - bn
                            - ca
                            - fi
                            - 'no'
                            - da
                            - bg
                            - sr
                            - sw
                            - hr
                            - sq
                            - tl
                            - sk
                            - ta
                            - sh
                            - sl
                            - ps
                            - mk
                            - km
                            - hy
                            - kn
                            - uz
                            - gl
                            - ce
                            - azb
                            - af
                            - lt
                            - ceb
                            - si
                            - et
                            - tg
                            - tt
                            - pnb
                            - as
                            - ka
                            - bs
                            - lv
                            - lo
                            - te
                            - am
                            - my
                            - is
                            - mn
                            - sah
                            - mzn
                            - ku
                            - sd
                            - or
                            - gd
                            - fy
                            - so
                            - be
                            - war
                            - als
                            - mhr
                            - ie
                            - ba
                            - tk
                            - ia
                            - nds
                            - jv
                            - dv
                            - jbo
                            - ug
                            - gn
                            - bo
                            - nap
                            - ilo
                            - mg
                            - lez
                            - su
                            - io
                            - ga
                            - min
                            - ht
                            - kw
                            - bh
                            - yue
                            - ast
                            - new
                            - yi
                            - cv
                            - mai
                            - pms
                            - hsb
                            - bar
                            - sa
                            - sco
                            - xmf
                            - pam
                            - xh
                            - krc
                            - lrc
                            - zu
                            - rw
                            - bpy
                            - mrj
                            - wuu
                            - os
                            - gv
                            - cbk
                            - eml
                            - lmo
                            - gom
                            - myv
                            - rm
                            - li
                            - scn
                            - kv
                            - bcl
                            - bxr
                            - vep
                            - av
                            - sc
                            - xal
                            - tyv
                            - diq
                            - nah
                            - mwl
                            - yo
                            - dty
                            - vec
                            - rue
                            - vls
                            - dsb
                            - pfl
                            - co
                            - frr
                    followers:
                      type: object
                      description: Follower count range. (instagram, tiktok, youtube)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250000'
                            - '500000'
                            - '1000000'
                        right_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250000'
                            - '500000'
                            - '1000000'
                            - ''
                    views:
                      type: object
                      description: Average view count range. (tiktok, youtube)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250000'
                            - '500000'
                            - '1000000'
                        right_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250000'
                            - '500000'
                            - '1000000'
                            - ''
                    engagements:
                      type: object
                      description: Total engagements range. (instagram)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '0'
                            - '100'
                            - '200'
                            - '300'
                            - '400'
                            - '500'
                            - '1000'
                            - '5000'
                            - '10000'
                            - '50000'
                            - '100000'
                            - '500000'
                            - '1000000'
                        right_number:
                          type: string
                          enum:
                            - '100'
                            - '200'
                            - '300'
                            - '400'
                            - '500'
                            - '1000'
                            - '5000'
                            - '10000'
                            - '50000'
                            - '100000'
                            - '500500'
                            - '1000000'
                    engagement_rate:
                      type: object
                      description: Minimum engagement rate as decimal. (instagram)
                      properties:
                        value:
                          type: string
                          enum:
                            - '0.01'
                            - '0.02'
                            - '0.03'
                            - '0.04'
                            - '0.05'
                            - '0.06'
                            - '0.07'
                            - '0.08'
                            - '0.09'
                            - '0.10'
                            - '0.12'
                            - '0.14'
                            - '0.16'
                            - '0.18'
                            - '0.20'
                    audience_geo:
                      type: array
                      description: >-
                        Geography filters by location ID (from
                        `/v1/search/locations`) + weight. (instagram, tiktok,
                        youtube)
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          weight:
                            type: string
                            enum:
                              - '0.01'
                              - '0.05'
                              - '0.1'
                              - '0.15'
                              - '0.20'
                              - '0.30'
                              - '0.40'
                              - '0.50'
                              - '0.60'
                              - '0.70'
                              - '0.80'
                              - '0.90'
                              - '0.95'
                    geo:
                      type: array
                      description: >-
                        Geography filters by location ID (from
                        `/v1/search/locations`). (instagram, tiktok, youtube)
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                    followers_growth:
                      type: object
                      description: >-
                        Minimum follower growth % over X months. (instagram,
                        tiktok, youtube)
                      properties:
                        value:
                          type: string
                          enum:
                            - '0.00'
                            - '0.02'
                            - '0.10'
                            - '0.20'
                            - '0.30'
                            - '0.40'
                            - '0.50'
                            - '0.70'
                            - '0.80'
                            - '1.00'
                            - '1.50'
                            - '2.00'
                            - '3.00'
                            - '4.00'
                            - '5.00'
                        interval:
                          type: string
                          enum:
                            - i1months
                            - i2months
                            - i3months
                            - i4months
                            - i5months
                            - i6months
                    total_views_growth:
                      type: object
                      description: Minimum views growth % over X months. (tiktok, youtube)
                      properties:
                        value:
                          type: string
                          enum:
                            - '0.00'
                            - '0.02'
                            - '0.10'
                            - '0.20'
                            - '0.30'
                            - '0.40'
                            - '0.50'
                            - '0.70'
                            - '0.80'
                            - '1.00'
                            - '1.50'
                            - '2.00'
                            - '3.00'
                            - '4.00'
                            - '5.00'
                        interval:
                          type: string
                          enum:
                            - i1months
                            - i2months
                            - i3months
                            - i4months
                            - i5months
                            - i6months
                    with_contact:
                      type: array
                      description: >-
                        Required/forbidden contact channels. (instagram, tiktok,
                        youtube)
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - email
                              - snapchat
                              - facebook
                              - youtube
                              - tiktok
                              - twitter
                              - telegram
                              - vk
                              - wechat
                              - tumblr
                              - twitch
                              - pinterest
                              - linktree
                              - weibo
                          action:
                            type: string
                            enum:
                              - must
                              - not
                    audience_race:
                      type: object
                      description: >-
                        Ethnicity filter with minimum audience percentage.
                        (instagram)
                      properties:
                        code:
                          type: string
                          enum:
                            - Black
                            - Asian
                            - White
                            - Hispanic
                        weight:
                          type: string
                          enum:
                            - '0.01'
                            - '0.05'
                            - '0.1'
                            - '0.15'
                            - '0.20'
                            - '0.30'
                            - '0.40'
                            - '0.50'
                            - '0.60'
                            - '0.70'
                            - '0.80'
                            - '0.90'
                            - '0.95'
                    gender:
                      type: object
                      description: Influencer gender. (instagram, tiktok, youtube)
                      properties:
                        code:
                          type: string
                          enum:
                            - MALE
                            - FEMALE
                            - KNOWN
                            - UNKNOWN
                    audience_gender:
                      type: object
                      description: Audience gender filter. (instagram, tiktok, youtube)
                      properties:
                        code:
                          type: string
                          enum:
                            - MALE
                            - FEMALE
                        weight:
                          type: string
                          enum:
                            - '0.01'
                            - '0.05'
                            - '0.1'
                            - '0.15'
                            - '0.20'
                            - '0.30'
                            - '0.40'
                            - '0.50'
                            - '0.60'
                            - '0.70'
                            - '0.80'
                            - '0.90'
                            - '0.95'
                    ih_magic:
                      type: string
                      description: >-
                        Influencer Hero magic score. (instagram, tiktok,
                        youtube)
                      enum:
                        - high
                        - very_high
                    audience_credibility_class:
                      type: array
                      description: Audience credibility class. (instagram, tiktok, youtube)
                      items:
                        type: string
                        enum:
                          - low
                          - normal
                          - high
                          - best
                    has_audience_data:
                      type: boolean
                      description: >-
                        Whether audience data is available. (instagram, tiktok,
                        youtube)
                    is_hidden:
                      type: boolean
                      description: >-
                        Whether the account is hidden. (instagram, tiktok,
                        youtube)
                    is_verified:
                      type: boolean
                      description: >-
                        Whether the account is verified. (instagram, tiktok,
                        youtube)
                    account_type:
                      type: string
                      description: >-
                        Account type (1=Regular,2=Business,3=Creator).
                        (instagram, tiktok, youtube)
                      enum:
                        - '1'
                        - '2'
                        - '3'
                    reels_plays:
                      type: object
                      description: Reel plays range. (instagram)
                      properties:
                        left_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250000'
                            - '500500'
                            - '1000000'
                        right_number:
                          type: string
                          enum:
                            - '5000'
                            - '10000'
                            - '25000'
                            - '50000'
                            - '100000'
                            - '250500'
                            - '500500'
                            - '1000000'
                            - ''
                search_timestamp:
                  type: integer
                  description: Optional Unix timestamp (seconds) for time-based filtering.
                offset:
                  type: integer
                  description: Optional pagination offset.
              required:
                - platform
                - filter
      responses:
        '200':
          description: Search response
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    properties:
                      accounts:
                        type: array
                        items:
                          type: object
                          properties:
                            match:
                              type: object
                            account:
                              type: object
                              properties:
                                audience_source:
                                  type: string
                                user_profile:
                                  type: object
                                  properties:
                                    account_type:
                                      type: string
                                    followers:
                                      type: string
                                    user_id:
                                      type: string
                                    engagement_rate:
                                      type: string
                                    engagements:
                                      type: string
                                    fullname:
                                      type: string
                                    is_verified:
                                      type: boolean
                                    picture:
                                      type: string
                                    url:
                                      type: string
                                    username:
                                      type: string
                      cost:
                        type: string
                      shown_accounts:
                        type: array
                        items:
                          type: string
                  search_credits_left:
                    type: number
                    format: float
                    description: >-
                      Search Credits Left divided by 50. Multiply by 50 to get
                      number of new influencers to be seen.
                  search_timestamp:
                    type: integer
                  success:
                    type: boolean
              example:
                results:
                  accounts:
                    - match: {}
                      account:
                        audience_source: instagram
                        user_profile:
                          account_type: personal
                          followers: '10000'
                          user_id: '12345'
                          engagement_rate: '0.05'
                          engagements: '500'
                          fullname: Jane Doe
                          is_verified: true
                          picture: https://...
                          url: https://instagram.com/janedoe
                          username: janedoe
                cost: '0.01'
                shown_accounts:
                  - '12345'
                  - '67890'
                search_credits_left: 99.5
                search_timestamp: 1620000000
                success: true
  /v1/search/database_influencers:
    get:
      operationId: databaseInfluencers
      tags:
        - Helper endpoints
      summary: Handle Search
      description: >-
        Retrieves influencer handles or topic-tags for use in `relevance`,
        `audience_relevance`, and `search` filters.
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search term.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - topic-tags
              - search
            default: search
          description: >-
            Filter type. Use `topic-tags` for lookalike influencers, and
            `search` for any influencer. Defaults to `search`.
        - name: platform
          in: query
          required: true
          schema:
            type: string
            enum:
              - instagram
              - tiktok
              - youtube
          description: Platform to search.
      responses:
        '200':
          description: List of matching influencer handles or tags.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: string
              example:
                items:
                  - therock
                  - eminem
                  - techreview
  /v1/search/locations:
    get:
      operationId: searchLocations
      tags:
        - Helper endpoints
      summary: Location Search
      description: >
        Retrieves location IDs and names for use in `geo` and `audience_geo`
        filters.
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: Search term for location lookup.
      responses:
        '200':
          description: List of matching locations.
          content:
            application/json:
              example:
                items:
                  - id: 62149
                    text: United Kingdom
                    i: 0
                  - id: 148838
                    text: United States
                    i: 1
                  - id: 307763
                    text: United Arab Emirates
                    i: 2
                  - id: 286898
                    text: United States Virgin Islands, US
                    i: 3
                inputPhrase: United
  /v1/search/get_analytics_page:
    get:
      operationId: getAnalyticsPage
      tags:
        - Search & Reports
      summary: Get Analytics Report
      description: >
        Retrieves an analytics report for a specific influencer. If a report
        doesn't exist yet, 

        one will be generated using your account's report credits.


        **Credit Usage:**

        - If the influencer's report has been previously generated, no credits
        are used.

        - If a new report is needed, 1 report credit is deducted from your
        account.
      parameters:
        - name: user_id
          in: query
          required: true
          schema:
            type: string
          description: The influencer's platform-specific user ID.
          example: '12345678'
        - name: platform
          in: query
          required: true
          schema:
            type: string
            enum:
              - instagram
              - youtube
              - tiktok
          description: The social media platform of the influencer.
          example: instagram
        - name: calculation_method
          in: query
          required: false
          schema:
            type: string
            enum:
              - median
              - average
          description: The method used to calculate engagement metrics in the report.
          example: median
      responses:
        '200':
          description: Analytics report retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  report_credits:
                    type: integer
                    description: Remaining report credits in your account.
                  report_url:
                    type: string
                    description: URL path to view the report in the dashboard.
                  credits_used:
                    type: boolean
                    description: Whether a report credit was used for this request.
                  success:
                    type: boolean
                    description: Indicates if the request was successful.
                  status:
                    type: integer
                    description: HTTP status code.
                  report_data:
                    type: object
                    description: Full analytics report data.
                    properties:
                      success:
                        type: boolean
                        description: Indicates if the report was successfully retrieved.
                      version:
                        type: string
                        description: API version used for the report.
                        example: '2'
                      report_info:
                        type: object
                        description: Metadata about the report.
                        properties:
                          report_id:
                            type: string
                            description: Unique identifier for this report.
                            example: 66229c859d37c82e078ed328
                          created:
                            type: string
                            format: date-time
                            description: When the report was created.
                            example: '2024-04-19T16:32:05.360+00:00'
                          profile_updated:
                            type: string
                            format: date-time
                            description: >-
                              When the influencer's profile data was last
                              updated.
                            example: '2024-04-14T21:19:07.615+00:00'
                      user_profile:
                        type: object
                        description: >-
                          Influencer profile information including stats,
                          contacts, posts, and content analysis.
                        properties:
                          type:
                            type: string
                            description: Platform type.
                            enum:
                              - instagram
                              - youtube
                              - tiktok
                          user_id:
                            type: string
                            description: Platform-specific user ID.
                          username:
                            type: string
                            description: Influencer's username/handle.
                          url:
                            type: string
                            description: URL to the influencer's profile.
                          picture:
                            type: string
                            description: URL to the influencer's profile picture.
                          fullname:
                            type: string
                            description: Influencer's display name.
                          description:
                            type: string
                            description: Influencer's bio/description.
                          is_verified:
                            type: boolean
                            description: Whether the account is verified.
                          is_business:
                            type: boolean
                            description: Whether this is a business account.
                          is_hidden:
                            type: boolean
                            description: Whether the account is hidden/private.
                          account_type:
                            type: integer
                            description: Account type identifier.
                          gender:
                            type: string
                            description: Detected gender of the influencer.
                            enum:
                              - MALE
                              - FEMALE
                          language:
                            type: object
                            description: Primary language of the influencer's content.
                            properties:
                              code:
                                type: string
                                example: en
                              name:
                                type: string
                                example: English
                          followers:
                            type: integer
                            description: Total follower count.
                          posts_count:
                            type: integer
                            description: Total number of posts.
                          engagements:
                            type: integer
                            description: Average engagements per post.
                          engagement_rate:
                            type: number
                            format: float
                            description: >-
                              Engagement rate as a decimal (e.g., 0.001311 =
                              0.13%).
                          avg_likes:
                            type: integer
                            description: Average likes per post.
                          avg_comments:
                            type: integer
                            description: Average comments per post.
                          avg_views:
                            type: integer
                            description: Average views per post.
                          avg_reels_plays:
                            type: integer
                            description: Average plays for reels/short videos.
                          stat_history:
                            type: array
                            description: Historical statistics by month.
                            items:
                              type: object
                              properties:
                                month:
                                  type: string
                                  description: Month in YYYY-MM format.
                                  example: 2024-01
                                followers:
                                  type: integer
                                following:
                                  type: integer
                                avg_likes:
                                  type: integer
                          paid_post_performance:
                            type: number
                            format: float
                            description: >-
                              Performance ratio of paid/sponsored posts compared
                              to organic.
                          geo:
                            type: object
                            description: Geographic location of the influencer.
                            properties:
                              city:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  coords:
                                    type: object
                                    properties:
                                      lat:
                                        type: number
                                      lon:
                                        type: number
                              state:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  coords:
                                    type: object
                                    properties:
                                      lat:
                                        type: number
                                      lon:
                                        type: number
                              country:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  code:
                                    type: string
                                    description: ISO country code.
                                  coords:
                                    type: object
                                    properties:
                                      lat:
                                        type: number
                                      lon:
                                        type: number
                          contacts:
                            type: array
                            description: Contact information and linked social accounts.
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                  description: >-
                                    Contact type (e.g., email, linktree,
                                    facebook, twitter, tiktok, youtube).
                                value:
                                  type: string
                                  description: Contact value or username.
                                formatted_value:
                                  type: string
                                  description: Full URL or formatted contact.
                                checked:
                                  type: boolean
                                  description: Whether this contact has been verified.
                          top_hashtags:
                            type: array
                            description: Most frequently used hashtags.
                            items:
                              type: object
                              properties:
                                tag:
                                  type: string
                                weight:
                                  type: number
                                  format: float
                                  description: Relative frequency weight.
                          top_mentions:
                            type: array
                            description: Most frequently mentioned accounts.
                            items:
                              type: object
                              properties:
                                tag:
                                  type: string
                                weight:
                                  type: number
                                  format: float
                          brand_affinity:
                            type: array
                            description: Brands the influencer has affinity with.
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                interest:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                          interests:
                            type: array
                            description: Content interest categories.
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                          relevant_tags:
                            type: array
                            description: Relevant hashtags based on content analysis.
                            items:
                              type: object
                              properties:
                                tag:
                                  type: string
                                distance:
                                  type: number
                                  format: float
                                freq:
                                  type: number
                                  format: float
                          similar_users:
                            type: array
                            description: Similar influencer profiles.
                            items:
                              type: object
                              properties:
                                user_id:
                                  type: string
                                username:
                                  type: string
                                picture:
                                  type: string
                                followers:
                                  type: integer
                                fullname:
                                  type: string
                                url:
                                  type: string
                                is_verified:
                                  type: boolean
                                engagements:
                                  type: integer
                                score:
                                  type: number
                                  format: float
                                  description: Similarity score.
                                geo:
                                  type: object
                                  description: Location (if available).
                          top_posts:
                            type: array
                            description: Best performing posts.
                            items:
                              $ref: '#/components/schemas/AnalyticsPost'
                          commercial_posts:
                            type: array
                            description: Sponsored/commercial posts.
                            items:
                              $ref: '#/components/schemas/AnalyticsPost'
                          recent_posts:
                            type: array
                            description: Most recent posts.
                            items:
                              $ref: '#/components/schemas/AnalyticsPost'
                          top_reels:
                            type: array
                            description: Best performing reels/short videos.
                            items:
                              $ref: '#/components/schemas/AnalyticsPost'
                          recent_reels:
                            type: array
                            description: Most recent reels/short videos.
                            items:
                              $ref: '#/components/schemas/AnalyticsPost'
                          posts_with_hidden_likes_percentage:
                            type: number
                            format: float
                            description: Percentage of posts with hidden like counts.
                      audience_followers:
                        type: object
                        description: >-
                          Follower audience demographics. May return
                          success=false with error="empty_audience" if
                          insufficient data.
                        properties:
                          success:
                            type: boolean
                          error:
                            type: string
                            description: Error message if data unavailable.
                          data:
                            type: object
                            properties:
                              audience_credibility:
                                type: number
                                format: float
                                description: Credibility score (0-1). Higher is better.
                                example: 0.7497
                              credibility_class:
                                type: string
                                description: Credibility classification.
                                enum:
                                  - bad
                                  - average
                                  - good
                                  - excellent
                              audience_types:
                                type: array
                                description: Breakdown of follower types.
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      description: Follower type.
                                      enum:
                                        - real
                                        - influencers
                                        - mass_followers
                                        - suspicious
                                    weight:
                                      type: number
                                      format: float
                                      description: Percentage as decimal.
                              audience_reachability:
                                type: array
                                description: >-
                                  How many accounts followers follow (affects
                                  content visibility).
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      description: Following count range.
                                      example: '-500'
                                    weight:
                                      type: number
                                      format: float
                              audience_genders:
                                type: array
                                description: Gender distribution of followers.
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      enum:
                                        - MALE
                                        - FEMALE
                                    weight:
                                      type: number
                                      format: float
                              audience_ages:
                                type: array
                                description: Age distribution of followers.
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      description: Age range.
                                      example: 25-34
                                    weight:
                                      type: number
                                      format: float
                              audience_genders_per_age:
                                type: array
                                description: Gender breakdown by age group.
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    male:
                                      type: number
                                      format: float
                                    female:
                                      type: number
                                      format: float
                              audience_ethnicities:
                                type: array
                                description: Ethnicity distribution (US-focused data).
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                    name:
                                      type: string
                                    weight:
                                      type: number
                                      format: float
                              audience_languages:
                                type: array
                                description: Language distribution of followers.
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      description: ISO language code.
                                    name:
                                      type: string
                                    weight:
                                      type: number
                                      format: float
                              audience_brand_affinity:
                                type: array
                                description: Brands the audience has affinity with.
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                                    interest:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            type: string
                                    weight:
                                      type: number
                                      format: float
                                    affinity:
                                      type: number
                                      format: float
                              audience_interests:
                                type: array
                                description: Interest categories of the audience.
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                                    weight:
                                      type: number
                                      format: float
                                    affinity:
                                      type: number
                                      format: float
                              audience_geo:
                                type: object
                                description: Geographic distribution of followers.
                                properties:
                                  countries:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                                        code:
                                          type: string
                                        weight:
                                          type: number
                                          format: float
                                  states:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                                        weight:
                                          type: number
                                          format: float
                                        country:
                                          type: object
                                          properties:
                                            id:
                                              type: integer
                                            name:
                                              type: string
                                            code:
                                              type: string
                                  cities:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                                        coords:
                                          type: object
                                          properties:
                                            lat:
                                              type: number
                                            lon:
                                              type: number
                                        weight:
                                          type: number
                                          format: float
                                        state:
                                          type: object
                                          properties:
                                            id:
                                              type: integer
                                            name:
                                              type: string
                                        country:
                                          type: object
                                          properties:
                                            id:
                                              type: integer
                                            name:
                                              type: string
                                            code:
                                              type: string
                              audience_lookalikes:
                                type: array
                                description: Influencers with similar audiences.
                                items:
                                  type: object
                                  properties:
                                    user_id:
                                      type: string
                                    username:
                                      type: string
                                    picture:
                                      type: string
                                    followers:
                                      type: integer
                                    fullname:
                                      type: string
                                    url:
                                      type: string
                                    is_verified:
                                      type: boolean
                                    engagements:
                                      type: integer
                                    score:
                                      type: number
                                      format: float
                      audience_likers:
                        type: object
                        description: >-
                          Liker audience demographics (may not return if
                          insufficient data).
                        properties:
                          success:
                            type: boolean
                          error:
                            type: string
                          data:
                            type: object
                            description: >-
                              Same structure as audience_followers.data when
                              available.
                      audience_commenters:
                        type: object
                        description: >-
                          Commenter audience demographics (may not return if
                          insufficient data).
                        properties:
                          success:
                            type: boolean
                          error:
                            type: string
                          data:
                            type: object
                            description: >-
                              Same structure as audience_followers.data when
                              available.
                      extra:
                        type: object
                        description: Additional comparative metrics and histograms.
                        properties:
                          followers_range:
                            type: object
                            description: Follower range category for comparison.
                            properties:
                              left_number:
                                type: integer
                                description: Lower bound of the follower range bucket.
                                example: 1000000
                          engagement_rate_histogram:
                            type: array
                            description: >-
                              Engagement rate distribution for influencers in
                              the same follower range. Use to compare this
                              influencer's engagement rate against peers.
                            items:
                              type: object
                              properties:
                                min:
                                  type: number
                                  format: float
                                  description: Minimum engagement rate for this bucket.
                                max:
                                  type: number
                                  format: float
                                  description: Maximum engagement rate for this bucket.
                                total:
                                  type: integer
                                  description: Number of influencers in this bucket.
                                median:
                                  type: boolean
                                  description: Whether this bucket contains the median.
                          audience_credibility_followers_histogram:
                            type: array
                            description: >-
                              Audience credibility distribution for influencers
                              in the same follower range.
                            items:
                              type: object
                              properties:
                                min:
                                  type: number
                                  format: float
                                max:
                                  type: number
                                  format: float
                                total:
                                  type: integer
                                median:
                                  type: boolean
              example:
                report_credits: 49
                report_url: /analytics/instagram/69380793c4711826ce751b67
                credits_used: true
                success: true
                status: 200
                report_data:
                  success: true
                  version: '2'
                  report_info:
                    report_id: 66229c859d37c82e078ed328
                    created: '2024-04-19T16:32:05.360+00:00'
                    profile_updated: '2024-04-14T21:19:07.615+00:00'
                  user_profile:
                    type: instagram
                    user_id: '232192182'
                    username: therock
                    url: https://www.instagram.com/therock
                    fullname: Dwayne Johnson
                    description: builder of stuff
                    is_verified: true
                    is_business: false
                    gender: MALE
                    language:
                      code: en
                      name: English
                    followers: 397993574
                    posts_count: 7712
                    engagements: 521648
                    engagement_rate: 0.001311
                    avg_likes: 521648
                    avg_comments: 4033
                    avg_views: 71090
                    avg_reels_plays: 13317128
                    stat_history:
                      - month: 2024-04
                        followers: 397993574
                        following: 886
                        avg_likes: 521648
                    geo:
                      city:
                        name: Los Angeles
                      state:
                        name: California
                      country:
                        name: United States
                        code: US
                    contacts:
                      - type: twitter
                        value: therock
                        formatted_value: https://twitter.com/therock
                    top_hashtags:
                      - tag: peopleschamp
                        weight: 0.179688
                    top_mentions:
                      - tag: wwe
                        weight: 0.348066
                    interests:
                      - id: 1
                        name: Television & Film
                  audience_followers:
                    success: true
                    data:
                      audience_credibility: 0.7497
                      credibility_class: bad
                      audience_types:
                        - code: real
                          weight: 0.6523
                        - code: suspicious
                          weight: 0.1839
                      audience_genders:
                        - code: MALE
                          weight: 0.6583
                        - code: FEMALE
                          weight: 0.3417
                      audience_ages:
                        - code: 25-34
                          weight: 0.432809
                        - code: 18-24
                          weight: 0.345572
                      audience_geo:
                        countries:
                          - name: United States
                            code: US
                            weight: 0.205977
                          - name: India
                            code: IN
                            weight: 0.113483
                  audience_likers:
                    success: false
                    error: empty_audience
                  audience_commenters:
                    success: false
                    error: empty_audience
                  extra:
                    followers_range:
                      left_number: 1000000
                    engagement_rate_histogram:
                      - max: 0.001229
                        total: 6724
                      - min: 0.001229
                        max: 0.003187
                        total: 5379
        '400':
          description: Bad Request - Missing required parameters.
          content:
            application/json:
              example:
                message: Missing user_id or platform
        '402':
          description: Payment Required - No report credits remaining.
          content:
            application/json:
              example:
                message: >-
                  No report credits left this month. Please contact your account
                  manager.
        '404':
          description: Not Found - Influencer not found or insufficient data.
          content:
            application/json:
              examples:
                insufficientData:
                  summary: Insufficient data for report
                  value:
                    message: >-
                      We do not have enough data to generate a report for this
                      user
                accountNotFound:
                  summary: Influencer account not found
                  value:
                    message: Influencer account not found
  /v1/account/delete_webhook:
    delete:
      operationId: deleteWebhook
      tags:
        - Managing Webhooks
      summary: Delete Webhook
      description: Deletes an existing webhook.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_url:
                  type: string
                  description: Webhook URL to delete.
                  example: https://example.com/webhook
                webhook_type:
                  type: string
                  description: >-
                    Type of webhook. Must be one of
                    ["product_sent","update_discount_code","update_commission","update_custom_link",
                    "new_payout_request","new_email_sent","new_influencer_reply",
                    "new_influencer_post","new_max_bid","new_influencer_order"].
                  example: new_influencer_reply
              required:
                - webhook_url
                - webhook_type
      responses:
        '200':
          description: Successfully deleted webhook.
          content:
            application/json:
              example:
                message: Successfully deleted webhook.
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                invalidWebhookType:
                  summary: Invalid webhook type
                  value:
                    message: Invalid webhook type
                webhookNotFound:
                  summary: Webhook URL not found
                  value:
                    message: Webhook URL not found
webhooks:
  new_payout_request:
    post:
      tags:
        - Webhooks
      summary: New payout request
      description: >
        This webhook is fired whenever a user creates a payout request in
        Influencer Hero.   The request body contains all the details of the
        requested payout as well as  minimal information about the associated
        deal.  

        **Security / Verification**   - Each request includes a timestamp
        (`X-InfluencerHero-Timestamp`) and  
          an HMAC-SHA256 signature (`X-InfluencerHero-Signature`) in the headers.  
        - The payload can be used along with the secret key your system has
        stored 
          (provided by Influencer Hero) to verify authenticity of the request.
      operationId: newPayoutRequest
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                payout_information:
                  type: object
                  description: Key information about the requested payout.
                  properties:
                    payout_comment:
                      type: string
                      description: A comment or note associated with the payout.
                    brand_id:
                      type: string
                      description: >-
                        Identifier for the brand requesting or associated with
                        the payout.
                    payout_currency:
                      type: string
                      description: >-
                        The currency in which the payout is requested (e.g.,
                        USD).
                    payout_amount:
                      type: number
                      description: The numerical value of the payout.
                  required:
                    - payout_comment
                    - brand_id
                    - payout_currency
                    - payout_amount
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: Internal ID of the deal for reference.
              required:
                - payout_information
                - deal_info
                - deal_id
            examples:
              default:
                summary: Example Payout Request
                value:
                  payout_information:
                    payout_comment: January bonus payment
                    brand_id: '12345'
                    payout_currency: USD
                    payout_amount: 1500
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: DEAL-67890
      responses:
        '200':
          description: >-
            Your server should return a 2xx response to acknowledge successful
            receipt of the event.
  new_max_bid:
    post:
      tags:
        - Webhooks
      summary: New Max Bid Requested
      description: >
        This webhook is triggered when a new Max Bid is requested for a deal. 
        The receiving endpoint can use `X-InfluencerHero-Timestamp` and 
        `X-InfluencerHero-Signature` to verify authenticity via HMAC-SHA256.
      operationId: newMaxBid
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the new Max Bid request.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_timestamp:
                  type: string
                  description: Server-side timestamp included in the webhook body.
                max_bid_information:
                  type: object
                  description: Additional details about the Max Bid request.
                  properties:
                    max_bid_comment:
                      type: string
                      description: Notes or comments provided with the Max Bid request.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: >-
                    Unique identifier of the deal for which the Max Bid is
                    requested.
              required:
                - webhook_timestamp
                - max_bid_information
                - deal_id
            examples:
              default:
                summary: Example New Max Bid Webhook
                value:
                  webhook_timestamp: '1693427202'
                  max_bid_information:
                    max_bid_comment: >-
                      Please provide the highest possible bid for this
                      influencer.
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: abc123
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  update_discount_code:
    post:
      tags:
        - Webhooks
      summary: Update Discount Code
      description: >
        This webhook is triggered when a discount code is updated for a
        collaboration.  The receiving endpoint can use
        `X-InfluencerHero-Timestamp` and  `X-InfluencerHero-Signature` to verify
        authenticity via HMAC-SHA256.
      operationId: updateDiscountCode
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the updated discount code.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_timestamp:
                  type: string
                  description: Server-side timestamp included in the webhook body.
                code_information:
                  type: object
                  description: Details about the previous and new discount codes.
                  properties:
                    old_discount_code:
                      type: string
                      description: The existing discount code before the update.
                    old_discount_perc:
                      type: number
                      description: The existing discount percentage before the update.
                    new_discount_code:
                      type: string
                      description: The new discount code, if changed.
                    new_discount_perc:
                      type: number
                      description: The new discount percentage, if changed.
                collab_id:
                  type: string
                  description: >-
                    Unique identifier of the collaboration receiving the
                    discount code.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: >-
                    Unique identifier of the deal associated with this discount
                    code.
              required:
                - webhook_timestamp
                - code_information
                - collab_id
                - deal_id
            examples:
              default:
                summary: Example Update Discount Code Webhook
                value:
                  webhook_timestamp: '1693427202'
                  code_information:
                    old_discount_code: FIT2023
                    old_discount_perc: 15
                    new_discount_code: FIT2024
                    new_discount_perc: 20
                  collab_id: collab987
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: xyz789
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  update_custom_link:
    post:
      tags:
        - Webhooks
      summary: Update Custom Link
      description: >
        This webhook is triggered when a custom link is updated (or deleted) for
        a collaboration.  The receiving endpoint can use
        `X-InfluencerHero-Timestamp` and  `X-InfluencerHero-Signature` to verify
        authenticity via HMAC-SHA256.
      operationId: updateCustomLink
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the updated custom link.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_timestamp:
                  type: string
                  description: Server-side timestamp included in the webhook body.
                custom_link_information:
                  type: object
                  description: Details about the previous and new custom link.
                  properties:
                    old_custom_link:
                      type: string
                      nullable: true
                      description: The existing custom link before the update.
                    old_custom_link_target:
                      type: string
                      nullable: true
                      description: The existing target URL for the old custom link.
                    new_custom_link:
                      type: string
                      nullable: true
                      description: The new custom link, if changed.
                    new_custom_link_target:
                      type: string
                      nullable: true
                      description: The new target URL for the updated custom link.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                collab_id:
                  type: string
                  description: >-
                    Unique identifier of the collaboration receiving the custom
                    link.
                deal_id:
                  type: string
                  description: >-
                    Unique identifier of the deal associated with this custom
                    link.
              required:
                - webhook_timestamp
                - custom_link_information
                - collab_id
                - deal_id
            examples:
              default:
                summary: Example Update Custom Link Webhook
                value:
                  webhook_timestamp: '1693427202'
                  custom_link_information:
                    old_custom_link: /the-old-link
                    old_custom_link_target: https://old.example.com
                    new_custom_link: /the-new-link
                    new_custom_link_target: https://new.example.com
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  collab_id: collab123
                  deal_id: deal321
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  update_commission:
    post:
      tags:
        - Webhooks
      summary: Update Commission
      description: >
        This webhook is triggered when a commission percentage is updated for a
        collaboration.  The receiving endpoint can use
        `X-InfluencerHero-Timestamp` and  `X-InfluencerHero-Signature` to verify
        authenticity via HMAC-SHA256.
      operationId: updateCommission
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: >-
          Payload containing information about the updated commission
          percentage.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_timestamp:
                  type: string
                  description: Server-side timestamp included in the webhook body.
                commission_information:
                  type: object
                  description: Details about the previous and new commission percentages.
                  properties:
                    old_commission_perc:
                      type: number
                      nullable: true
                      description: The existing commission percentage before the update.
                    new_commission_perc:
                      type: number
                      description: The new commission percentage.
                collab_id:
                  type: string
                  description: Unique identifier of the collaboration.
                deal_id:
                  type: string
                  description: >-
                    Unique identifier of the deal associated with this
                    collaboration.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                is_ch_collab:
                  type: boolean
                  description: Whether this is a Creator Hero collaboration.
              required:
                - webhook_timestamp
                - commission_information
                - collab_id
                - deal_id
            examples:
              default:
                summary: Example Update Commission Webhook
                value:
                  webhook_timestamp: '1693427202'
                  commission_information:
                    old_commission_perc: 10
                    new_commission_perc: 15
                  collab_id: collab987
                  deal_id: xyz789
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  is_ch_collab: false
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  product_sent:
    post:
      tags:
        - Webhooks
      summary: Product Sent
      description: >
        This webhook is fired whenever a user sends a product to an influencer
        or contact.   The request body contains core details of the shipped
        order (in a simplified form),  along with minimal information about the
        related deal.

        **Security / Verification**   - Each request includes a timestamp
        (`X-InfluencerHero-Timestamp`) and  
          an HMAC-SHA256 signature (`X-InfluencerHero-Signature`) in the headers.  
        - The payload can be used along with the secret key your system has
        stored 
          (provided by Influencer Hero) to verify authenticity of the request.
      operationId: productSent
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                send_product_info:
                  type: object
                  description: >-
                    Details about the product and recipient information being
                    sent.
                  properties:
                    line_items:
                      type: array
                      description: A list of items being sent in this order.
                      items:
                        type: object
                        properties:
                          variant_id:
                            type: integer
                            description: Variant identifier in the e-commerce system.
                          quantity:
                            type: integer
                            description: Number of units of this variant to send.
                          variant_name:
                            type: string
                            description: Optional name or descriptor for this variant.
                        required:
                          - variant_id
                          - quantity
                    customer:
                      type: object
                      description: Basic customer/influencer information.
                      properties:
                        first_name:
                          type: string
                          description: Customer's first name.
                        last_name:
                          type: string
                          description: Customer's last name.
                        email:
                          type: string
                          format: email
                          description: Customer's email address.
                      required:
                        - first_name
                        - last_name
                        - email
                    shipping_address:
                      type: object
                      description: Shipping address where items should be delivered.
                      properties:
                        name:
                          type: string
                          description: Full name as provided on shipping details.
                        first_name:
                          type: string
                          description: First name (for shipping).
                        last_name:
                          type: string
                          description: Last name (for shipping).
                        address1:
                          type: string
                          description: Primary address line.
                        city:
                          type: string
                          description: City for shipping address.
                        province:
                          type: string
                          description: State/region/province for shipping address.
                        country:
                          type: string
                          description: Country for shipping address.
                        zip:
                          type: string
                          description: Postal or ZIP code.
                        phone:
                          type: string
                          description: Phone number associated with the shipping address.
                      required:
                        - name
                        - first_name
                        - last_name
                        - address1
                        - city
                        - province
                        - country
                        - zip
                    phone:
                      type: string
                      description: >-
                        Optional phone number for the order (duplicate of
                        shipping/billing).
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: Internal ID of the deal for reference.
              required:
                - send_product_info
                - deal_info
                - deal_id
            examples:
              default:
                summary: Example Product Sent
                value:
                  send_product_info:
                    line_items:
                      - variant_id: 123456
                        quantity: 2
                        variant_name: Blue T-Shirt, Large
                    customer:
                      first_name: John
                      last_name: Doe
                      email: john@example.com
                    shipping_address:
                      name: John Doe
                      first_name: John
                      last_name: Doe
                      address1: 123 Maple St
                      city: Sample City
                      province: Sample Province
                      country: Sample Country
                      zip: '12345'
                      phone: 555-555-5555
                    phone: 555-555-5555
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: DEAL-12345
      responses:
        '200':
          description: >-
            Your server should return a 2xx response to acknowledge successful
            receipt of the event.
  new_email_sent:
    post:
      tags:
        - Webhooks
      summary: New Email Sent
      description: >
        This webhook is triggered when a new email is sent to a deal contact. 
        The receiving endpoint can use `X-InfluencerHero-Timestamp` and 
        `X-InfluencerHero-Signature` to verify authenticity via HMAC-SHA256.
      operationId: newEmailSent
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the newly sent email.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_timestamp:
                  type: string
                  description: Server-side timestamp included in the webhook body.
                email_information:
                  type: object
                  description: Details about the email that was just sent.
                  properties:
                    sent_from_email_account:
                      type: string
                      description: Email address from which the email was sent.
                    recipient:
                      type: string
                      description: Primary recipient of the email.
                    cc_address:
                      type: string
                      nullable: true
                      description: CC recipient of the email, if any.
                    email_subject:
                      type: string
                      description: Subject line of the email.
                    email_body:
                      type: string
                      description: Plaintext version of the email body.
                    sent_by_user:
                      type: string
                      description: The name or identifier of the user who sent the email.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: Unique identifier of the deal to which the email was sent.
              required:
                - webhook_timestamp
                - email_information
                - deal_id
            examples:
              default:
                summary: Example New Email Sent Webhook
                value:
                  webhook_timestamp: '1693427202'
                  email_information:
                    sent_from_email_account: brand@mycompany.com
                    recipient: influencer@example.com
                    cc_address: manager@example.com
                    email_subject: Collaboration Proposal
                    email_body: Hello, I'd like to collaborate on our new campaign...
                    sent_by_user: John Marketer
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: deal123
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  new_influencer_post:
    post:
      tags:
        - Webhooks
      summary: New Influencer Post
      description: >
        This webhook is triggered when an influencer publishes a new post on
        social  media that is linked to a deal.  

        The receiving endpoint can use `X-InfluencerHero-Timestamp` and 
        `X-InfluencerHero-Signature` to verify authenticity via HMAC-SHA256.
      operationId: newInfluencerPost
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the new influencer post.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                post_information:
                  type: object
                  description: Details of the influencer's social media post.
                  properties:
                    account_id:
                      type: integer
                      description: Unique account ID from Influencer Hero.
                    brand_id:
                      type: integer
                      description: ID of the brand or organization the post is for.
                    post_type:
                      type: string
                      description: >-
                        Type of post (e.g., 'story_post', 'feed_post',
                        'reel_post')
                    post_assets:
                      type: array
                      description: >-
                        List of media assets associated with the post (URLs,
                        file references, etc.).
                      items:
                        type: string
                    post_timestamp:
                      type: string
                      description: Timestamp at which the influencer made the post.
                    platform_media_code:
                      type: string
                      description: Platform-specific code or identifier for the post.
                    platform_user_id:
                      type: string
                      description: User ID of the influencer on the social media platform.
                    platform_handle:
                      type: string
                      description: Influencer's handle on the platform (e.g., 'therock').
                    platform:
                      type: string
                      description: Social media platform (e.g., 'instagram', 'youtube').
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: Unique identifier of the deal this post belongs to.
                collab_id:
                  type: string
                  description: Unique identifier of the collaboration.
                deal_url:
                  type: string
                  format: uri
                  description: A direct link to view the deal inside Influencer Hero.
              required:
                - post_information
                - deal_info
                - deal_id
                - collab_id
                - deal_url
            examples:
              default:
                summary: Example New Influencer Post Webhook
                value:
                  post_information:
                    account_id: 3218
                    brand_id: 12398
                    post_type: story_post
                    post_assets:
                      - https://example.com/reel_video_1.mp4
                    post_timestamp: '2025-01-15 10:30:00'
                    platform_media_code: ABC123XYZ
                    platform_user_id: '923478147'
                    platform_handle: therock
                    platform: instagram
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: deal12345
                  collab_id: collab5678
                  deal_url: https://app.influencer-hero.com/deal/deal12345
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  new_influencer_reply:
    post:
      tags:
        - Webhooks
      summary: New Influencer Reply
      description: >
        This webhook is triggered when an influencer replies to an email 
        associated with a particular deal.  

        The receiving endpoint can use `X-InfluencerHero-Timestamp` and 
        `X-InfluencerHero-Signature` to verify authenticity via HMAC-SHA256.
      operationId: newInfluencerReply
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the influencer's email reply.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email_information:
                  type: object
                  description: Details about the received email reply.
                  properties:
                    from_addr:
                      type: string
                      description: The sender (influencer's) email address.
                    recipient:
                      type: string
                      description: The primary recipient of the email (brand or user).
                    cc_address:
                      type: string
                      nullable: true
                      description: Any CC recipients for this reply, if present.
                    email_subject:
                      type: string
                      description: Subject line of the reply email.
                    email_body:
                      type: string
                      description: Plaintext version of the email body.
                    received_time:
                      type: string
                      format: date-time
                      description: Timestamp of when the email reply was received.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                deal_id:
                  type: string
                  description: Unique identifier of the deal this email reply is for.
                deal_url:
                  type: string
                  format: uri
                  description: A direct link to view the deal inside Influencer Hero.
              required:
                - email_information
                - deal_info
                - deal_id
                - deal_url
            examples:
              default:
                summary: Example New Influencer Reply Webhook
                value:
                  email_information:
                    from_addr: janedoe@example.com
                    recipient: brand@mycompany.com
                    cc_address: team@mycompany.com
                    email_subject: 'Re: Collaboration Proposal'
                    email_body: >-
                      Thank you for reaching out. I'd love to discuss more
                      details...
                    received_time: '2025-01-16 09:15:00'
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  deal_id: deal12345
                  deal_url: https://app.influencer-hero.com/deal/deal12345
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
  new_influencer_order:
    post:
      tags:
        - Webhooks
      summary: New Influencer Order
      description: >
        This webhook is triggered when a new order is attributed to an
        influencer  (via discount code or affiliate link).

        The receiving endpoint can use `X-InfluencerHero-Timestamp` and 
        `X-InfluencerHero-Signature` to verify authenticity via HMAC-SHA256.
      operationId: newInfluencerOrder
      parameters:
        - $ref: '#/components/parameters/InfluencerHeroTimestamp'
        - $ref: '#/components/parameters/InfluencerHeroSignature'
      requestBody:
        description: Payload containing information about the new influencer order.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_information:
                  type: object
                  description: Details about the order attributed to the influencer.
                  properties:
                    order_id:
                      type: string
                      description: Unique identifier for the order.
                    order_name:
                      type: string
                      description: Human-readable order name or number.
                    order_revenue:
                      type: number
                      description: >-
                        Total revenue of the order in the original order
                        currency.
                    order_currency:
                      type: string
                      description: Currency code of the order (e.g., USD, EUR).
                    account_currency:
                      type: string
                      description: The account's default currency code (e.g., USD, EUR).
                    account_currency_revenue:
                      type: number
                      description: >-
                        Order revenue converted to the account's default
                        currency.
                    paid_commission:
                      type: number
                      description: >-
                        Commission amount to be paid to the influencer, in the
                        account's default currency.
                    commission_rate:
                      type: number
                      description: Commission rate applied (e.g., 0.10 for 10%).
                    discount_codes:
                      type: string
                      nullable: true
                      description: Discount code(s) used in the order, if any.
                    platform:
                      type: string
                      description: >-
                        E-commerce platform where the order was placed (e.g.,
                        shopify, woocommerce).
                    match_types:
                      type: string
                      nullable: true
                      description: >-
                        How the order was attributed to the influencer (e.g.,
                        discount_code, utm_link, custom_link).
                    order_timestamp:
                      type: string
                      format: date-time
                      description: Timestamp when the order was placed.
                deal_info:
                  $ref: '#/components/schemas/DealInfo'
                collab_info:
                  type: object
                  description: Information about the collaboration linked to this order.
                  properties:
                    collab_id:
                      type: string
                      description: Unique identifier of the collaboration.
                    campaign_name:
                      type: string
                      nullable: true
                      description: Name of the campaign associated with this collaboration.
                    discount_code:
                      type: string
                      nullable: true
                      description: Discount code assigned to this collaboration.
                    custom_url:
                      type: string
                      nullable: true
                      description: Custom tracking URL assigned to this collaboration.
                deal_id:
                  type: string
                  description: Unique identifier of the deal.
                collab_id:
                  type: string
                  description: Unique identifier of the collaboration.
                deal_url:
                  type: string
                  format: uri
                  description: A direct link to view the deal inside Influencer Hero.
              required:
                - order_information
                - deal_info
                - deal_id
                - collab_id
                - deal_url
            examples:
              default:
                summary: Example New Influencer Order Webhook
                value:
                  order_information:
                    order_id: '5123456789'
                    order_name: 'Order #1234'
                    order_revenue: 149.99
                    order_currency: USD
                    account_currency: USD
                    account_currency_revenue: 149.99
                    paid_commission: 14.99
                    commission_rate: 0.1
                    discount_codes: THEROCK20
                    platform: shopify
                    match_types: discount_code
                    order_timestamp: '2025-01-15T14:30:00Z'
                  deal_info:
                    deal_name: therock
                    is_active: true
                    dealflow_funnel_step: 3
                    dealflow_type: outreach
                    dealflow_name: Spring Collection Promo
                    picture_url: >-
                      https://imgp.sptds.icu/v2?mb0KwpL92uYofJiSjDn1%2F6peL1lBwv3s%2BUvShHERlDbrEEwrWumIvR20xZeZXa0LDeIrcniqZeG9S%2F1a5s2Rx3FZdXrWpY%2BmSBJp1l%2FmBGon3rcHA4EfuatZqMhVBzAT
                    nr_followers: 60000
                    full_name: Dwayne Johnson
                    platform: instagram
                    profile_url: https://instagram.com/therock
                  collab_info:
                    collab_id: collab12345
                    campaign_name: Spring Collection 2025
                    discount_code: THEROCK20
                    custom_url: null
                  deal_id: deal67890
                  collab_id: collab12345
                  deal_url: https://app.influencer-hero.com/deal/deal67890
      responses:
        '200':
          description: >-
            The server processing the webhook should generally return a 200
            status indicating successful receipt.
        4XX:
          description: Client error – e.g., signature mismatch or invalid payload.
        5XX:
          description: Server error – e.g., issue on the receiving endpoint.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >
        Your Influencer Hero API key. You can find your API key at 

        [https://app.influencer-hero.com/api](https://app.influencer-hero.com/api).


        Include this header in all authenticated requests.
  parameters:
    InfluencerHeroTimestamp:
      name: X-InfluencerHero-Timestamp
      in: header
      required: true
      schema:
        type: string
      description: |
        Unix timestamp (in seconds) at which the webhook was sent.
    InfluencerHeroSignature:
      name: X-InfluencerHero-Signature
      in: header
      required: true
      schema:
        type: string
      description: >
        HMAC-SHA256 signature computed using your webhook signing key  and the
        request body.
  schemas:
    AnalyticsPost:
      type: object
      description: Post data from an influencer's profile.
      properties:
        user_id:
          type: string
          description: Platform-specific user ID.
        username:
          type: string
          description: Influencer's username.
        user_picture:
          type: string
          description: URL to influencer's profile picture.
        user_url:
          type: string
          description: URL to influencer's profile.
        type:
          type: string
          description: Type of post.
          enum:
            - photo
            - video
            - carousel
        post_id:
          type: string
          description: Unique post identifier.
          example: '3298296905318428430_232192182'
        created:
          type: string
          format: date-time
          description: When the post was created.
        text:
          type: string
          description: Post caption/text.
        image:
          type: string
          description: URL to the post image.
        thumbnail:
          type: string
          description: URL to the post thumbnail.
        link:
          type: string
          description: Direct URL to the post.
          example: https://www.instagram.com/p/C3F549tRm8O/
        mentions:
          type: array
          description: Accounts mentioned in the post.
          items:
            type: string
        hashtags:
          type: array
          description: Hashtags used in the post.
          items:
            type: string
        stat:
          type: object
          description: Post engagement statistics.
          properties:
            likes_and_views_counts_enabled:
              type: boolean
              description: Whether like/view counts are visible.
            likes_count_enabled:
              type: boolean
            views_count_enabled:
              type: boolean
            likes:
              type: integer
              description: Number of likes.
            comments:
              type: integer
              description: Number of comments.
            plays:
              type: integer
              description: Number of video plays (for video content).
    DealInfo:
      type: object
      description: A lightweight summary of the influencers deal.
      properties:
        deal_name:
          type: string
          description: Deal name / Influencer handle
        is_active:
          type: boolean
          description: Indicates if the deal is still active.
        dealflow_funnel_step:
          type: integer
          description: Funnel step of the deal in the respective dealflow (0-4)
        dealflow_type:
          type: string
          description: Whether the dealflow is an outreach or relationship dealflow
        dealflow_name:
          type: string
          description: Name of the dealflow
        picture_url:
          type: string
          format: uri
          description: Influencer Profile Picture URL
        nr_followers:
          type: integer
          description: Number of followers of the influencer
        full_name:
          type: string
          description: >-
            Full name for the influencer, as indicated on his social media
            account
        platform:
          type: string
          description: Indicates which social media platform is primarily used.
        profile_url:
          type: string
          format: uri
          description: Link to the influencer's social media page
tags:
  - name: Test endpoints
    description: Endpoints to test authenticated and public requests
  - name: CRM
    description: Endpoints related to CRM functionalities.
  - name: Affiliate Tracking
    description: >-
      [Advanced] Server-side endpoints for tracking affiliate actions and
      performance. For most use cases, the [client-side tracking
      script](https://docs.influencer-hero.com/tracking_script) will be
      sufficient.
  - name: Account
    description: Account-related functionalities for dealflow and brand searching.
  - name: Search
    description: Endpoints for the influencer-finder search operations
  - name: Webhooks
    description: >-
      Receive real-time notifications when events occur in your account.
      Webhooks are secured via HMAC-SHA256 signatures.
