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

# Add a record to a pipeline

> Add a company or contact to a pipeline. `recordId` is the Gleap id of the record — a
company's `_id` (see GET /companies) or a contact's `id`, matching the pipeline's
`recordType`. `laneId` picks the stage and defaults to the pipeline's first stage; `values`
sets initial field values keyed by `fieldId` (see GET /pipelines/{pipelineId}/properties).

A record sits on a pipeline at most once: adding one that is already present returns the
existing entry unchanged instead of creating a duplicate. Pipeline automations configured for
"record added" run on a genuine add.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /pipelines/{pipelineId}/entries
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /pipelines/{pipelineId}/entries:
    post:
      tags:
        - Pipelines
      summary: Add a record to a pipeline
      description: >-
        Add a company or contact to a pipeline. `recordId` is the Gleap id of
        the record — a

        company's `_id` (see GET /companies) or a contact's `id`, matching the
        pipeline's

        `recordType`. `laneId` picks the stage and defaults to the pipeline's
        first stage; `values`

        sets initial field values keyed by `fieldId` (see GET
        /pipelines/{pipelineId}/properties).


        A record sits on a pipeline at most once: adding one that is already
        present returns the

        existing entry unchanged instead of creating a duplicate. Pipeline
        automations configured for

        "record added" run on a genuine add.
      operationId: AddEntry
      parameters:
        - in: path
          name: pipelineId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PipelineEntryDTO'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - properties:
                      updatedAt:
                        $ref: '#/components/schemas/NativeDate'
                      createdAt:
                        $ref: '#/components/schemas/NativeDate'
                    required:
                      - updatedAt
                      - createdAt
                    type: object
                  - properties:
                      laneChangedAt:
                        type: string
                        format: date-time
                      recordSnapshot:
                        properties:
                          subtitle:
                            type: string
                          plan:
                            type: string
                          externalId:
                            type: string
                          value:
                            type: number
                            format: double
                          name:
                            type: string
                        type: object
                      laneId:
                        type: string
                      lexorank:
                        type: string
                      createdBy:
                        properties:
                          isValid:
                            properties: {}
                            type: object
                          createFromHexString:
                            properties: {}
                            type: object
                          createFromTime:
                            properties: {}
                            type: object
                          generate:
                            properties: {}
                            type: object
                          cacheHexString: {}
                        type: object
                      recordId:
                        properties:
                          isValid:
                            properties: {}
                            type: object
                          createFromHexString:
                            properties: {}
                            type: object
                          createFromTime:
                            properties: {}
                            type: object
                          generate:
                            properties: {}
                            type: object
                          cacheHexString: {}
                        type: object
                      recordType:
                        type: string
                        enum:
                          - COMPANY
                          - CONTACT
                      pipeline:
                        properties:
                          isValid:
                            properties: {}
                            type: object
                          createFromHexString:
                            properties: {}
                            type: object
                          createFromTime:
                            properties: {}
                            type: object
                          generate:
                            properties: {}
                            type: object
                          cacheHexString: {}
                        type: object
                      project:
                        properties:
                          isValid:
                            properties: {}
                            type: object
                          createFromHexString:
                            properties: {}
                            type: object
                          createFromTime:
                            properties: {}
                            type: object
                          generate:
                            properties: {}
                            type: object
                          cacheHexString: {}
                        type: object
                      values: {}
                    required:
                      - recordId
                      - recordType
                      - pipeline
                      - project
                      - values
                    type: object
                  - $ref: '#/components/schemas/Document_any.any.any_'
                  - properties:
                      _id:
                        $ref: '#/components/schemas/ObjectId'
                    required:
                      - _id
                    type: object
      security:
        - jwt: []
components:
  schemas:
    PipelineEntryDTO:
      properties:
        recordId:
          type: string
          description: >-
            Gleap id of the record to add, matching the pipeline's `recordType`:
            a company's `_id` (see

            GET /companies) or a contact's `id`. Not your own external companyId
            / userId.
        laneId:
          type: string
          description: >-
            Stage to add the entry to — a lane `id` from the pipeline's `lanes`.
            Defaults to the

            pipeline's first stage.
        values:
          description: |-
            Initial field values, keyed by the pipeline's field `fieldId`s (see
            GET /pipelines/{pipelineId}/properties). Primitive values only.
      required:
        - recordId
      type: object
      additionalProperties: false
    NativeDate:
      type: string
    Document_any.any.any_:
      $ref: '#/components/schemas/FlattenMaps_T_'
      description: >-
        Generic types for Document:

        *  T - the type of _id

        *  TQueryHelpers - Object with any helpers that should be mixed into the
        Query type

        *  DocType - the type of the actual Document created
    ObjectId:
      type: string
    FlattenMaps_T_:
      properties: {}
      type: object
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````