Skip to main content

Create Campaign Filter

POST 

https://sailpoint.api.identitynow.com/v2025/campaign-filters

Use this API to create a campaign filter based on filter details and criteria.

Request

Bodyrequired

    idstringrequired

    The unique ID of the campaign filter

    Example: 5ec18cef39020d6fd7a60ad3970aba61
    namestringrequired

    Campaign filter name.

    Example: Identity Attribute Campaign Filter
    descriptionstring

    Campaign filter description.

    Example: Campaign filter to certify data based on an identity attribute's specified property.
    ownerstringnullablerequired

    Owner of the filter. This field automatically populates at creation time with the current user.

    Example: SailPoint Support
    modestringrequired

    Mode/type of filter, either the INCLUSION or EXCLUSION type. The INCLUSION type includes the data in generated campaigns as per specified in the criteria, whereas the EXCLUSION type excludes the data in generated campaigns as per specified in criteria.

    Possible values: [INCLUSION, EXCLUSION]

    Example: INCLUSION
    criteriaList object[]

    List of criteria.

  • Array [
  • typestringrequired

    Type of the criteria in the filter. The COMPOSITE filter can contain multiple filters in an AND/OR relationship.

    Possible values: [COMPOSITE, ROLE, IDENTITY, IDENTITY_ATTRIBUTE, ENTITLEMENT, ACCESS_PROFILE, SOURCE, ACCOUNT, AGGREGATED_ENTITLEMENT, INVALID_CERTIFIABLE_ENTITY, INVALID_CERTIFIABLE_BUNDLE]

    Example: IDENTITY_ATTRIBUTE
    operationstringnullable

    Operation on a specific criteria

    Possible values: [EQUALS, NOT_EQUALS, CONTAINS, STARTS_WITH, ENDS_WITH, AND, OR, null]

    Example: EQUALS
    propertystringnullablerequired

    Specified key from the type of criteria.

    Example: displayName
    valuestringnullablerequired

    Value for the specified key from the type of criteria.

    Example: Allie
    negateResultboolean

    If true, the filter will negate the result of the criteria.

    Default value: false
    Example: false
    shortCircuitboolean

    If true, the filter will short circuit the evaluation of the criteria.

    Default value: false
    Example: false
    recordChildMatchesboolean

    If true, the filter will record child matches for the criteria.

    Default value: false
    Example: false
    idstringnullable

    The unique ID of the criteria.

    Example: 5ec18cef39020d6fd7a60ad3970aba61
    suppressMatchedItemsboolean

    If this value is true, then matched items will not only be excluded from the campaign, they will also not have archived certification items created. Such items will not appear in the exclusion report.

    Default value: false
    Example: false
    childrenobject[]

    List of child criteria.

  • ]
  • isSystemFilterbooleanrequired

    If true, the filter is created by the system. If false, the filter is created by a user.

    Default value: false
    Example: false

Responses

Created successfully.

