PerformLine

PerformLine API Specification

Version 0.1.5

Overview

Authentication

Authentication with the API is performed by including your API Token (issued by PerformLine) in all API requests using the Authorization header like so:

Authorization: Token XXXXXXXXXXXXXXXXXXX

Response Objects

The API responds to all requests with a standardized response structure that resembles the following:

{
  • Status: "success",
  • StatusCode: 200,
  • Results: [
    1. {
      • Id: 100,
      • Name: "Foo Bar"
      }
    ]
}

For endpoints that return multiple results (e.g.: queries), the Results key will be an array of objects. For endpoints returning individual items, the key will contain an object.

Errors

The PerformLine API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, the requested resource is missing, etc.), and codes in the 5xx range indicate an error with PerformMatch API servers. A typical error response will be a JSON object that resembles the following:

{
  • Status: "error",
  • StatusCode: 400,
  • ErrorMessage: "Bad Request",
  • ErrorDetail: "You have specified an unsupported or malformed parameter."
}

Endpoints

Below is the documentation for all supported API endpoints in the PerformLine Customer API.

GET /scoring/v1/overrides/:entity_id/ Retrieves override details for a pre-publication channel entity. For web channel pages, use /web/pages/overrides/:id/ instead.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Status: "success",
  • StatusCode: 200,
  • ServiceName: "scoring-service",
  • Results: {
    • id: "24717737",
    • overrides: "this term is not allowed", "banned", "example"
    }
}
Attributes
  • id

    ID of the asset.

    String
  • overrides

    All of the violations that are overridden on a page.

    Nullable

GET /web/pages/overrides/:id/ Retrieves override details for a web channel page. For pre-publication entities (documents, call center transcripts, chat transcripts, etc.), use /scoring/v1/overrides/:entity_id/ instead.

URL Parameters

  • id

    The page entity ID (e.g., PLE7C3A6DQ7JAWFH234TECONWV5E) or legacy page ID.

    String

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • id: "PLE7C3A6DQ7JAWFH234TECONWV5E",
  • overrides: [
    • {
      • index: 0,
      • rule_id: 63655,
      • term_id: 854464,
      • reason: "Compliance Approved",
      • notes: "cats",
      • override_score: true,
      • highlight: true,
      • username: "jdoe@performline.com",
      • created_at: 1761232561,
      • qualifier_term_id: 0,
      • qualifier_term_index: null
      }
    ]
}
Attributes
  • id

    The page entity ID.

    String
  • overrides

    Array of override entries for this page. Each entry contains rule_id, term_id, reason, notes, override_score, highlight, username, created_at, qualifier_term_id, and qualifier_term_index.

    Array

HTTP 404 (Content-Type: application/json)

Returned when the page does not exist.

GET /scoring/v1/content-tags/:entity_id/ Retrieves content tags for a specific entity.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • status: "success",
  • message: "Tags retrieved successfully",
  • results: {
    • content: "This is the scorable content.",
    • tags: [
        • word_index: 0,
        • start_index: 0,
        • end_index: 4,
        • term: "example_term",
        • rule_id: 123,
        • rule_name: "example_rule",
        • rule_type: "banned",
        • term_id: 456,
        • is_trigger: true
      ]
    }
}
Attributes
  • content

    The scorable content.

    String
  • tags

    List of tags applied to the content.

    List
  • word_index

    The index of the term in the content.

    Integer
  • start_index

    Start index of the term in the content.

    Integer
  • end_index

    End index of the term in the content.

    Integer
  • term

    The term that is overridden.

    String
  • rule_id

    ID of the rule associated with the term.

    Integer
  • rule_name

    Name of the rule associated with the term.

    String
  • rule_type

    Type of rule (e.g., banned, required).

    String
  • term_id

    ID of the term.

    Integer
  • is_trigger

    Indicates whether the term is a trigger for the rule.

    Boolean

GET /api/v1/document/cases/:id/audit Retrieves the audit details for a specific case.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
      • id: "147ee8ee-4f00-4682-9521-744efa15504a",
      • title: "Case X",
      • case_number: "C12345",
      • created_at: "2023-08-07T12:34:56Z",
      • transition_by: "user@example.com",
      • from_state: "new",
      • to_state: "open",
      • document_ids: "PLUE6BGJ4FXRF63K4HANRNR2RCF4,PLPU3QCIWOJBBQJAFWQAHHGN5NSI",
      • case_creator: "creator@example.com",
      • case_assignee: "assignee@example.com"
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • id

    Unique identifier for this audit entry.

    String
  • title

    Title of the case.

    String
  • case_number

    Case number.

    String
  • created_at

    Timestamp of when the audit entry was created.

    DateTime
  • transition_by

    Email of the user who made the transition.

    String
  • from_state

    Initial state of the case.

    String
  • to_state

    Final state of the case.

    String
  • document_ids

    Comma-separated list of document IDs related to this case.

    String
  • case_creator

    Email of the case creator.

    String
  • case_assignee

    Email of the case assignee.

    String

GET /common/brands/ Returns a list of all brands matching the given criteria.

Query String Parameters

