Leadping Tags API

Manages organization-defined tags for categorizing and routing leads. Use these endpoints to list, create, update, and archive reusable tags that support lead filtering, automation, assignment, and reporting.

OpenAPI Specification

leadping-tags-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Leadping Tags API
  description: The Leadping API helps businesses capture and manage leads, automate follow-up, send SMS and MMS messages, place calls, track conversations, enforce contact suppression, and analyze communication workflows. Use this OpenAPI 3.1 contract to integrate lead sources, build organization tools, or generate a typed API client. Authenticate protected operations with a Leadping user access token or WorkOS organization API key. Lead intake operations also accept a Leadping source key.
  termsOfService: https://leadping.ai/docs/terms-of-service
  contact:
    name: Leadping Support
    url: https://leadping.ai/contact
    email: support@leadping.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
  summary: Lead management, messaging, calling, and automation API
servers:
- url: https://api.leadping.ai
  description: Production
tags:
- name: Tags
  description: Manages organization-defined tags for categorizing and routing leads. Use these endpoints to list, create, update, and archive reusable tags that support lead filtering, automation, assignment, and reporting.
paths:
  /tags:
    get:
      tags:
      - Tags
      summary: List organization lead segmentation tags
      description: Lists tags for the current organization, optionally including archived tags, for lead segmentation, filters, and routing labels.
      operationId: Tags_GetAllForCurrentOrganization
      parameters:
      - name: includeArchived
        in: query
        description: Whether to include tags that are no longer available for new assignments.
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                  - $ref: '#/components/schemas/TagResponse'
                  description: Describes tag data returned by Leadping.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
    post:
      tags:
      - Tags
      summary: Create an organization lead segmentation tag
      description: Creates a tag for the current organization so leads can be segmented, filtered, routed, and reviewed by label.
      operationId: Tags_Create
      requestBody:
        description: The tag name, color, and related display settings to create.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/TagRequest'
              description: Defines the fields clients can send when working with tag.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/TagRequest'
              description: Defines the fields clients can send when working with tag.
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/TagResponse'
                description: Describes tag data returned by Leadping.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /tags/{id}:
    put:
      tags:
      - Tags
      summary: Update an organization lead segmentation tag
      description: Updates a current-organization tag's name, color, or archived state so lead segmentation and filters stay consistent.
      operationId: Tags_Update
      parameters:
      - name: id
        in: path
        description: The unique identifier of the tag to update.
        required: true
        schema:
          type: string
      requestBody:
        description: The replacement tag name, color, and related display settings.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/TagRequest'
              description: Defines the fields clients can send when working with tag.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/TagRequest'
              description: Defines the fields clients can send when working with tag.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/TagResponse'
                description: Describes tag data returned by Leadping.
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
    delete:
      tags:
      - Tags
      summary: Archive an organization lead segmentation tag
      description: Archives a tag for the current organization so it stops being used for new segmentation while historical lead labels remain available.
      operationId: Tags_Archive
      parameters:
      - name: id
        in: path
        description: The unique identifier of the tag to archive.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: boolean
            application/json:
              schema:
                type: boolean
            text/json:
              schema:
                type: boolean
        '404':
          description: The requested resource was not found.
          content:
            text/plain:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
            text/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            text/plain:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
            text/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
components:
  schemas:
    ProblemDetails:
      type: object
      properties:
        type:
          type:
          - 'null'
          - string
          description: URI reference that identifies the problem type.
        title:
          type:
          - 'null'
          - string
          description: Short, human-readable summary of the problem.
        status:
          type:
          - 'null'
          - integer
          description: HTTP status code returned for the problem.
          format: int32
        detail:
          type:
          - 'null'
          - string
          description: Human-readable explanation specific to this occurrence of the problem.
        instance:
          type:
          - 'null'
          - string
          description: URI reference that identifies this specific occurrence of the problem.
      description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      example:
        type: https://leadping.ai/docs/errors/validation
        title: Request validation failed
        status: 400
        detail: One or more request fields are invalid.
        instance: /leads/intake
    TagResponse:
      type: object
      properties:
        organizationId:
          type:
          - 'null'
          - string
          description: Organization ID that owns this tag.
        name:
          type: string
          description: Display name for this tag response in the Leadping API.
        normalizedName:
          type: string
          description: Normalized name used for case-insensitive tag matching and deduplication.
        color:
          type:
          - 'null'
          - string
          description: Hex color used to display this tag or status in Leadping clients.
        description:
          type:
          - 'null'
          - string
          description: Human-readable description that explains this tag response to API users.
        createdByUserId:
          type:
          - 'null'
          - string
          description: User ID of the person who created this tag response.
        isArchived:
          type: boolean
          description: Indicates whether this lead or record is archived.
        archivedAt:
          type:
          - 'null'
          - string
          description: UTC timestamp when this record was archived.
          format: date-time
        id:
          type: string
          description: Stable unique identifier of the resource.
        createdAt:
          type: string
          description: UTC timestamp when the resource was created.
          format: date-time
        modifiedAt:
          type:
          - 'null'
          - string
          description: UTC timestamp when the resource was last modified, or null when it has not been updated.
          format: date-time
      description: Describes tag data returned by Leadping.
    TagRequest:
      type: object
      properties:
        name:
          type:
          - 'null'
          - string
          description: Display name for this tag request in the Leadping API.
        color:
          type:
          - 'null'
          - string
          description: Hex color used to display this tag or status in Leadping clients.
        description:
          type:
          - 'null'
          - string
          description: Human-readable description that explains this tag request to API users.
        id:
          type:
          - 'null'
          - string
          description: Stable unique identifier of an existing resource to update; omit it when the API assigns an identifier during creation.
      description: Defines the fields clients can send when working with tag.
  securitySchemes:
    Bearer:
      type: http
      description: Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
      scheme: bearer
      bearerFormat: JWT or organization API key
    SourceKey:
      type: http
      description: 'Leadping source key for lead ingestion endpoints only using the Authorization header. Example: "Authorization: Bearer lp_src_...".'
      scheme: bearer
      bearerFormat: Leadping source key
externalDocs:
  description: Leadping API documentation, authentication guide, concepts, and integration guidance.
  url: https://leadping.ai/docs/api-reference