Schema
    idstringrequired

    The unique ID of the campaign filter

    Example: 5ec18cef39020d6fd7a60ad3970aba61
    namestringrequired

    Campaign filter name.

    Example: Identity Attribute Campaign Filter
    descriptionstring

    Campaign filter description.

    Example: Campaign filter to certify data based on an identity attribute's specified property.
    ownerstringnullablerequired

    Owner of the filter. This field automatically populates at creation time with the current user.

    Example: SailPoint Support
    modestringrequired

    Mode/type of filter, either the INCLUSION or EXCLUSION type. The INCLUSION type includes the data in generated campaigns as per specified in the criteria, whereas the EXCLUSION type excludes the data in generated campaigns as per specified in criteria.

    Possible values: [INCLUSION, EXCLUSION]

    Example: INCLUSION
    criteriaList object[]

    List of criteria.

  • Array [
  • typestringrequired

    Type of the criteria in the filter. The COMPOSITE filter can contain multiple filters in an AND/OR relationship.

    Possible values: [COMPOSITE, ROLE, IDENTITY, IDENTITY_ATTRIBUTE, ENTITLEMENT, ACCESS_PROFILE, SOURCE, ACCOUNT, AGGREGATED_ENTITLEMENT, INVALID_CERTIFIABLE_ENTITY, INVALID_CERTIFIABLE_BUNDLE]

    Example: IDENTITY_ATTRIBUTE
    operationstringnullable

    Operation on a specific criteria

    Possible values: [EQUALS, NOT_EQUALS, CONTAINS, STARTS_WITH, ENDS_WITH, AND, OR, null]

    Example: EQUALS
    propertystringnullablerequired

    Specified key from the type of criteria.

    Example: displayName
    valuestringnullablerequired

    Value for the specified key from the type of criteria.

    Example: Allie
    negateResultboolean

    If true, the filter will negate the result of the criteria.

    Default value: false
    Example: false
    shortCircuitboolean

    If true, the filter will short circuit the evaluation of the criteria.

    Default value: false
    Example: false
    recordChildMatchesboolean

    If true, the filter will record child matches for the criteria.

    Default value: false
    Example: false
    idstringnullable

    The unique ID of the criteria.

    Example: 5ec18cef39020d6fd7a60ad3970aba61
    suppressMatchedItemsboolean

    If this value is true, then matched items will not only be excluded from the campaign, they will also not have archived certification items created. Such items will not appear in the exclusion report.

    Default value: false
    Example: false
    childrenobject[]

    List of child criteria.

  • ]
  • isSystemFilterbooleanrequired

    If true, the filter is created by the system. If false, the filter is created by a user.

    Default value: false
    Example: false

Authorization: oauth2

type: Personal Access Token
scopes: idn:campaign-filter:create

View SDK Reference

package main

import (
"context"
"fmt"
"os"
"encoding/json"
v2025 "github.com/sailpoint-oss/golang-sdk/v2/api_v2025"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
campaignfilterdetails := []byte(`{
"owner" : "SailPoint Support",
"mode" : "INCLUSION",
"isSystemFilter" : false,
"name" : "Identity Attribute Campaign Filter",
"description" : "Campaign filter to certify data based on an identity attribute's specified property.",
"id" : "5ec18cef39020d6fd7a60ad3970aba61",
"criteriaList" : [ {
"type" : "IDENTITY_ATTRIBUTE",
"property" : "displayName",
"value" : "support",
"operation" : "CONTAINS",
"negateResult" : false,
"shortCircuit" : false,
"recordChildMatches" : false,
"suppressMatchedItems" : false
} ]
}`) // CampaignFilterDetails |


var campaignFilterDetails v2025.CampaignFilterDetails
if err := json.Unmarshal(campaignfilterdetails, &campaignFilterDetails); err != nil {
fmt.Println("Error:", err)
return
}



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2025.CertificationCampaignFiltersAPI.CreateCampaignFilter(context.Background()).CampaignFilterDetails(campaignFilterDetails).Execute()
//resp, r, err := apiClient.V2025.CertificationCampaignFiltersAPI.CreateCampaignFilter(context.Background()).CampaignFilterDetails(campaignFilterDetails).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.CreateCampaignFilter``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCampaignFilter`: CampaignFilterDetails
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignFiltersAPI.CreateCampaignFilter`: %v\n", resp)
}
Request Collapse all
Base URL
https://sailpoint.api.identitynow.com/v2025
Auth
Body required
{
  "id": "5ec18cef39020d6fd7a60ad3970aba61",
  "name": "Identity Attribute Campaign Filter",
  "description": "Campaign filter to certify data based on an identity attribute's specified property.",
  "owner": "SailPoint Support",
  "mode": "INCLUSION",
  "criteriaList": [
    {
      "type": "IDENTITY_ATTRIBUTE",
      "property": "displayName",
      "value": "support",
      "operation": "CONTAINS",
      "negateResult": false,
      "shortCircuit": false,
      "recordChildMatches": false,
      "id": null,
      "suppressMatchedItems": false,
      "children": null
    }
  ],
  "isSystemFilter": false
}
ResponseClear

Click the Send API Request button above and see the response here!