Parameter Description Example
limit Limits the number of results per request. ?limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: 11,
      • Name: "A. Foo Industries"
      },
    2. {
      • Id: 12,
      • Name: "BAR, Inc."
      },
    3. {
      • Id: 13,
      • Name: "Baz Media"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this brand.

    Integer
  • Name

    The brand's name.

    String

GET /common/brands/:id/ Retrieves details on a specific brand.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • Id: 11,
    • Name: "A. Foo Industries"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this brand.

    Integer
  • Name

    The brand's name.

    String

GET /common/brands/:brand_id/rules/ Returns a list of all rules from the specified brand and by additional query parameters.

Query String Parameters

Parameter Description Example
rule_type Filters the results by rule type: banned, required, conditionalBanned, conditionalRequired, spotlight ?rule_type=conditionalBanned

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: 91,
      • Name: "Cannot say these",
      • Weight: "high"
      },
    2. {
      • Id: 112,
      • Name: "Must say these",
      • Weight: "low"
      },
    3. {
      • Id: 134,
      • Name: "Sometimes you much say these",
      • Weight: "medium"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this rule.

    Integer
  • Name

    The Rule's name.

    String
  • Weight

    The weight of the Rule.

    String

GET /common/campaigns/ Returns a list of all campaigns.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • BrandId: 11,
      • CompanyId: 10,
      • Description: "",
      • Id: 1,
      • Name: "A. Foo: Content"
      },
    2. {
      • BrandId: 12,
      • CompanyId: 10,
      • Description: "",
      • Id: 2,
      • Name: "A. Foo: Disclosure Page"
      },
    3. {
      • BrandId: 13,
      • CompanyId: 10,
      • Description: "",
      • Id: 3,
      • Name: "BAR, Inc.: Content"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this campaign.

    Integer
  • Name

    The name of the campaign.

    String
  • Description

    A description of the campaign.

    String
  • BrandId

    The Brand this campaign belongs to.

    Integer
  • CompanyId

    The Company this campaign belongs to.

    Integer

GET /common/campaigns/:id/ Retrieves details on a specific campaign.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 11,
    • CompanyId: 10,
    • Description: "A. Foo is a campaign to catch compliance violations.",
    • Id: 1,
    • Name: "A. Foo: Content"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this campaign.

    Integer
  • Name

    The name of the campaign.

    String
  • Description

    A description of the campaign.

    String
  • BrandId

    The Brand this campaign belongs to.

    Integer
  • CompanyId

    The Company this campaign belongs to.

    Integer

GET /common/campaigns/:campaign_id/rules/ Returns a list of all rules from the specified campaign and by additional query parameters.

Query String Parameters

Parameter Description Example
rule_type Filters the results by rule type: banned, required, conditionalBanned, conditionalRequired, spotlight ?rule_type=conditionalBanned

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: 91,
      • Name: "Cannot say these",
      • Weight: "high"
      },
    2. {
      • Id: 112,
      • Name: "Must say these",
      • Weight: "medium"
      },
    3. {
      • Id: 134,
      • Name: "Sometimes you much say these",
      • Weight: "low"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this rule.

    Integer
  • Name

    The Rule's name.

    String
  • Weight

    The weight of the Rule.

    String

GET /common/rules/ Returns a list of all rules filtered by your API token and by additional query parameters.

Query String Parameters

Parameter Description Example
rule_type Filters the results by rule type: banned, required, conditionalBanned, conditionalRequired, spotlight ?rule_type=conditionalBanned

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: 91,
      • Name: "Cannot say these",
      • Weight: "low"
      },
    2. {
      • Id: 112,
      • Name: "Must say these",
      • Weight: "medium"
      },
    3. {
      • Id: 134,
      • Name: "Sometimes you much say these",
      • Weight: "high"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this rule.

    Integer
  • Name

    The Rule's name.

    String
  • Weight

    The weight of the Rule.

    String

GET /common/rules/:id/ Retrieves details on a specific rule.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • Id: 91,
    • Name: "Cannot say these",
    • Method: "exact",
    • Weight: "low",
    • Note: "Example note",
    • Category: {
      • TermCategoryID: 1
      },
    • Terms: [
      1. {
        • Id: 1,
        • Term: "example term",
        • Note: "Term specific note"
        }
      ]
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this rule.

    Integer
  • Name

    The Rule's name.

    String
  • Method

    The method of the Rule.

    String
  • Weight

    The weight of the Rule.

    String
  • Note

    Note specific to this rule.

    String
  • Category.TermCategoryID

    The rule category ID for the associated terms.

    Integer
  • Terms

    The terms of the Rule and their details.

    Array

GET /common/trafficsources/ Returns a list of all traffic sources.

Query String Parameters

Parameter Description Example
limit Limits the number of results per request. ?limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • CompanyId: 10,
      • Id: 1,
      • Name: "tester"
      },
    2. {
      • CompanyId: 10,
      • Id: 2,
      • Name: "managed-tester"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this traffic source.

    Integer
  • Name

    The name of the traffic source.

    String
  • CompanyId

    The Company this traffic source belongs to.

    Integer

GET /common/trafficsources/:id/ Retrieves details on a specific traffic source.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • CompanyId: 10,
    • Id: 1,
    • Name: "tester"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this traffic source.

    Integer
  • Name

    The name of the traffic source.

    String
  • CompanyId

    The Company this traffic source belongs to.

    Integer

GET /common/remediation_status/ Retrieves all available remediation statuses.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • Statuses: [
      1. "Not reviewed",
      2. "Opened",
      3. "In progress",
      4. "Escalated",
      5. "Closed no action required",
      6. "Closed resolved"
      ]
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Statuses

    List of remediation statuses.

    Other

POST /request-upload/ Request S3 pre-signed upload url.

Request Parameters

Parameter Description Example
campaign_id Campaign Id for upload. 1193
uploader_email Uploader email. bob@performline.com
internal_id Your internal Id used to identify uploaded entity. B4ZF9CMHB5NYCA
ocr_engine Optional OCR engine to use for document processing. Valid options: "textract" or "document_ai" (case insensitive). If not specified, the default OCR engine from campaign settings will be used. textract
dynamic_rules Optional array of rule IDs to apply dynamically to this upload. [123, 456, 789]

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • EntityId: "PLSAG2BBHBZFCMHB5NYCV2QPR4YM",
      • Title: "important_document.pdf"
      },
    2. {
      • EntityId: "PLCCSEGCMNGFF63EV6EMJUMXXMGM",
      • Title: "legal.docx"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • EntityId String
  • Title String

POST /upload/ Upload a single file to PerformLine for further processing.

Request Parameters

Parameter Description Example
file_dataFile binary data (required).{binary data}
file_nameName of the file being uploaded (required).example.pdf
file_typeMIME type of the file (required).application/pdf
campaign_idCampaign Id for upload (required).1234
uploader_emailUploader email (required).user@example.com
webhook_urlWebhook URL to notify after upload (optional).https://webhook-test.com/your-webhook-id
webhook_headers Array of custom headers for webhook notification (optional).
Each header should be an object with key and value fields.
[
    { "key": "X-Header-12345", "value": "67890" },
    { "key": "X-Header-ABCDE", "value": "FGHIJ" }
]
titleTitle for the document (optional).Test Document
internal_idYour internal Id used to identify uploaded entity (optional).ABC123
request_typeType of request (optional).integrations_compliance_alert_1
ocr_engineOptional OCR engine to use for document processing. Valid options: "textract" or "document_ai" (case insensitive). If not specified, the default OCR engine from campaign settings will be used.textract
dynamic_rulesOptional array of rule IDs to apply dynamically to this upload. Can be JSON array or comma-separated values.[123, 456, 789]

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
        "Status": "success",
        "StatusCode": 200,
        "ServiceName": "",
        "Results": {
            "EntityId": "PLXXXXXX...",
            "Title": "Test Document"
        }
}
Attributes
  • EntityId String
  • Title String

