Segments

Update Existing Segment

Update an existing segment with the given configuration. Use this endpoint to update filter criteria, email preferences etc.

put/v1/segments/{segmentId}

Request

  • Base URL: https://api.leadboxer.com
  • URL: https://api.leadboxer.com/v1/segments/{segmentId}
  • Auth: API key in header x-api-key

Path parameters

segmentIdinteger required

Segment ID

Query parameters

segmentNamestring required

Segment Name

Request body

accountIdstring required

Leadboxer accountId.

type'USER' | 'ACCOUNT' required

Set visibility of the segment.<br/><br/><b>Possible values:</b><br/><b>USER</b> : the segment will be private to user.<br/><b>ACCOUNT</b> : the segment will be shared across the users of the account.

textFilterstring

Text-based filter expression used to filter result fields.Format: field|operator|value. Multiple filters are comma-separated.

numberFilterstring

Numeric filter expression used to filter results based on numeric fields. Format: field|operator|value. Multiple filters are comma-separated. Supported numeric operators include greaterthan, lessthan, is, isnot, between, and notbetween. The between and notbetween operators use the format min-max.

timeFilterstring

Time-based filter expression used to filter results by time field. Format: field|operator|value.

Allowed fields (same as timeField parameter):

  • eventEsTimestamp : Last Seen
  • first_session_unix_timestamp : First Seen

Supported operators:

  • exactly → integer value (0 = Today, 1 = Yesterday)
  • lessthan → integer value (e.g. 6 = last 7 days)
  • between → date range in format dd/MM/yyyy-dd/MM/yyyy

Locale settings are taken into account while interpreting dates and returning results.

fieldFilterstring

Field-based filter used to include leads based on field presence.

Format: operator|field1;field2

Allowed operator:

  • hasanyvalue

Allowed fields:

  • firstName
  • lastName
  • email

Multiple fields can be provided using semicolons.

exitLinkFilterstring

Exit link filter used to include or exclude leads based on exit link values.

Format: field|operator|value

Supported operators:

  • contains
  • is
  • isnot
  • doesnotcontain

Multiple values can be provided using semicolons.

leadscoreFilterinteger

Filters leads based on given minimum leadscore.

displayFilterstring

Display filter used to control which types of leads are returned.

Supported values:

  • company
  • person
  • unidentified

Selecting 'unidentified' returns leads that could not be identified as a company or a person.

Multiple values can be provided using semicolons.

fromFilterstring

Filters leads based on specified from user

ownerstring

Filters leads based on specified owner

hiddenstring

Filters leads based on presetInclusionList

searchstring

Keyword search

emailView'NONE' | 'LEAD' | 'ACCOUNT' required

Email view type.<br/>Possible values : NONE, LEAD, ACCOUNT<br/>

notificationType'NONE' | 'DAILY' | 'WEEKLY' required

Set notification frequency.<br/><br/><b>Possible values:</b><br/><b>NONE</b> : Do not send any notification.<br/><b>DAILY</b> : Send notification daily.<br/><b>WEEKLY</b> : Send notification weekly.

notificationMailIdsstring

List of comma separated email addresses for notification

mailTemplatestring

Set headlines for the notification email

formatstring

Format for the segment notification.<br/>Possible values : html, csv

dayOfWeekinteger

Day of week on which weekly notification will be sent. Possible values include numbers from 1 to 7 (where 1 refers to Monday)

additionalCsvFieldsstring

List of comma separated fields to be included in CSV

sortBystring

Field to sort result.<br/>Possible values :<br/><b>_score</b> : records will be sorted as per leadscore.<br/><b>lastEvent</b> : records will be sorted as per activity time.<br/>Default : _score

sortOrderstring

Sort order.<br/>Possible values : asc, desc<br/>Default : desc

viewTypestring

View type.<br/>Possible values : B2B, B2C<br/>Default : B2B

timeFieldstring
liststring
csvSetNamestring

Example request

{
  "type": "USER",
  "exitLinkFilter": "exitLinkFilter|contains|leads",
  "search": "*",
  "emailView": "LEAD",
  "notificationType": "DAILY",
  "notificationMailIds": "user1@example.com,user2@example.com",
  "mailTemplate": "Weekly Lead Summary",
  "format": "html",
  "dayOfWeek": 1,
  "additionalCsvFields": "email,companyName,jobTitle",
  "sortBy": "_score",
  "sortOrder": "desc",
  "viewType": "B2B"
}

Response

Segment updated successfully. No content returned.

Changes

No recorded changes to this operation across all 1 revision of this API.