POST Create GTM segment

Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.

POST /api/v1/public/gtm/segments — Create GTM segment

Read/write token required

Create workspace segment. Requires write permission. Creates require clientRequestId; updates and deletions require expectedRevision. Omitted update fields are retained; supplied arrays replace existing arrays. Referenced records cannot be deleted. 2. Segments: select one or more saved Offerings, define industries and country coverage, then add relevant company size, activity, inclusion/exclusion criteria and custom parameters. Countries default to all countries covered by the linked Offerings; explicit selections must stay within that coverage. Save before using the Segment downstream.

Send the documented JSON object. Workspace scope comes exclusively from the bearer credential. Requires a read/write API credential. Check receipts before retrying a timed-out write.

JSON body fields

input (body, object, required)

See the JSON schema for this field’s contract.

name (body, string, required)

See the JSON schema for this field’s contract.

  • Minimum length: 1
  • Maximum length: 200
offeringIds (body, string[], required)

See the JSON schema for this field’s contract.

  • Minimum items: 1
  • Maximum items: 100
description (body, string, optional)

See the JSON schema for this field’s contract.

  • Default: ""
  • Maximum length: 20000
industries (body, string[], required)

Select at least one buyer industry. Use workspace field options or supply a custom industry label.

  • Minimum items: 1
  • Maximum items: 100
countryMode (body, inherit | selected, optional)

See the JSON schema for this field’s contract.

  • Default: "inherit"
countries (body, string[], optional)

See the JSON schema for this field’s contract.

  • Default: []
  • Maximum items: 100
employeesMin (body, integer, optional)

See the JSON schema for this field’s contract.

  • Default: null
  • Minimum: 1
employeesMax (body, integer, optional)

See the JSON schema for this field’s contract.

  • Default: null
  • Minimum: 1
inclusionCriteria (body, string, optional)

See the JSON schema for this field’s contract.

  • Default: ""
  • Maximum length: 20000
exclusions (body, string, optional)

See the JSON schema for this field’s contract.

  • Default: ""
  • Maximum length: 20000
parameters (body, object[], optional)

See the JSON schema for this field’s contract.

  • Default: []
  • Maximum items: 50
name (body, string, required)

See the JSON schema for this field’s contract.

  • Minimum length: 1
  • Maximum length: 200
value (body, string, required)

See the JSON schema for this field’s contract.

  • Maximum length: 20000
clientRequestId (body, string, required)

See the JSON schema for this field’s contract.

  • Minimum length: 1
  • Maximum length: 100
JSON request body schema
{
  "type": "object",
  "properties": {
    "input": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        "offeringIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-f\\d]{24}$"
          },
          "minItems": 1,
          "maxItems": 100
        },
        "description": {
          "type": "string",
          "maxLength": 20000,
          "default": ""
        },
        "industries": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 200
          },
          "minItems": 1,
          "maxItems": 100,
          "description": "Select at least one buyer industry. Use workspace field options or supply a custom industry label."
        },
        "countryMode": {
          "type": "string",
          "enum": [
            "inherit",
            "selected"
          ],
          "default": "inherit"
        },
        "countries": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 200
          },
          "maxItems": 100,
          "default": []
        },
        "employeesMin": {
          "default": null,
          "nullable": true,
          "type": "integer",
          "minimum": 1
        },
        "employeesMax": {
          "default": null,
          "nullable": true,
          "type": "integer",
          "minimum": 1
        },
        "inclusionCriteria": {
          "type": "string",
          "maxLength": 20000,
          "default": ""
        },
        "exclusions": {
          "type": "string",
          "maxLength": 20000,
          "default": ""
        },
        "parameters": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "value": {
                "type": "string",
                "maxLength": 20000
              }
            },
            "required": [
              "name",
              "value"
            ],
            "additionalProperties": false
          },
          "maxItems": 50,
          "default": []
        }
      },
      "required": [
        "name",
        "offeringIds",
        "industries"
      ],
      "additionalProperties": false
    },
    "clientRequestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "input",
    "clientRequestId"
  ],
  "additionalProperties": false
}
JSON response schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "revision": {
      "type": "number"
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "revision",
    "updatedAt"
  ],
  "additionalProperties": false
}

Responses

200: Operation receipt or read result. Arrays are returned under items; scalar and null results under value.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

400: Invalid operation input or record identifiers.
400 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
401: Bearer credential is missing, expired or invalid.
401 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
402: Insufficient research credits. Add credits before retrying.
402 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
403: Write access or resource permission is required.
403 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
404: Record is not available in the credential workspace.
404 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
405: Use the documented HTTP method.
405 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
409: Revision conflict or a record has dependencies. Refetch and reconcile links before retrying.
409 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
413: Request exceeds the permitted JSON body size.
413 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
429: Rate limit exceeded. Observe Retry-After.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

429 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
500: Internal server error.
500 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
503: Service temporarily unavailable. Observe Retry-After when present.
503 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
504: Execution timed out. A write may have committed; check receipts or progress before retrying.
504 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}

Create GTM segment

curl -X POST "https://server-url-from-token-page.endpoint/api/v1/public/gtm/segments" \
  -H "Authorization: Bearer $DOE_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "input": {
    "name": "Mid-market insurers",
    "offeringIds": [
      "507f1f77bcf86cd799439011"
    ],
    "description": "Insurers processing claims",
    "industries": [
      "Insurance"
    ],
    "countryMode": "inherit"
  },
  "clientRequestId": "replace-with-unique-request-id"
}'
Response example
No response example is supplied. See the JSON response schema.