GET /common/items/ Retrieves a list of scorable items across all PerformLine product offerings.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • BrandId: 11,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456789,
      • LastScoredAt: "2024-05-18T13:04:02.657514879-04:00",
      • RemediationStatus: "",
      • Score: 75,
      • Tags: null,
      • TrafficSourceId: 1,
      • Type: "email"
      },
    2. {
      • BrandId: 12,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456000,
      • LastScoredAt: "2024-05-18T11:47:02.657516977-04:00",
      • RemediationStatus: "",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "web",
      • Url: https://google.com
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /common/items/:id/ Retrieves details on a specific scorable content item.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 11,
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • Id: 123456789,
    • LastScoredAt: "2024-05-18T13:04:02.657570257-04:00",
    • RemediationStatus: "",
    • Score: 175,
    • Tags: null,
    • TrafficSourceId: 1,
    • Type: "email"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /common/items/:id/workflow/ Retrieves details on a specific item's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /web/pages/ Retrieves a list of web pages that PerformLine scans and scores.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
tags Restrict results to the given Tag(s). &tags=red,blue
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • BrandId: 11,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456789,
      • LastScoredAt: "2024-05-18T13:04:02.657660094-04:00",
      • RemediationStatus: "",
      • Score: 75,
      • Tags: null,
      • TrafficSourceId: 1,
      • Type: "web",
      • Url: https://bing.com
      },
    2. {
      • BrandId: 12,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456000,
      • LastScoredAt: "2024-05-18T11:47:02.657662094-04:00",
      • RemediationStatus: "",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "web",
      • Url: https://google.com
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /web/pages/:id/ Retrieves details on a specific web page.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 12,
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • Id: 987654,
    • LastScoredAt: "2024-05-18T11:47:02.657716978-04:00",
    • RemediationStatus: "",
    • Score: 100,
    • Tags: null,
    • TrafficSourceId: 2,
    • Type: "web",
    • Url: https://google.com
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IsReviewed

    Whether or not an asset has been reviewed.

    Boolean
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /web/pages/:id/image Retrieves the image of a specific web page.

Responses

HTTP 200 (Content-Type: image/png)

Example Output
[Binary PDF data]
                                        
Attributes
  • PNG Image

    PNG data containing the web page image.

    Binary

GET /document/documents/ Retrieves all available documents.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=1187,1378
campaign Restrict results to the given Campaign ID(s). &campaign=1733
created_to Restrict results to documents created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to documents created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to documents scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to documents scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
state Restrict results to documents in a specific state. Valid values: unprocessed, processing, completed, failed. &state=processing
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: "PLSAG2BBHBZFCMHB5NYCV2QPR4YM",
      • Score: 73,
      • Title: "Certified Title.pdf",
      • State: "completed",
      • Error: ""
      },
    2. {
      • Id: "PLL7ZWDBDAKFGKPGLOG24QAM4MFA",
      • Score: 97,
      • Title: "Loan Management.docx",
      • State: "completed",
      • Error: ""
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    String
  • Title

    Document title.

    String
  • Score

    Document score.

    Integer

GET /document/documents/:id/ Retrieves document by Id.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 1849,
    • CampaignId: 1543,
    • CasesIds: [
      1. "a739e196-990b-4581-8def-a14c1a360f7f"
      ],
    • DocumentType: "docx",
    • Id: "PLL7ZWDBDAKFGKPGLOG24QAM4MFA",
    • IngestionMethod: "email",
    • LastScoredAt: "2024-05-18T11:47:02.657784865-04:00",
    • Pages: 0,
    • Score: -25,
    • Submitter: "bob@company.com",
    • Title: "Loan Management.docx",
    • UploadDate: "2024-05-18T10:04:02.657784753-04:00",
    • State: "completed",
    • Error: ""
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    String
  • Title

    Document title.

    String
  • Pages

    Number of pages.

    Integer
  • Score

    The score (out of 100) of the item.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • DocumentType

    Document mime type: pdf, docx, jpg.

    String
  • Submitter

    Uploader username.

    String
  • UploadDate

    Upload date.

    Time
  • CasesIds

    List of cases associated with this document.

    Other
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IngestionMethod

    email or user

    String

GET /document/documents/:id/compliance-alert Retrieves the compliance alert PDF for a specific document.

Responses

HTTP 200 (Content-Type: application/pdf)

Example Output
[Binary PDF data]
                                        
Attributes
  • PDF Document

    Binary PDF data containing the compliance alert report.

    Binary

GET /document/documents/:id/violations/ Retrieves violation details on a specific document.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • Deduction: 10,
      • ID: "PLL7ZWDBDAKFGKPGLOG24QAM4MFA",
      • Occurrences: 4,
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!",
      • TermType: "root",
      • WordIndex: 325
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • Deduction: 10,
      • ID: "PLL7ZWDBDAKFGKPGLOG24QAM4MFA",
      • Occurrences: 4,
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!",
      • TermType: "root",
      • WordIndex: 467
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Document entity ID.

    String
  • TermID

    ID of the Term within this violation.

    Integer
  • TermType

    Term type.

    String
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Float
  • WordIndex

    Number of occurrences.

    Integer

GET /document/cases/ Retrieves all available cases.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=1187,1378
campaign Restrict results to the given Campaign ID(s). &campaign=1733
created_to Restrict results to cases created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to cases created after created_from date. &created_from=2018-01-01 or 60 days
state Restrict results to cases in specific state. &state=Opened
expired Restrict results to expired or unexpired cases. &expired=true
owner Restrict results to owner of the case. &owner=bob@performline.com
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Id: "4d838c95-65cb-4420-84a5-6441184db912",
      • Title: "Staff Case"
      },
    2. {
      • Id: "fcd3c6cb-5193-46b1-b182-f837e5c187f5",
      • Title: "Loan Management"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    String
  • Title

    Case title.

    String

GET /document/cases/:id/ Retrieves case by Id.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandID: "",
    • CaseNumber: "C343",
    • Comments: [
      1. {
        • Body: "I have started working on this",
        • UID: "bob@performline.com",
        • UpdatedAt: "2024-05-18T13:24:02.657872146-04:00"
        }
      ],
    • CreatedAt: "2024-05-18T10:04:02.657872346-04:00",
    • Description: "Staff created case",
    • DocumentIds: [
      1. "PLL7ZWDBDAKFGKPGLOG24QAM4MEA",
      2. "PLHKQBOKD4EJBXRJFOSAFSREZVX5"
      ],
    • Id: "2b0c1735-b488-476d-a525-f1f002c8da1b",
    • Labels: [
      1. {
        • CreatedAt: "2024-05-18T13:24:02.657872423-04:00",
        • ID: "e55530df-8aae-4b35-b850-15316790f899",
        • IsActive: true,
        • IsArchived: false,
        • Title: "A very cool label",
        • UpdatedAt: "2024-05-18T13:24:02.657872495-04:00"
        }
      ],
    • Owner: "bob@performline.com",
    • Queue: "Basic Queue",
    • State: "In Progress",
    • Title: "Merlin Case",
    • UpdatedAt: "2024-05-18T10:04:02.657872267-04:00"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    String
  • CaseNumber

    Case Number.

    String
  • BrandID String
  • Title

    Case title.

    String
  • Description

    Case Description.

    String
  • Queue

    Case Queue.

    String
  • State

    Case State.

    String
  • Owner

    Case Owner.

    String
  • Comments Other
  • DocumentIds Other
  • UpdatedAt

    Case update date/time.

    Time
  • CreatedAt

    Case create date/time.

    Time
  • Labels Other

GET /web/pages/:id/workflow/ Retrieves details on a specific web page's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /web/pages/:id/content/ Retrieves specific web page's source code.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • ID: 123456789,
    • ScorableContent: "<html><div>Hello, welcome to our web page!</div></html>"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for the requested Page.

    Integer
  • ScorableContent

    The raw content that gets scored.

    String

GET /web/pages/:page_id/violations/ Retrieves violation details on a specific page.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987654,
      • Occurrences: 4,
      • PageID: 7392,
      • PageType: "web",
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!"
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987655,
      • Occurrences: 2,
      • PageID: 7392,
      • PageType: "web",
      • RuleID: 457,
      • RuleName: "Things to say",
      • RuleType: "RequiredTermRule",
      • TermID: 1235,
      • TermName: "Definitely say this!"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for this violation.

    Integer
  • TermID

    ID of the Term within this violation.

    Integer
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • PageID

    ID of the page associated with this violation.

    Integer
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Integer
  • Participant

    If rule is set up for stereo calls, can be Agent or Caller.

    String
  • BrandID

    ID of the brand associated with this violation.

    String
  • CompanyID

    ID of the company associated with this violation.

    String
  • timestamps

    Timestamps for occurrences of this violation, in seconds (Call center only).

    Other

GET /callcenter/calls/ Retrieves a list of transcribed and scored calls within PerformLine's Call Center product.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Agent: "T111",
      • BrandId: 11,
      • CallId: "54312",
      • CallLength: "451",
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • FileLocation: "/ftp/new_call_file.wav",
      • Id: 775000,
      • InquiryId: "7844",
      • LastScoredAt: "2024-05-18T13:04:02.658024262-04:00",
      • RecordedOn: "05/27/2019 14:41:46",
      • RemediationStatus: "",
      • Score: 75,
      • Tags: [
        1. "RP"
        ],
      • TrafficSourceId: 1,
      • Type: "callcenter"
      },
    2. {
      • Agent: "T111",
      • BrandId: 12,
      • CallId: "54312",
      • CallLength: "451",
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • FileLocation: "/ftp/new_call_file.wav",
      • Id: 775030,
      • InquiryId: "7844",
      • LastScoredAt: "2024-05-18T11:47:02.658026511-04:00",
      • RecordedOn: "05/27/2019 14:41:46",
      • RemediationStatus: "",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "callcenter"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String
  • CallId

    The original call ID.

    String
  • InquiryId

    The ID of the inquiry.

    String
  • RecordedOn

    The date/time that the call was recorded.

    String
  • FileLocation

    Original call file location.

    String

GET /callcenter/calls/:id/ Retrieves details on a specific transcribed and scored call.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 11,
    • CallId: "54312",
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • FileLocation: "/ftp/new_call_file.wav",
    • Id: 775000,
    • InquiryId: "7844",
    • LastScoredAt: "2024-05-18T13:04:02.658096837-04:00",
    • RecordedOn: "05/27/2019 14:41:46",
    • RemediationStatus: "",
    • Score: 75,
    • Tags: null,
    • TrafficSourceId: 1,
    • Type: "callcenter"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IsReviewed

    Whether or not an asset has been reviewed.

    Boolean
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String
  • CallId

    The original call ID.

    String
  • InquiryId

    The ID of the inquiry.

    String
  • RecordedOn

    The date/time that the call was recorded.

    String
  • FileLocation

    Original call file location.

    String

GET /callcenter/calls/:id/workflow/ Retrieves details on a specific call's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /callcenter/calls/:id/content/ Retrieves specific call's source code.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • ID: 123456789,
    • ScorableContent: "Hello this is the help desk! What can I help you with? ..."
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for the requested Page.

    Integer
  • ScorableContent

    The raw content that gets scored.

    String

GET /callcenter/calls/:page_id/violations/ Retrieves violation details on a specific call.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987654,
      • Occurrences: 4,
      • PageID: 7392,
      • PageType: "callcenter",
      • Participant: "agent",
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!",
      • timestamps: [
        1. 153,
        2. 982
        ]
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987655,
      • Occurrences: 2,
      • PageID: 7392,
      • PageType: "callcenter",
      • Participant: "caller",
      • RuleID: 457,
      • RuleName: "Things to say",
      • RuleType: "RequiredTermRule",
      • TermID: 1235,
      • TermName: "Definitely say this!",
      • timestamps: [
        1. 153,
        2. 982
        ]
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for this violation.

    Integer
  • TermID

    ID of the Term within this violation.

    Integer
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • PageID

    ID of the page associated with this violation.

    Integer
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Integer
  • Participant

    If rule is set up for stereo calls, can be Agent or Caller.

    String
  • BrandID

    ID of the brand associated with this violation.

    String
  • CompanyID

    ID of the company associated with this violation.

    String
  • timestamps

    Timestamps for occurrences of this violation, in seconds (Call center only).

    Other

GET /chatscout/chats/ Retrieves a list of scored chat transcript items within PerformLine's ChatScout product.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Agent: "Olivia R",
      • BrandId: 11,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Duration: "120",
      • Id: 796156,
      • LastScoredAt: "2024-05-18T13:04:02.658267092-04:00",
      • RemediationStatus: "",
      • Score: 75,
      • SessionId: "12345",
      • Tags: null,
      • TrafficSourceId: 1,
      • Type: "chat",
      • Visitor: "Joe Smith",
      • WordCount: "1324"
      },
    2. {
      • Agent: "Kyle S",
      • BrandId: 12,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Duration: "120",
      • Id: 552879,
      • LastScoredAt: "2024-05-18T11:47:02.658269219-04:00",
      • RemediationStatus: "",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "chat",
      • Visitor: "Joe Smith",
      • WordCount: "1324"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • SessionId

    The chat session ID.

    String
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The chat agent (if applicable).

    String
  • Visitor

    The chat visitor (if applicable).

    String
  • Duration

    The chat duration (if applicable).

    String
  • WordCount

    The chat word count (if applicable).

    String

GET /chatscout/chats/:id/ Retrieves details on a specific chat transcript item.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • Agent: "Kyle S",
    • BrandId: 11,
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • Duration: "120",
    • Id: 796156,
    • LastScoredAt: "2024-05-18T13:04:02.65835198-04:00",
    • RemediationStatus: "",
    • Score: 75,
    • SessionId: "12345",
    • Tags: null,
    • TrafficSourceId: 1,
    • Type: "chat",
    • Visitor: "Joe Smith",
    • WordCount: "1324"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • SessionId

    The chat session ID.

    String
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IsReviewed

    Whether or not an asset has been reviewed.

    Boolean
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The chat agent (if applicable).

    String
  • Visitor

    The chat visitor (if applicable).

    String
  • Duration

    The chat duration (if applicable).

    String
  • WordCount

    The chat word count (if applicable).

    String

GET /chatscout/chats/:id/workflow/ Retrieves details on a specific chat's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /chatscout/chats/:id/content/ Retrieves specific chat's source code.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • ID: 123456789,
    • ScorableContent: "John: Hello, how can I help you today?"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for the requested Page.

    Integer
  • ScorableContent

    The raw content that gets scored.

    String

GET /chatscout/chats/:page_id/violations/ Retrieves violation details on a specific chat.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987654,
      • Occurrences: 4,
      • PageID: 7392,
      • PageType: "chat",
      • Participant: "agent",
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!"
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987655,
      • Occurrences: 2,
      • PageID: 7392,
      • PageType: "chat",
      • Participant: "visitor",
      • RuleID: 456,
      • RuleName: "Things to say",
      • RuleType: "RequiredTermRule",
      • TermID: 1235,
      • TermName: "Definitely say this!"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for this violation.

    Integer
  • TermID

    ID of the Term within this violation.

    Integer
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • PageID

    ID of the page associated with this violation.

    Integer
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Integer
  • Participant

    If rule is set up for stereo calls, can be Agent or Caller.

    String
  • BrandID

    ID of the brand associated with this violation.

    String
  • CompanyID

    ID of the company associated with this violation.

    String
  • timestamps

    Timestamps for occurrences of this violation, in seconds (Call center only).

    Other

GET /email/messages/ Retrieves a list of scored email messages received by PerformLine's Email product.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • BrandId: 11,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • EmailRecipient: "joe@company.com",
      • EmailSender: "bob@company.com",
      • Id: 784234,
      • LastScoredAt: "2024-05-18T13:04:02.658514317-04:00",
      • RemediationStatus: "Escalated",
      • Score: 75,
      • Tags: null,
      • TrafficSourceId: 1,
      • Type: "email"
      },
    2. {
      • BrandId: 12,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • EmailRecipient: "joe@company.com",
      • EmailSender: "bob@company.com",
      • Id: 489512,
      • LastScoredAt: "2024-05-18T11:47:02.658516998-04:00",
      • RemediationStatus: "Not reviewed",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "email"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • EmailSender

    The email sender (if applicable).

    String
  • EmailRecipient

    The email recipient (if applicable).

    String

GET /email/messages/:id/ Retrieves details on a specific email message.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 11,
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • Id: 784234,
    • LastScoredAt: "2024-05-18T13:04:02.65857433-04:00",
    • RemediationStatus: "",
    • Score: 75,
    • Tags: null,
    • TrafficSourceId: 1,
    • Type: "email"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IsReviewed

    Whether or not an asset has been reviewed.

    Boolean
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • EmailSender

    The email sender (if applicable).

    String
  • EmailRecipient

    The email recipient (if applicable).

    String

GET /email/messages/:id/workflow/ Retrieves details on a specific email message's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /email/messages/:id/content/ Retrieves specific message's source code.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • ID: 123456789,
    • ScorableContent: "<html><head>IMPORTANT EMAIL</head></html>"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for the requested Page.

    Integer
  • ScorableContent

    The raw content that gets scored.

    String

GET /email/messages/:page_id/violations/ Retrieves violation details on a specific email.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987654,
      • Occurrences: 4,
      • PageID: 7392,
      • PageType: "email",
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!"
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987655,
      • Occurrences: 2,
      • PageID: 7392,
      • PageType: "email",
      • RuleID: 457,
      • RuleName: "Things to say",
      • RuleType: "RequiredTermRule",
      • TermID: 1235,
      • TermName: "Definitely say this!"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for this violation.

    Integer
  • TermID

    ID of the Term within this violation.

    Integer
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • PageID

    ID of the page associated with this violation.

    Integer
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Integer
  • Participant

    If rule is set up for stereo calls, can be Agent or Caller.

    String
  • BrandID

    ID of the brand associated with this violation.

    String
  • CompanyID

    ID of the company associated with this violation.

    String
  • timestamps

    Timestamps for occurrences of this violation, in seconds (Call center only).

    Other

GET /social/posts/ Retrieves a list of social posts that PerformLine scans and scores.

Query String Parameters

Parameter Description Example
brand Restrict results to the given Brand ID(s). ?brand=11,13
campaign Restrict results to the given Campaign ID(s). &campaign=3
created_to Restrict results to pages created till created_to date. &created_to=2018-01-31 or 30 days
created_from Restrict results to pages created after created_from date. &created_from=2018-01-01 or 60 days
scored_to Restrict results to pages scored till scored_to date. &scored_to=2018-01-31 or 30 days
scored_from Restrict results to pages scored after scored_from date. &scored_from=2018-01-01 or 60 days
max_score Restrict results to score less than max_score &max_score=80
min_score Restrict results to score greater than min_score &min_score=30
remediation_status Restrict results to the given Remediation Status(es). &remediation_status=In Progress
limit Limits the number of results per request. &limit=50
offset Offsets the results by the given number of records. &offset=25

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • BrandId: 11,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456789,
      • LastScoredAt: "2024-05-18T13:04:02.658724514-04:00",
      • RemediationStatus: "",
      • Score: 75,
      • Tags: null,
      • TrafficSourceId: 1,
      • Type: "social"
      },
    2. {
      • BrandId: 12,
      • CampaignId: 1,
      • CompanyId: 10,
      • CreatedAt: "2015-01-02T15:19:03.036446Z",
      • Id: 123456000,
      • LastScoredAt: "2024-05-18T11:47:02.658726494-04:00",
      • RemediationStatus: "",
      • Score: 100,
      • Tags: null,
      • TrafficSourceId: 2,
      • Type: "social"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /social/posts/:id/ Retrieves details on a specific social post.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • BrandId: 12,
    • CampaignId: 1,
    • CompanyId: 10,
    • CreatedAt: "2015-01-02T15:19:03.036446Z",
    • Id: 987654,
    • LastScoredAt: "2024-05-18T11:47:02.658778538-04:00",
    • RemediationStatus: "",
    • Score: 100,
    • Tags: null,
    • TrafficSourceId: 2,
    • Type: "social"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for this item.

    Integer
  • Type

    The product type this item belongs to.

    String
  • Score

    The score (out of 100) of the item.

    Integer
  • TrafficSourceId

    The Traffic Source the item belongs to.

    Integer
  • TrafficSourceName

    The name of the Traffic Source the item belongs to.

    String
  • CampaignId

    The Campaign the item belongs to.

    Integer
  • BrandId

    The Brand the item belongs to.

    Integer
  • CompanyId

    The Company the item belongs to.

    Integer
  • CreatedAt

    The time the item was first created in the system.

    Time
  • Url

    The URL of the item being monitored (if applicable).

    String
  • LastScoredAt

    The date/time the item was last scored.

    Time
  • IsReviewed

    Whether or not an asset has been reviewed.

    Boolean
  • RemediationStatus

    The current remediation status.

    String
  • Tags

    List of tags associated with this object.

    Other
  • Agent

    The call center rep id/agent (if applicable).

    String
  • CallLength

    The call length (if applicable).

    String

GET /social/posts/:id/workflow/ Retrieves details on a specific social post's workflows.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "Who allowed this to happen?",
      • Owner: "Joe Person",
      • Status: "Closed no action required.",
      • User: "joe@company.com"
      },
    2. {
      • Created: "2016-05-12T15:19:03.036446Z",
      • DueDate: "2016-05-15T15:19:03.036446Z",
      • Id: 123456789,
      • Note: "",
      • Owner: "Joe Person",
      • Status: "Not Reviewed.",
      • User: "karen@company.com"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • Id

    Unique identifier for the requested Page.

    Integer
  • Status

    Status of workflow.

    String
  • Owner

    Owner of workflow.

    String
  • DueDate

    Date workflow should be completed.

    Time
  • Note

    Note for workflow

    String
  • User

    User who created this workflow

    String
  • Created

    Date/time that this workflow was created

    Time

GET /social/posts/:id/content/ Retrieves specific social post's source code.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: {
    • ID: 123456789,
    • ScorableContent: "Wow, Company X is the greatest company ever! #CompanyBirthday"
    },
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for the requested Page.

    Integer
  • ScorableContent

    The raw content that gets scored.

    String

