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

# Get a campaign

Use this operation to poll an enrichment. Result metrics appear after the campaign reaches `enriched`; `resultsExpireAt` reports how long the result grant remains available.

The endpoint can read API-created, app-created, and Data Cube campaigns in the authenticated organization. `createdVia` identifies the creation surface.


## OpenAPI

````yaml /openapi.json post /v1/campaigns/get
openapi: 3.1.0
info:
  title: DataLane API
  description: Public DataLane enrichment API.
  version: 1.0.0
servers:
  - url: https://api.datalane.com
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Organization
paths:
  /v1/campaigns/get:
    post:
      tags:
        - Campaigns
      summary: Get a campaign
      operationId: postV1CampaignsGet
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                campaignId:
                  type: string
                  pattern: >-
                    ^camp_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$
              required:
                - campaignId
              additionalProperties: false
          application/x-www-form-urlencoded:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                campaignId:
                  type: string
                  pattern: >-
                    ^camp_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$
              required:
                - campaignId
              additionalProperties: false
          multipart/form-data:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                campaignId:
                  type: string
                  pattern: >-
                    ^camp_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$
              required:
                - campaignId
              additionalProperties: false
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: >-
                          ^camp_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$
                      status:
                        type: string
                        enum:
                          - draft
                          - enriching
                          - enriched
                          - expired
                          - tam_only
                        description: >-
                          Lifecycle state. `tam_only` marks app-created
                          campaigns that are readable but not enrichable via the
                          API.
                      createdVia:
                        type: string
                        enum:
                          - api
                          - ui
                          - data_cube
                        examples:
                          - api
                        description: >-
                          Whether an API key, a DataLane UI user, or a Data Cube
                          created the campaign.
                      name:
                        type: string
                        examples:
                          - July target accounts
                      accounts:
                        type: object
                        properties:
                          requested:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            examples:
                              - 100
                            description: >-
                              Distinct account IDs submitted, before warehouse
                              validation and campaign exclusions.
                          eligible:
                            anyOf:
                              - type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              - type: 'null'
                            examples:
                              - 82
                              - null
                            description: >-
                              Distinct submitted account IDs selected for
                              enrichment. Null until launch evaluates the list.
                              This count determines the initial SMB credit
                              charge; it does not indicate that contacts were
                              found.
                          excluded:
                            anyOf:
                              - type: object
                                properties:
                                  total:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                    examples:
                                      - 18
                                    description: >-
                                      Distinct submitted account IDs excluded
                                      from enrichment.
                                  invalid:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                    examples:
                                      - 5
                                    description: >-
                                      Account IDs not found in DataLane's
                                      warehouse, or accounts not eligible for
                                      enrichment (closed or inactive).
                                  recentlyEnriched:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                    examples:
                                      - 13
                                    description: >-
                                      Accounts excluded by the campaign's
                                      `excludeEnrichedWithinDays` setting.
                                  crmExcluded:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                    examples:
                                      - 0
                                    description: >-
                                      Accounts excluded because they already
                                      exist in CRM targets.
                                required:
                                  - total
                                  - invalid
                                  - recentlyEnriched
                                  - crmExcluded
                                additionalProperties: false
                              - type: 'null'
                            examples:
                              - total: 18
                                invalid: 5
                                recentlyEnriched: 13
                                crmExcluded: 0
                              - null
                            description: >-
                              Exclusion breakdown from the most recent launch
                              evaluation. Null until launch evaluates the list.
                        required:
                          - requested
                          - eligible
                          - excluded
                        additionalProperties: false
                      credits:
                        type: object
                        properties:
                          charged:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            examples:
                              - 2
                            description: Credits charged to this campaign, net of refunds.
                          remaining:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            examples:
                              - 998
                            description: Organization-wide credit balance.
                        required:
                          - charged
                          - remaining
                        additionalProperties: false
                      excludeEnrichedWithinDays:
                        anyOf:
                          - type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          - type: 'null'
                        examples:
                          - 30
                          - null
                        description: >-
                          Recency exclusion applied when enrichment launches:
                          accounts enriched within this many days are skipped.
                          Null when disabled. Set at creation, changeable via
                          update while `draft`.
                      lastEnrichment:
                        anyOf:
                          - type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - failed
                                  - canceled
                              startedAt:
                                type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              endedAt:
                                anyOf:
                                  - type: string
                                    format: date-time
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                                  - type: 'null'
                              refunded:
                                type: boolean
                                description: Whether the attempt's credits were refunded.
                            required:
                              - status
                              - startedAt
                              - endedAt
                              - refunded
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          Most recent failed or canceled attempt that returned
                          the campaign to `draft`. Null otherwise.
                      createdAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        examples:
                          - '2026-07-21T14:00:00.000Z'
                      completedAt:
                        description: >-
                          When enrichment finished. Present only while
                          `enriched`.
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      resultsExpireAt:
                        description: >-
                          When result access ends. Present on `enriched` and
                          `expired` campaigns; in the past once expired.
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      results:
                        description: Result metrics. Present only while `enriched`.
                        type: object
                        properties:
                          totalAccounts:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            examples:
                              - 100
                          totalContactsFound:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                            examples:
                              - 275
                          pctAccountsWithContact:
                            type: number
                            minimum: 0
                            maximum: 1
                            examples:
                              - 0.8
                            description: >-
                              Fraction (0-1) of accounts with at least one
                              contact.
                          pctAccountsWithMobile:
                            type: number
                            minimum: 0
                            maximum: 1
                            examples:
                              - 0.6
                            description: >-
                              Fraction (0-1) of accounts with a mobile phone
                              contact.
                        required:
                          - totalAccounts
                          - totalContactsFound
                          - pctAccountsWithContact
                          - pctAccountsWithMobile
                        additionalProperties: false
                    required:
                      - id
                      - status
                      - createdVia
                      - name
                      - accounts
                      - credits
                      - excludeEnrichedWithinDays
                      - lastEnrichment
                      - createdAt
                    additionalProperties: false
                  error:
                    type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - invalid_request
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          issues:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - issues
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - data
                  - error
                additionalProperties: false
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                anyOf:
                  - type: object
                    properties:
                      data:
                        type: 'null'
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - invalid_api_key
                          message:
                            type: string
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - data
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      data:
                        type: 'null'
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - revoked_api_key
                          message:
                            type: string
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - data
                      - error
                    additionalProperties: false
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          resource:
                            type: string
                          id:
                            type: string
                        required:
                          - resource
                          - id
                        additionalProperties: false
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - data
                  - error
                additionalProperties: false
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - internal_error
                      message:
                        type: string
                        enum:
                          - Internal error.
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - data
                  - error
                additionalProperties: false
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: DataLane API key

````