sendraven-ai · Schema

Segment

A saved filter over one audience, evaluated afresh each time it is counted, listed or sent. A contact matches when on the audience, not unsubscribed, and every rule set holds (AND). Suppressions are not consulted, only the unsubscribed flag. Every rule field is always present: a rule that is not set is null, or [] for the list rules, so a created segment and a fetched one have the same keys.

CompanyEmailArtificial IntelligenceInfrastructure

Properties

Name Type Description
id string Pass as segment_id when creating a campaign.
key string Unique in the workspace. Cannot be changed.
name string
audience_id string The audience the segment filters.
opened_within_days integernull
clicked_within_days integernull
exclude_unengaged_days integernull
engaged_within_days integernull
properties array Property filters; [] when none.
date_conditions array Relative-date rules; [] when none.
tags array Normalised; [] when none.
exclude_tags array Normalised; [] when none.
topic_key stringnull null when there is no topic rule.
created_at string
updated_at stringnull null until the first update.
View JSON Schema on GitHub

JSON Schema

sendraven-ai-segment-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendraven-ai/json-schema/sendraven-ai-segment-schema.json",
  "title": "Segment",
  "description": "A saved filter over one audience, evaluated afresh each time it is counted, listed or sent. A contact matches when on the audience, not unsubscribed, and every rule set holds (AND). Suppressions are not consulted, only the unsubscribed flag. Every rule field is always present: a rule that is not set is null, or [] for the list rules, so a created segment and a fetched one have the same keys.",
  "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/Segment",
  "type": "object",
  "required": [
    "id",
    "key",
    "name",
    "audience_id",
    "opened_within_days",
    "clicked_within_days",
    "exclude_unengaged_days",
    "engaged_within_days",
    "properties",
    "date_conditions",
    "tags",
    "exclude_tags",
    "topic_key",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Pass as segment_id when creating a campaign."
    },
    "key": {
      "type": "string",
      "description": "Unique in the workspace. Cannot be changed."
    },
    "name": {
      "type": "string"
    },
    "audience_id": {
      "type": "string",
      "format": "uuid",
      "description": "The audience the segment filters."
    },
    "opened_within_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "clicked_within_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "exclude_unengaged_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "engaged_within_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "properties": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "property",
          "operator",
          "value"
        ],
        "properties": {
          "property": {
            "type": "string"
          },
          "operator": {
            "type": "string",
            "enum": [
              "equals",
              "not_equals",
              "contains",
              "gt",
              "lt",
              "exists",
              "not_exists"
            ]
          },
          "value": {
            "description": "null for exists and not_exists.",
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Property filters; [] when none."
    },
    "date_conditions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SegmentDateCondition"
      },
      "description": "Relative-date rules; [] when none."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Normalised; [] when none."
    },
    "exclude_tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Normalised; [] when none."
    },
    "topic_key": {
      "type": [
        "string",
        "null"
      ],
      "description": "null when there is no topic rule."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "null until the first update."
    }
  },
  "$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
        }
      }
    }
  }
}

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.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sendraven-ai-segment"
All schemas
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.