GET /social/posts/:page_id/violations/ Retrieves violation details on a specific post.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  • Results: [
    1. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987654,
      • Occurrences: 4,
      • PageID: 7392,
      • PageType: "web",
      • RuleID: 456,
      • RuleName: "Things to not say",
      • RuleType: "BannedTermRule",
      • TermID: 1234,
      • TermName: "Do not say this!"
      },
    2. {
      • Datetime: "2015-01-02T15:19:03.036446Z",
      • ID: 987655,
      • Occurrences: 2,
      • PageID: 7392,
      • PageType: "web",
      • RuleID: 457,
      • RuleName: "Things to say",
      • RuleType: "RequiredTermRule",
      • TermID: 1235,
      • TermName: "Definitely say this!"
      }
    ],
  • ServiceName: "",
  • Status: "success",
  • StatusCode: 200
}
Attributes
  • ID

    Unique identifier for this violation.

    Integer
  • TermID

    ID of the Term within this violation.

    Integer
  • TermName

    The Term's name.

    String
  • RuleID

    ID of Rule that the term is in.

    Integer
  • RuleName

    Name of Rule.

    String
  • RuleType

    Type of Rule (Required, Banned, etc).

    String
  • PageID

    ID of the page associated with this violation.

    Integer
  • Occurrences

    Number of occurrences.

    Integer
  • Datetime

    Datetime that this violation occurred.

    Time
  • Deduction

    If enabled within brand, the amount of points this violation deducted.

    Integer
  • Participant

    If rule is set up for stereo calls, can be Agent or Caller.

    String
  • BrandID

    ID of the brand associated with this violation.

    String
  • CompanyID

    ID of the company associated with this violation.

    String
  • timestamps

    Timestamps for occurrences of this violation, in seconds (Call center only).

    Other

