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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "create_segment"
}
}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 |