---
updatedAt: 2025-09-17T22:56:05.000Z
agentTools:
  projectIndex: https://developer.maximizer.com/llms.txt
---

# Create a subscription

Combination of TargetId + Entity + Op must be unique.

Filter operators:

Operators applied to field values
Supported field types: string, bool, int, float

Syntax: "field-name": { "operator": "field-value" }

    $EQ    => equal
    $NE    => not equal
    $GT    => greater than
    $GE    => greater than or equal
    $LT    => lower than
    $LE    => lower than or equal
    $IN    => in (list of values)
    $NIN   => not in (list of values)
    $LIKE  => like (with % as the only possible wildcard)
    $NLIKE => not like (with % as the only possible wildcard)

Operators applied to field names

Syntax: "operator": "field-name"

    $EXISTS  => field exists in either Original or New data sections
    $NEXISTS => field does not exist in both Original and New data sections

Note about User Defined Fields (UDFs):

In the Maximizer CRM, UDFs can be referred to by using three different notations:

    Udf/$TYPEID(xx) => xx represents an unique integer identifier of the Udf field
    Udf/$NAME(nn)   => nn represents the name of the Udf field
    Udf/$TAG(tt)    => tt represents the tag of the Udf field (for internal use only)
    
As for events, the UDFs are always generated with the default Udf/$TYPEID notation.

This means we cannot use the other notations to create filters for events containing
UDFs, as they won't be represented that way in the event and there will be no match.

If you want to create a filter for a UDF, you must use the Udf/$TYPEID notation.
To find out the actual TypeId for the UDF you want to filter, you can use Octopus API
to read the object definition using the Metadata/Schema search. Please refer to the
Developer Portal for more details on how to use the Octopus API for this purpose.

# OpenAPI definition

```json
{
  "openapi": "3.0.4",
  "info": {
    "title": "Webhooks API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.maximizer.com/webhooks"
    }
  ],
  "paths": {
    "/v1/subscriptions": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Create a subscription",
        "description": "Combination of TargetId + Entity + Op must be unique.\n\nFilter operators:\n\nOperators applied to field values\nSupported field types: string, bool, int, float\n\nSyntax: \"field-name\": { \"operator\": \"field-value\" }\n\n    $EQ    => equal\n    $NE    => not equal\n    $GT    => greater than\n    $GE    => greater than or equal\n    $LT    => lower than\n    $LE    => lower than or equal\n    $IN    => in (list of values)\n    $NIN   => not in (list of values)\n    $LIKE  => like (with % as the only possible wildcard)\n    $NLIKE => not like (with % as the only possible wildcard)\n\nOperators applied to field names\n\nSyntax: \"operator\": \"field-name\"\n\n    $EXISTS  => field exists in either Original or New data sections\n    $NEXISTS => field does not exist in both Original and New data sections\n\nNote about User Defined Fields (UDFs):\n\nIn the Maximizer CRM, UDFs can be referred to by using three different notations:\n\n    Udf/$TYPEID(xx) => xx represents an unique integer identifier of the Udf field\n    Udf/$NAME(nn)   => nn represents the name of the Udf field\n    Udf/$TAG(tt)    => tt represents the tag of the Udf field (for internal use only)\n    \nAs for events, the UDFs are always generated with the default Udf/$TYPEID notation.\n\nThis means we cannot use the other notations to create filters for events containing\nUDFs, as they won't be represented that way in the event and there will be no match.\n\nIf you want to create a filter for a UDF, you must use the Udf/$TYPEID notation.\nTo find out the actual TypeId for the UDF you want to filter, you can use Octopus API\nto read the object definition using the Metadata/Schema search. Please refer to the\nDeveloper Portal for more details on how to use the Octopus API for this purpose.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequestDto"
              },
              "examples": {
                "Syntax Example": {
                  "value": {
                    "Entity": "AbEntry, Opportunity, etc",
                    "Op": "Create, Update, Delete, etc",
                    "TargetId": "12345678-1234-1234-1234-123456789012",
                    "Recipients": [
                      "Recipient1@acme.com",
                      "Recipient2@acme.com"
                    ],
                    "Filter": [
                      "{ \"Key\" : { \"$EQ\": \"key-value\" } }",
                      "{ \"Rows\" : { \"$GT\": 500 } }",
                      "{ \"$HASFIELD\": \"field-name\" }"
                    ]
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequestDto"
              },
              "examples": {
                "Syntax Example": {
                  "value": {
                    "Entity": "AbEntry, Opportunity, etc",
                    "Op": "Create, Update, Delete, etc",
                    "TargetId": "12345678-1234-1234-1234-123456789012",
                    "Recipients": [
                      "Recipient1@acme.com",
                      "Recipient2@acme.com"
                    ],
                    "Filter": [
                      "{ \"Key\" : { \"$EQ\": \"key-value\" } }",
                      "{ \"Rows\" : { \"$GT\": 500 } }",
                      "{ \"$HASFIELD\": \"field-name\" }"
                    ]
                  }
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequestDto"
              },
              "examples": {
                "Syntax Example": {
                  "value": {
                    "Entity": "AbEntry, Opportunity, etc",
                    "Op": "Create, Update, Delete, etc",
                    "TargetId": "12345678-1234-1234-1234-123456789012",
                    "Recipients": [
                      "Recipient1@acme.com",
                      "Recipient2@acme.com"
                    ],
                    "Filter": [
                      "{ \"Key\" : { \"$EQ\": \"key-value\" } }",
                      "{ \"Rows\" : { \"$GT\": 500 } }",
                      "{ \"$HASFIELD\": \"field-name\" }"
                    ]
                  }
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequestDto"
              },
              "examples": {
                "Syntax Example": {
                  "value": {
                    "Entity": "AbEntry, Opportunity, etc",
                    "Op": "Create, Update, Delete, etc",
                    "TargetId": "12345678-1234-1234-1234-123456789012",
                    "Recipients": [
                      "Recipient1@acme.com",
                      "Recipient2@acme.com"
                    ],
                    "Filter": [
                      "{ \"Key\" : { \"$EQ\": \"key-value\" } }",
                      "{ \"Rows\" : { \"$GT\": 500 } }",
                      "{ \"$HASFIELD\": \"field-name\" }"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponseDtoSingleEntryResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Detail": {
            "type": "string",
            "nullable": true
          },
          "Instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SubscriptionRequestDto": {
        "type": "object",
        "properties": {
          "Entity": {
            "type": "string",
            "nullable": true
          },
          "Op": {
            "type": "string",
            "nullable": true
          },
          "TargetId": {
            "type": "string",
            "format": "uuid"
          },
          "Recipients": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Filter": {
            "type": "array",
            "items": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubscriptionResponseDto": {
        "type": "object",
        "properties": {
          "SubscriptionId": {
            "type": "string",
            "format": "uuid"
          },
          "Entity": {
            "type": "string",
            "nullable": true
          },
          "Op": {
            "type": "string",
            "nullable": true
          },
          "TargetId": {
            "type": "string",
            "format": "uuid"
          },
          "Recipients": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Filter": {
            "type": "array",
            "items": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SubscriptionResponseDtoSingleEntryItemResponseDto": {
        "type": "object",
        "properties": {
          "Item": {
            "$ref": "#/components/schemas/SubscriptionResponseDto"
          }
        },
        "additionalProperties": false
      },
      "SubscriptionResponseDtoSingleEntryResponseDto": {
        "type": "object",
        "properties": {
          "Data": {
            "$ref": "#/components/schemas/SubscriptionResponseDtoSingleEntryItemResponseDto"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Authorization header",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}
```