Rules API

Endpoints for managing compliance rules. Rules define the terms and conditions used to score content across brands, campaigns, and channels.

All Rules API endpoints are prefixed with /api/v1/rules/company/{agency_id} where agency_id is your company ID.

Key Concepts

Rule types:

  • BannedTermRule — flags content containing listed terms.
  • RequiredTermRule — flags content missing listed terms.
  • ConditionalBannedTermRule — flags when trigger + tested term appear together.
  • ConditionalRequiredTermRule — flags when trigger appears but required tested term is missing.
  • KeywordTermRule / Spotlight — highlights for review without scoring.

Terms: testTerms are primary terms (all rule types) and have a termWeight of high, medium, or low. conditionalTerms are trigger terms (conditional types only) and have no weight. Both support alternativeTerms (synonyms).

Status: PUBLISHED (actively scoring) or UNPUBLISHED (saved but not scoring).

Weight: high, medium, low. Spotlight rules do not have weight.

Multi-brand rules: When a rule is applied to more than one brand, the system maintains a separate copy for each brand. These copies share the same terms and settings but each has its own rule ID. They are linked together as siblings under a shared multibrandRuleId, and each copy's siblingRuleIds lists the rule IDs of all other copies in the group.

All copies are kept in sync — updates to terms, settings, or scope on any sibling automatically propagate to the rest. You don't need to track which copy belongs to which brand. Where applicable, the API accepts any sibling's rule ID and automatically resolves to the correct one. The response includes the resolved ruleId so you can see which copy was used.

Note: Adding or removing brands from a rule's scope creates or deletes sibling copies. If a brand is removed, its copy's rule ID becomes invalid. Clients that store rule IDs should treat the ID returned by the list or detail endpoints as the current canonical reference.

API token restrictions: The following endpoints are not available when authenticating with a bearer token: POST /ai/suggest-terms, GET /rules/export, POST /rules/import/start.

Workflows

Creating a rule:

  1. GET /brands to discover brand IDs.
  2. Optionally GET /campaigns and GET /traffic-sources for scoping.
  3. POST /rules with the rule definition.
  4. Rule defaults to UNPUBLISHED. Use PATCH /rules/{id} to publish.

Updating terms:

  • Full replacement: PATCH /rules/{id} with testTerms/conditionalTerms — replaces entire list.
  • Merge (incremental): PATCH /rules/{id}/terms — only adds/updates terms in payload, leaves others alone.
  • Delete specific: DELETE /rules/{id}/terms — removes named terms.

Managing campaigns:

  • Full replacement: PATCH /rules/{id} with campaignIds.
  • Add one: POST /campaigns/{id}/rules.
  • Remove one: DELETE /campaigns/{id}/rules/{ruleId}.

GET /api/v1/rules/company/{agency_id}/brands List active brands grouped by channel type.

Use this to discover brand IDs before creating or scoping rules. Each brand belongs to exactly one channel type. Returns a map of channel names to brand lists.

Query String Parameters

Parameter Description Example
channels Comma-separated list of channel types to filter by. Options: web, call, message, email, social, document. ?channels=web,call

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "channels": {
      "web": [
        {
          "id": 101,
          "name": "Brand A - Web"
        }
      ],
      "call": [
        {
          "id": 102,
          "name": "Brand A - Call"
        }
      ]
    }
  }
}
Attributes
  • id

    Unique identifier for the brand.

    Integer
  • name

    The brand's display name.

    String

GET /api/v1/rules/company/{agency_id}/campaigns List campaigns grouped by brand.

