create_segment
Create a saved audience segment by defining match logic and conditions on contact fields like email, name, or custom metadata. Unsubscribed and suppressed contacts are automatically excluded.
Instructions
Create a saved audience segment. definition is { match: "all"|"any", conditions: [{ field, op, value? }] } over email/firstName/lastName/createdAt/metadata. with ops eq/neq/contains/not_contains/exists/not_exists/gt/lt. Omit it to match every contact. Resolution is always live and always excludes unsubscribed/suppressed contacts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Segment name, e.g. "Pro-plan users". | |
| sender | No | Product/sender externalId sent as X-Drin-Sender. Required only for account-wide API keys; overrides the server's default sender. | |
| definition | No | The audience filter. Example: {"match":"all","conditions":[{"field":"metadata.plan","op":"eq","value":"pro"}]}. | |
| description | No |