SegmentUpdate
Every field optional; each one sent replaces the stored value whole. Clear a list rule with [], the topic rule with "", and an engagement window with null. key is not accepted: a body containing it is 422 invalid_request, because a segment's key cannot be changed.
Properties
| Name | Type | Description |
|---|---|---|
| audience_id | string | Move the segment to this audience. Campaigns already using the segment are not re-checked. Not in this workspace: 422 with the message starting "audience_id:". |
| name | string | Display name. Not unique. |
| opened_within_days | integernull | Only contacts whose last_opened_at is within this many days of evaluation. Someone who never opened does not match. null removes the rule. |
| clicked_within_days | integernull | Only contacts whose last_clicked_at is within this many days. Someone who never clicked does not match. null removes the rule. |
| exclude_unengaged_days | integernull | Leave out contacts who have been mailed (have last_sent_at) and neither opened nor clicked within this many days. Contacts never mailed, and contacts added within the window, are kept. null removes th |
| engaged_within_days | integernull | Only contacts who opened, clicked, or were active in your product (last_active_at) within this many days. Strict, unlike exclude_unengaged_days: a contact never mailed or just added does not match wit |
| properties | array | Property filters, all of which must hold (AND). |
| date_conditions | array | Rules on dates relative to the moment the segment is evaluated, all of which must hold (AND). [] clears them on update. |
| topic_key | string | Only contacts subscribed to this topic: their own preference, else the topic's default. Surrounding whitespace is trimmed. Must name a topic in this workspace (GET /v1/topics), or the save is 422 unkn |
| tags | array | Only contacts carrying all of these. Normalised on save: trimmed, lower-cased, whitespace runs become a hyphen, cut to 60 characters. |
| exclude_tags | array | Leave out contacts carrying any of these. An exclusion wins over an inclusion. Normalised like tags. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/sendraven-ai/json-schema/sendraven-ai-segment-update-schema.json",
"title": "SegmentUpdate",
"description": "Every field optional; each one sent replaces the stored value whole. Clear a list rule with [], the topic rule with \"\", and an engagement window with null. key is not accepted: a body containing it is 422 invalid_request, because a segment's key cannot be changed.",
"x-generated": "2026-11-10",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/sendraven-ai-segments-api-openapi.yml#/components/schemas/SegmentUpdate",
"type": "object",
"properties": {
"audience_id": {
"type": "string",
"description": "Move the segment to this audience. Campaigns already using the segment are not re-checked. Not in this workspace: 422 with the message starting \"audience_id:\"."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Display name. Not unique."
},
"opened_within_days": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 3650,
"description": "Only contacts whose last_opened_at is within this many days of evaluation. Someone who never opened does not match. null removes the rule."
},
"clicked_within_days": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 3650,
"description": "Only contacts whose last_clicked_at is within this many days. Someone who never clicked does not match. null removes the rule."
},
"exclude_unengaged_days": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 3650,
"description": "Leave out contacts who have been mailed (have last_sent_at) and neither opened nor clicked within this many days. Contacts never mailed, and contacts added within the window, are kept. null removes the rule."
},
"engaged_within_days": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 3650,
"description": "Only contacts who opened, clicked, or were active in your product (last_active_at) within this many days. Strict, unlike exclude_unengaged_days: a contact never mailed or just added does not match without one of the three. Use it to restart sending to a list that has not been mailed well, such as a fresh import. null removes the rule."
},
"properties": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "#/$defs/SegmentPropertyFilter"
},
"description": "Property filters, all of which must hold (AND)."
},
"date_conditions": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "#/$defs/SegmentDateCondition"
},
"description": "Rules on dates relative to the moment the segment is evaluated, all of which must hold (AND). [] clears them on update."
},
"topic_key": {
"type": "string",
"description": "Only contacts subscribed to this topic: their own preference, else the topic's default. Surrounding whitespace is trimmed. Must name a topic in this workspace (GET /v1/topics), or the save is 422 unknown_topic. An empty string means no topic rule and is not checked."
},
"tags": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1
},
"description": "Only contacts carrying all of these. Normalised on save: trimmed, lower-cased, whitespace runs become a hyphen, cut to 60 characters."
},
"exclude_tags": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"minLength": 1
},
"description": "Leave out contacts carrying any of these. An exclusion wins over an inclusion. Normalised like tags."
}
},
"$defs": {
"SegmentDateCondition": {
"type": "object",
"description": "A date compared with now, in UTC, each time the segment is counted, listed or sent. A contact with no value for the field never matches, under any op: someone who never opened has not opened more than 30 days ago. A campaign's audience is fixed when it starts, so a send that resumes later does not re-evaluate it.",
"required": [
"field",
"op",
"days"
],
"properties": {
"field": {
"type": "string",
"pattern": "^(created_at|last_opened_at|last_clicked_at|last_active_at|attributes\\.(?!\\$)[^.\\u0000]+)$",
"description": "created_at (when the contact was added to the workspace), last_opened_at, last_clicked_at, last_active_at, or attributes.<key> for a date-valued attribute such as attributes.trial_ends_at. An attribute is read as an ISO 8601 string (\"2026-11-04\" is midnight UTC; an offset such as +02:00 is honoured) or a stored date. A value that does not parse as a date, a number or a boolean does not match. Anything else is 422 invalid_request."
},
"op": {
"type": "string",
"enum": [
"older_than_days",
"within_last_days",
"within_next_days",
"after_next_days"
],
"description": "older_than_days: before now minus days (more than N days ago). within_last_days: from now minus days up to now. within_next_days: from now up to now plus days. after_next_days: after now plus days (more than N days from now)."
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 3650
}
}
},
"SegmentPropertyFilter": {
"type": "object",
"description": "One test on a value in a contact's attributes.",
"required": [
"property",
"operator"
],
"properties": {
"property": {
"type": "string",
"minLength": 1,
"pattern": "^(?!\\$)[^.\\u0000]+$",
"description": "The attribute key. Need not be a declared property, and is not checked against what exists: a typo matches nobody (or everybody, under not_equals and not_exists). Cannot be empty, contain \".\" or start with \"$\"."
},
"operator": {
"type": "string",
"enum": [
"equals",
"not_equals",
"contains",
"gt",
"lt",
"exists",
"not_exists"
],
"description": "equals: exactly value, type-sensitive (42 is not \"42\"). not_equals: anything else, including no attribute. contains: a string value containing value as literal text, ignoring case. gt/lt: only values of the same kind; strings compare as text, so \"9\" > \"42\". exists: present and not null. not_exists: missing or null."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "What to compare against. Leave out only for exists and not_exists; left out elsewhere it compares against null (equals then matches contacts without the attribute, gt and lt match nobody)."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/sendraven-ai-segment-update"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.