Use this to discover campaign IDs for scoping rules. Results are grouped by brand, with each group containing the brand's active campaigns. Filter by specific brands using the brands query parameter, or omit it to return campaigns across all brands in the company.

Query String Parameters

Parameter Description Example
brands Comma-separated list of brand IDs to filter by. ?brands=101,102

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "campaigns": [
      {
        "brandId": 101,
        "brandName": "Brand A",
        "campaigns": [
          {
            "id": 5001,
            "name": "Q1 Campaign"
          }
        ]
      }
    ]
  }
}
Attributes
  • brandId

    The brand's unique identifier.

    Integer
  • brandName

    The brand's display name.

    String
  • campaigns

    Array of campaigns belonging to this brand.

    Array
  • id

    Unique identifier for the campaign.

    Integer
  • name

    The campaign's display name.

    String

GET /api/v1/rules/company/{agency_id}/campaigns/{campaign_id} Get a campaign's details and associated rule IDs.

Returns the campaign's name, status, brand, and a list of rule IDs currently associated with it. Only active rules with active associations are included in ruleIds. Use this to see which rules are applied to a specific campaign before adding or removing associations.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "id": 5001,
    "name": "Q1 Campaign",
    "status": "active",
    "brandId": 101,
    "companyId": 10,
    "ruleIds": [12345, 12346, 12347]
  }
}
Attributes
  • id

    Unique identifier for the campaign.

    Integer
  • name

    The campaign's display name.

    String
  • status

    The campaign's current status.

    String
  • brandId

    The brand this campaign belongs to.

    Integer
  • companyId

    The company this campaign belongs to.

    Integer
  • ruleIds

    Array of rule IDs associated with this campaign.

    Array

POST /api/v1/rules/company/{agency_id}/campaigns/{campaign_id}/rules Add a rule to a campaign.

Associates the given rule with the campaign. For multi-brand rules, you can pass any sibling rule ID — the API automatically resolves to the sibling that matches the campaign's brand.

Idempotent: Adding a rule that is already associated is a no-op. Previously removed associations are reactivated.

Constraints: The campaign must be active. The rule must not have applyToAllCampaigns enabled — those rules are managed via PATCH /rules/{id} instead. The rule must belong to the same brand as the campaign, or be a multi-brand rule with a sibling in that brand.

Request Body

JSON object containing the rule ID to associate with the campaign.

{
  "ruleId": 12345
}

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "campaignId": 5001,
    "ruleId": 12345,
    "status": "active"
  }
}
Attributes
  • campaignId

    The campaign ID.

    Integer
  • ruleId

    The rule ID that was added.

    Integer
  • status

    Status of the campaign-rule association.

    String

DELETE /api/v1/rules/company/{agency_id}/campaigns/{campaign_id}/rules/{rule_id} Remove a rule from a campaign.

Soft-deletes the association between the rule and the campaign. The rule itself is not affected. Like the add endpoint, accepts any sibling rule ID and resolves to the correct one for the campaign's brand.

Idempotent: Removing an association that doesn't exist (or was already removed) is a no-op.

Constraints: The campaign must be active. The rule must not have applyToAllCampaigns enabled.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "campaignId": 5001,
    "ruleId": 12345,
    "status": "active"
  }
}
Attributes
  • campaignId

    The campaign ID.

    Integer
  • ruleId

    The rule ID that was removed.

    Integer
  • status

    Status of the campaign-rule association.

    String

GET /api/v1/rules/company/{agency_id}/traffic-sources List traffic sources with cursor-based pagination.

Traffic sources represent the origins of web, call, and message content. Use their IDs with the excludedTrafficSourceIds field (when applyToAllTs is false) to specify which traffic sources to exclude from a rule's scope.

Uses cursor-based pagination. Pass the nextCursor value from the previous response to get the next page. When nextCursor is null, there are no more results.

Query String Parameters

Parameter Description Example
size Page size. Default 100, max 1000. ?size=50
cursor Opaque cursor from a previous page's nextCursor value. &cursor=abc123

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "trafficSources": [
      {
        "id": 1,
        "name": "Google Ads",
        "brandId": 101
      },
      {
        "id": 2,
        "name": "Facebook Ads",
        "brandId": 101
      }
    ],
    "nextCursor": "abc123"
  }
}
Attributes
  • id

    Unique identifier for the traffic source.

    Integer
  • name

    The traffic source's display name.

    String
  • brandId

    The brand this traffic source belongs to.

    Integer
  • nextCursor

    Opaque cursor for the next page. Null if no more results.

    String

GET /api/v1/rules/company/{agency_id}/rules List rules with filtering, sorting, and pagination.

Returns a paginated list of rule summaries. Each summary includes the rule's name, type, status, weight, brand and campaign counts, term names (without alternative terms), and audit timestamps. Use GET /rules/{id} for the full detail including alternative terms, proximity settings, and scope breakdown.

Pagination: The response includes a pageInfo object with totalCount, totalPages, currentPage, hasMore, and nextPage. The metadata field within pageInfo provides counts of published and unpublished rules matching the current filters.

Multi-brand: Rules that span multiple brands are deduplicated in the list — one entry per logical rule. Use siblingRuleIds to find the other copies if needed.

All filters are optional and can be combined.

Query String Parameters

Parameter Description Example
ruleType Comma-separated rule types. Options: BannedTermRule, RequiredTermRule, ConditionalBannedTermRule, ConditionalRequiredTermRule, KeywordTermRule. ?ruleType=BannedTermRule,RequiredTermRule
ruleStatus Filter by rule status: PUBLISHED or UNPUBLISHED. ?ruleStatus=PUBLISHED
createdAtAfter Return rules created on or after this date (YYYY-MM-DD). ?createdAtAfter=2025-01-01
createdAtBefore Return rules created on or before this date (YYYY-MM-DD). ?createdAtBefore=2025-12-31
lastUpdatedAfter Return rules last updated on or after this date (YYYY-MM-DD). ?lastUpdatedAfter=2025-06-01
lastUpdatedBefore Return rules last updated on or before this date (YYYY-MM-DD). ?lastUpdatedBefore=2025-06-30
nameContains Case-insensitive substring match on rule name. ?nameContains=hidden
channelTypes Comma-separated channel types to filter by. ?channelTypes=web,email
brands Comma-separated brand IDs to filter by. ?brands=101,102
campaigns Comma-separated campaign IDs to filter by. ?campaigns=5001,5002
trafficSources Comma-separated traffic source filters: all, custom, na. ?trafficSources=all
ruleWeight Comma-separated weights: low, medium, high. ?ruleWeight=high,medium
sortBy Sort keys, prefix with - for descending. Options: createdDate, ruleName, weight, lastUpdated, conditionalTermCount. ?sortBy=-lastUpdated
size Page size. Default 50, max 250. ?size=25
page Page number (1-based). ?page=2

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "pageInfo": {
    "hasMore": true,
    "nextPage": 2,
    "currentPage": 1,
    "size": 50,
    "totalPages": 2,
    "totalCount": 87,
    "metadata": {
      "published": 65,
      "unpublished": 22
    }
  },
  "results": [
    {
      "id": 12345,
      "name": "Hidden Fees Rule",
      "note": null,
      "type": "BannedTermRule",
      "weight": "high",
      "status": "PUBLISHED",
      "advertiserId": 101,
      "multibrandRuleId": null,
      "siblingRuleIds": [],
      "brandIdList": [101],
      "brandNames": ["Brand A - Web"],
      "channelTypes": ["web"],
      "testTermCount": 3,
      "conditionalTermCount": 0,
      "campaignCount": 2,
      "brandCount": 1,
      "trafficSources": "all",
      "dateAdded": "2025-03-15T10:30:00Z",
      "dateUpdated": "2025-04-01T14:22:00Z",
      "testTerms": [
        {
          "term": "hidden fees",
          "termWeight": "high"
        }
      ],
      "conditionalTerms": []
    }
  ]
}
Attributes
  • id

    Unique identifier for the rule.

    Integer
  • name

    The rule's display name.

    String
  • note

    Optional note or description. Nullable.

    String
  • type

    Rule type (e.g., BannedTermRule, RequiredTermRule).

    String
  • weight

    Rule weight: high, medium, or low.

    String
  • status

    PUBLISHED or UNPUBLISHED.

    String
  • advertiserId

    The brand (advertiser) ID this rule belongs to.

    Integer
  • multibrandRuleId

    Shared identifier linking sibling rules across brands. Nullable.

    String
  • siblingRuleIds

    IDs of sibling rules in other brands.

    Array
  • brandIdList

    Array of brand IDs this rule is applied to.

    Array
  • brandNames

    Display names of associated brands.

    Array
  • channelTypes

    Channel types this rule applies to.

    Array
  • testTermCount

    Number of test terms in this rule.

    Integer
  • conditionalTermCount

    Number of conditional (trigger) terms.

    Integer
  • campaignCount

    Number of campaigns this rule is applied to.

    Integer
  • brandCount

    Number of brands this rule is applied to.

    Integer
  • trafficSources

    Traffic source scope: "all", "custom", or "na".

    String
  • dateAdded

    When the rule was created. Nullable.

    Time
  • dateUpdated

    When the rule was last updated. Nullable.

    Time
  • testTerms

    Array of test term summaries.

    Array
  • conditionalTerms

    Array of conditional term summaries.

    Array

