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

# Accept a lead and start tracking

> The API equivalent of Track in the UI. Requires `leads:write` and `tracker:write`. The lead supplies identity; you supply tracking settings. Poll `operation.pollUrl` as for create.



## OpenAPI

````yaml /openapi.json post /api/v1/leads/{id}/track
openapi: 3.1.0
info:
  title: RaiseGate Partner API
  version: 1.0.0
  description: >-
    Organisation-scoped API for managing tracker entities, reading signals and
    alerts, and reviewing generated leads. Every key belongs to one
    organisation. Send `Authorization: Bearer rg_live_...` on every request.
servers:
  - url: https://app.raisegate.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Tracker
    description: Companies and founders the organisation monitors.
  - name: Signals
    description: Analysed result of each tracker run.
  - name: Alerts
    description: Whether a run emailed the VC, and why.
  - name: Leads
    description: Founders discovered around tracked companies.
paths:
  /api/v1/leads/{id}/track:
    post:
      tags:
        - Leads
      summary: Accept a lead and start tracking
      description: >-
        The API equivalent of Track in the UI. Requires `leads:write` and
        `tracker:write`. The lead supplies identity; you supply tracking
        settings. Poll `operation.pollUrl` as for create.
      operationId: trackLead
      parameters:
        - $ref: '#/components/parameters/ResourceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrackLead'
            example:
              thingsToTrack: Fundraising, first customers and product launches.
              alertEmails:
                - partners@fund.example
              cadenceDays: 7
      responses:
        '200':
          description: >-
            Already tracked (`alreadyTracked: true`) or the company already
            existed (`existingEntity: true`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadTrackedEnvelope'
        '201':
          $ref: '#/components/responses/LeadTracked'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    TrackLead:
      type: object
      required:
        - thingsToTrack
        - alertEmails
      properties:
        thingsToTrack:
          type: string
        alertEmails:
          type: array
          minItems: 1
          maxItems: 20
          items:
            type: string
            format: email
        emailAlertsEnabled:
          type: boolean
          default: true
        cadenceDays:
          type: integer
          enum:
            - 3
            - 7
            - 30
          default: 7
        companyName:
          type: string
        companyWebsite:
          type: string
          format: uri
          description: Required when the lead has no website.
        companyLinkedinUrl:
          type: string
          format: uri
        companyTwitterUrl:
          type: string
          format: uri
        founders:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Founder'
    LeadTrackedEnvelope:
      type: object
      properties:
        data:
          type: object
        operation:
          $ref: '#/components/schemas/Operation'
        leadId:
          type: string
          format: uuid
        alreadyTracked:
          type: boolean
        existingEntity:
          type: boolean
    Founder:
      type: object
      required:
        - name
      properties:
        id:
          type: string
          description: 'PATCH only: stored founder id to update in place.'
        name:
          type: string
        linkedinUrl:
          type: string
          format: uri
        twitterUrl:
          type: string
          format: uri
        githubUrl:
          type: string
          format: uri
    Operation:
      type: object
      properties:
        entityId:
          type: string
          format: uuid
        pollUrl:
          type: string
        enrichmentStatus:
          type: string
          enum:
            - queued
            - running
            - ready
            - partial
            - failed
        enrichmentComplete:
          type: boolean
        suggestedPollIntervalSeconds:
          type:
            - integer
            - 'null'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
  responses:
    LeadTracked:
      description: New tracked entity created from the lead.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LeadTrackedEnvelope'
    BadRequest:
      description: '`validation_error`, `invalid_json`, or `invalid_cursor`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, unknown, revoked or expired key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Key lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Unknown ID, or an ID from another organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Per-key rate limit exceeded. Wait `Retry-After` seconds.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: RaiseGate API key
      description: 'API key issued with `npm run partner-api:key`. Format: `rg_live_...`.'

````