segment Labels API

Operations for managing labels used to organize and control access to workspace resources.

Operations 3

GET /labels List labels #
POST /labels Create label #
DELETE /labels/{labelKey}/{labelValue} Delete label #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/segment-labels-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

segment-labels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Segment Public Labels API
  description: The Segment Public API allows developers to programmatically manage Segment workspaces and their resources. It supports full CRUD operations for sources, destinations, warehouses, tracking plans, functions, transformations, and catalog entries. The API follows REST conventions with standard HTTP methods and predictable resource-oriented URLs. It is available for Team and Business tier customers and is the recommended API going forward, replacing the older Config API.
  version: 1.0.0
  contact:
    name: Segment Support
    url: https://segment.com/help/
  termsOfService: https://segment.com/legal/terms/
servers:
- url: https://api.segmentapis.com
  description: Production Server
security:
- bearerAuth: []
tags:
- name: Labels
  description: Operations for managing labels used to organize and control access to workspace resources.
paths:
  /labels:
    get:
      operationId: listLabels
      summary: List labels
      description: Returns a list of all labels in the workspace.
      tags:
      - Labels
      responses:
        '200':
          description: Labels retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      labels:
                        type: array
                        items:
                          $ref: '#/components/schemas/Label'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createLabel
      summary: Create label
      description: Creates a new label in the workspace for organizing resources.
      tags:
      - Labels
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              - value
              properties:
                key:
                  type: string
                  description: The label key.
                value:
                  type: string
                  description: The label value.
                description:
                  type: string
                  description: A description of the label.
      responses:
        '200':
          description: Label created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      labels:
                        type: array
                        items:
                          $ref: '#/components/schemas/Label'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /labels/{labelKey}/{labelValue}:
    delete:
      operationId: deleteLabel
      summary: Delete label
      description: Deletes a label from the workspace by key and value.
      tags:
      - Labels
      parameters:
      - name: labelKey
        in: path
        required: true
        description: The label key.
        schema:
          type: string
      - name: labelValue
        in: path
        required: true
        description: The label value.
        schema:
          type: string
      responses:
        '200':
          description: Label deleted successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    BadRequest:
      description: The request was invalid or malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials were missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
              message:
                type: string
                description: A human-readable error message.
              field:
                type: string
                description: The field that caused the error, if applicable.
              data:
                type: object
                description: Additional error data.
                additionalProperties: true
    Label:
      type: object
      properties:
        key:
          type: string
          description: The label key.
        value:
          type: string
          description: The label value.
        description:
          type: string
          description: A description of the label.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Segment Public API access token. Generate tokens from the Segment workspace settings.
externalDocs:
  description: Segment Public API Documentation
  url: https://docs.segmentapis.com/