GET /api/v1/rules/company/{agency_id}/rules/{rule_id} Get the full detail of a single rule.

Returns everything about the rule: name, type, weight, status, all terms with their alternative terms, proximity settings, channel constraints, campaign scope, traffic source scope, and audit history (created by, last updated by, timestamps).

The ruleScope field provides a channel-by-brand-by-campaign breakdown showing exactly where the rule is applied.

For multi-brand rules, siblingRuleIds lists the IDs of all other copies in the group and multibrandRuleId is the shared group identifier.

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "id": 12345,
    "name": "Hidden Fees Rule",
    "note": "Flags references to hidden or concealed fees",
    "type": "BannedTermRule",
    "weight": "high",
    "status": "PUBLISHED",
    "advertiserId": 101,
    "multibrandRuleId": null,
    "siblingRuleIds": [],
    "brandIdList": [101],
    "channelTypes": ["web", "email"],
    "applyToAllTs": true,
    "excludedTrafficSourceIds": [],
    "campaignIds": [5001, 5002],
    "applyToAllCampaigns": false,
    "testTerms": [
      {
        "term": "hidden fees",
        "note": null,
        "termWeight": "high",
        "alternativeTerms": [
          {
            "term": "concealed charges",
            "note": null
          }
        ]
      }
    ],
    "conditionalTerms": [],
    "proximity": null,
    "channelConstraints": {},
    "ruleScope": {
      "brands": [
        {
          "id": 101,
          "name": "Brand A - Web"
        }
      ],
      "campaigns": [
        {
          "id": 5001,
          "name": "Q1 Campaign"
        }
      ]
    },
    "dateAdded": "2025-03-15T10:30:00Z",
    "dateUpdated": "2025-04-01T14:22:00Z",
    "createdBy": {
      "id": 42,
      "name": "Jane Smith"
    },
    "lastUpdatedBy": null
  }
}
Attributes
  • id

    Unique identifier for the rule.

    Integer
  • name

    The rule's display name.

    String
  • note

    Optional note or description. Nullable.

    String
  • type

    Rule type (e.g., BannedTermRule, RequiredTermRule).

    String
  • weight

    Rule weight: high, medium, or low. Nullable for Spotlight rules.

    String
  • status

    PUBLISHED or UNPUBLISHED.

    String
  • advertiserId

    The brand (advertiser) ID this rule belongs to.

    Integer
  • multibrandRuleId

    Shared identifier linking sibling rules across brands. Nullable.

    String
  • siblingRuleIds

    IDs of sibling rules in other brands.

    Array
  • brandIdList

    Array of brand IDs this rule is applied to.

    Array
  • channelTypes

    Channel types this rule applies to.

    Array
  • applyToAllTs

    Whether the rule applies to all traffic sources.

    Boolean
  • excludedTrafficSourceIds

    Traffic source IDs excluded from the rule when applyToAllTs is true.

    Array
  • campaignIds

    Campaign IDs this rule is associated with.

    Array
  • applyToAllCampaigns

    Whether the rule applies to all campaigns.

    Boolean
  • testTerms

    Array of test terms with alternativeTerms and notes.

    Array
  • conditionalTerms

    Array of conditional (trigger) terms.

    Array
  • proximity

    Proximity settings for term matching. Nullable.

    Object
  • channelConstraints

    Per-channel configuration overrides.

    Object
  • ruleScope

    Breakdown of brands and campaigns in scope.

    Object
  • dateAdded

    When the rule was created.

    Time
  • dateUpdated

    When the rule was last updated. Nullable.

    Time
  • createdBy

    User who created the rule. Nullable.

    Object
  • lastUpdatedBy

    User who last updated the rule. Nullable.

    Object

GET /api/v1/rules/company/{agency_id}/rules/{rule_id}/terms Get a rule's terms.

Returns the active test terms and conditional terms with their alternative terms. This is a lightweight alternative to GET /rules/{id} when you only need the terms.

  • testTerms — Present on all rule types. Each includes term, note, termWeight, and alternativeTerms.
  • conditionalTerms — Only present on Conditional Banned and Conditional Required rules. Each includes term, note, and alternativeTerms (no weight).

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "testTerms": [
      {
        "term": "hidden fees",
        "note": null,
        "termWeight": "high",
        "alternativeTerms": [
          {
            "term": "concealed charges",
            "note": null
          }
        ]
      }
    ],
    "conditionalTerms": []
  }
}
Attributes
  • testTerms

    Array of test terms with alternativeTerms, notes, and weights.

    Array
  • conditionalTerms

    Array of conditional (trigger) terms.

    Array
  • term

    The term text.

    String
  • note

    Optional note for the term. Nullable.

    String
  • termWeight

    Term weight: high, medium, or low. Only on testTerms.

    String
  • alternativeTerms

    Array of synonym terms.

    Array

POST /api/v1/rules/company/{agency_id}/rules Create a new rule.

Required fields:

  • name — Rule name (must be unique within the brand).
  • type — One of: BannedTermRule, RequiredTermRule, ConditionalBannedTermRule, ConditionalRequiredTermRule, KeywordTermRule.
  • weight"high", "medium", or "low". Required for all types except Spotlight, which must not include weight.
  • advertiserId — The primary brand ID for this rule.
  • brandIdList — List of brand IDs this rule should apply to. For single-brand rules, this is just [advertiserId]. For multi-brand rules, include all target brand IDs and the system creates linked sibling copies.

Optional fields:

  • status"PUBLISHED" or "UNPUBLISHED" (default: UNPUBLISHED).
  • testTerms — Initial test terms. Each term includes term (text), optionally note, termWeight (defaults to "medium"), and synonyms (list of alternative terms).
  • conditionalTerms — Initial conditional (trigger) terms. Same structure as test terms but without termWeight. Only valid on conditional rule types.
  • applyToAllCampaigns — If true, rule applies to all campaigns on the brand (default: false).
  • campaignIds — Specific campaigns to scope the rule to. Ignored if applyToAllCampaigns is true.
  • applyToAllTs — If true, rule applies to all traffic sources (default: true). Set to false to exclude specific traffic sources.
  • excludedTrafficSourceIds — Traffic sources to exclude. Only used when applyToAllTs is false.
  • proximity — Proximity check settings for conditional and scored terms.
  • channelConstraints — Channel-specific settings (case sensitivity, call/message constraints).

Note: On this endpoint, the key for alternative terms is synonyms. On the update and merge endpoints it is alternativeTerms.

Request Body

{
  "name": "Hidden Fees Rule",
  "type": "BannedTermRule",
  "weight": "high",
  "advertiserId": 101,
  "brandIdList": [101],
  "testTerms": [
    {
      "term": "hidden fees",
      "synonyms": [
        {
          "term": "concealed charges"
        }
      ]
    }
  ]
}

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "id": 12345,
    "name": "Hidden Fees Rule",
    "note": null,
    "type": "BannedTermRule",
    "weight": "high",
    "status": "UNPUBLISHED",
    "advertiserId": 101,
    "multibrandRuleId": null,
    "siblingRuleIds": [],
    "brandIdList": [101],
    "channelTypes": ["web", "email"],
    "applyToAllTs": true,
    "excludedTrafficSourceIds": [],
    "campaignIds": [],
    "applyToAllCampaigns": true,
    "testTerms": [
      {
        "term": "hidden fees",
        "note": null,
        "termWeight": "high",
        "alternativeTerms": [
          {
            "term": "concealed charges",
            "note": null
          }
        ]
      }
    ],
    "conditionalTerms": [],
    "proximity": null,
    "channelConstraints": {},
    "ruleScope": {
      "brands": [
        {
          "id": 101,
          "name": "Brand A - Web"
        }
      ],
      "campaigns": []
    },
    "dateAdded": "2025-04-28T09:15:00Z",
    "dateUpdated": null,
    "createdBy": {
      "id": 42,
      "name": "Jane Smith"
    },
    "lastUpdatedBy": null
  }
}
Attributes

Returns the full rule detail. See GET /rules/{rule_id} for attribute descriptions.

PATCH /api/v1/rules/company/{agency_id}/rules/{rule_id} Update a rule. Only include fields to change. Terms and campaigns use replacement semantics.

This is the full rule update endpoint — it can modify any aspect of a rule in a single call: name, weight, status, brands, terms, campaigns, proximity, channel constraints, and traffic sources. Only include fields you want to change.

Important: replacement semantics for terms and campaigns. When testTerms, conditionalTerms, or campaignIds are included in the payload, the provided list fully replaces the existing one. Terms or campaigns not in the payload are deactivated. If you only want to add or remove individual terms, use PATCH /rules/{id}/terms or DELETE /rules/{id}/terms instead. For individual campaign associations, use POST /campaigns/{id}/rules and DELETE /campaigns/{id}/rules/{ruleId}.

Updatable fields:

  • name — Rename the rule.
  • weight"high", "medium", "low". Cannot be set on Spotlight rules.
  • status"PUBLISHED" or "UNPUBLISHED".
  • note — Free-text note on the rule.
  • brandIdList — Change which brands the rule covers. Adding a brand creates a new sibling copy; removing a brand deletes its copy.
  • testTerms — Full replacement of test terms (with alternative terms).
  • conditionalTerms — Full replacement of conditional terms.
  • campaignIds — Full replacement of campaign associations.
  • applyToAllCampaigns — Toggle applying to all campaigns on the brand.
  • applyToAllTs — Toggle applying to all traffic sources.
  • excludedTrafficSourceIds — Traffic sources to exclude (only when applyToAllTs is false).
  • proximity — Proximity check settings.
  • channelConstraints — Channel-specific settings.

Multi-brand: Updates automatically propagate to all sibling copies in the group.

Request Body

{
  "status": "PUBLISHED",
  "weight": "medium",
  "note": "Updated via API"
}

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "id": 12345,
    "name": "Hidden Fees Rule",
    "note": "Updated via API",
    "type": "BannedTermRule",
    "weight": "medium",
    "status": "PUBLISHED",
    "advertiserId": 101,
    "multibrandRuleId": null,
    "siblingRuleIds": [],
    "brandIdList": [101],
    "channelTypes": ["web", "email"],
    "applyToAllTs": true,
    "excludedTrafficSourceIds": [],
    "campaignIds": [5001, 5002],
    "applyToAllCampaigns": false,
    "testTerms": [
      {
        "term": "hidden fees",
        "note": null,
        "termWeight": "high",
        "alternativeTerms": [
          {
            "term": "concealed charges",
            "note": null
          }
        ]
      }
    ],
    "conditionalTerms": [],
    "proximity": null,
    "channelConstraints": {},
    "ruleScope": {
      "brands": [
        {
          "id": 101,
          "name": "Brand A - Web"
        }
      ],
      "campaigns": [
        {
          "id": 5001,
          "name": "Q1 Campaign"
        },
        {
          "id": 5002,
          "name": "Q2 Campaign"
        }
      ]
    },
    "dateAdded": "2025-03-15T10:30:00Z",
    "dateUpdated": "2025-04-28T11:45:00Z",
    "createdBy": {
      "id": 42,
      "name": "Jane Smith"
    },
    "lastUpdatedBy": {
      "id": 42,
      "name": "Jane Smith"
    }
  }
}
Attributes

Returns the full rule detail. See GET /rules/{rule_id} for attribute descriptions.

PATCH /api/v1/rules/company/{agency_id}/rules/{rule_id}/terms Add or update terms (merge semantics). Terms not in payload are left alone.

Send only the terms you want to add or update — existing terms not in the payload are left untouched. This is the recommended endpoint for incremental term changes. For full term replacement, use PATCH /rules/{id} with testTerms/conditionalTerms instead.

How matching works: Terms are matched by their text content, not by ID. If a term with the same text already exists, its fields (note, weight) are updated. If no match is found, a new term is created.

Alternative terms: Within each term, alternativeTerms controls synonyms. Omitted/null leaves existing alternative terms as-is. Provided merges: matched by text, new ones added, existing ones updated.

Other behavior:

  • termWeight defaults to "medium" for new test terms if omitted. Ignored on conditional terms and Spotlight rules.
  • conditionalTerms returns 400 if the rule is not a conditional type.
  • Changes propagate to all sibling copies in a multi-brand group.

Request Body

{
  "testTerms": [
    {
      "term": "hidden fees",
      "note": "Updated",
      "termWeight": "high",
      "alternativeTerms": [
        {
          "term": "concealed charges"
        }
      ]
    }
  ]
}

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "testTerms": [
      {
        "term": "hidden fees",
        "note": "Updated",
        "termWeight": "high",
        "alternativeTerms": [
          {
            "term": "concealed charges",
            "note": null
          }
        ]
      },
      {
        "term": "undisclosed costs",
        "note": null,
        "termWeight": "medium",
        "alternativeTerms": []
      }
    ],
    "conditionalTerms": []
  }
}
Attributes

Returns the full terms list. See GET /rules/{rule_id}/terms for attribute descriptions.

DELETE /api/v1/rules/company/{agency_id}/rules/{rule_id}/terms Remove specific terms. Omitting alternativeTerms deletes the entire term; including alternativeTerms deletes only those synonyms.

Send the terms you want to delete. Each item specifies a term by its text and optionally which alternative terms to remove:

  • alternativeTerms omitted/null — Deletes the entire term and all its alternative terms.
  • alternativeTerms = ["word1", "word2"] — Only deletes those specific alternative terms. The parent term is kept.

Idempotent: Terms or alternative terms not found on the rule are silently ignored.

Other behavior:

  • Omit testTerms or conditionalTerms to skip that category entirely.
  • conditionalTerms returns 400 if the rule is not a conditional type.
  • Changes propagate to all sibling copies in a multi-brand group.

Request Body

{
  "testTerms": [
    {
      "term": "hidden fees"
    }
  ],
  "conditionalTerms": [
    {
      "term": "if applicable",
      "alternativeTerms": ["when relevant"]
    }
  ]
}

Responses

HTTP 200 (Content-Type: application/json)

Example Output
{
  "success": true,
  "results": {
    "testTerms": [
      {
        "term": "undisclosed costs",
        "note": null,
        "termWeight": "medium",
        "alternativeTerms": []
      }
    ],
    "conditionalTerms": [
      {
        "term": "if applicable",
        "note": null,
        "alternativeTerms": [
          {
            "term": "where applicable",
            "note": null
          }
        ]
      }
    ]
  }
}
Attributes

Returns the remaining terms. See GET /rules/{rule_id}/terms for attribute descriptions.

DELETE /api/v1/rules/company/{agency_id}/rules/{rule_id} Delete a rule.

Soft-deletes the rule along with all of its terms, alternative terms, and campaign associations. For multi-brand rules, all sibling copies are deleted together — you cannot delete a single brand's copy without removing the brand from the rule via PATCH /rules/{id} with an updated brandIdList.

Responses

HTTP 204 (No Content)

Example Output

No response body. A successful delete returns HTTP 204 with an empty body.

Attributes

No response body.