SendGrid · Schema
Create a Segment request
EmailEmail APIMarketing EmailSMTPT1Transactional EmailEmail MarketingDeliverabilityMarketing
Properties
| Name | Type | Description |
|---|---|---|
| name | string | The name of this segment. |
| list_id | integer | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |
| conditions | array | The conditions for a recipient to be included in this segment. |
| recipient_count | number | The count of recipients in this list. This is not included on creation of segments. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/sendgrid/main/json-schema/sendgrid-contactdb-segments-schema.json",
"title": "Create a Segment request",
"x-generated": "2026-10-12",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/sendgrid-segments-api-openapi.yml#/components/schemas/ContactdbSegments",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of this segment."
},
"list_id": {
"type": "integer",
"description": "The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list."
},
"conditions": {
"type": "array",
"description": "The conditions for a recipient to be included in this segment.",
"items": {
"$ref": "#/$defs/ContactdbSegmentsConditions"
}
},
"recipient_count": {
"type": "number",
"description": "The count of recipients in this list. This is not included on creation of segments."
}
},
"required": [
"name",
"conditions"
],
"$defs": {
"AndOr": {
"type": "string",
"enum": [
"and",
"or",
""
]
},
"ContactdbSegmentsConditions": {
"title": "ContactDB: Segments: Conditions",
"type": "object",
"properties": {
"field": {
"type": "string"
},
"value": {
"type": "string"
},
"operator": {
"type": "string",
"$ref": "#/$defs/Operator"
},
"and_or": {
"type": "string",
"$ref": "#/$defs/AndOr"
}
},
"required": [
"field",
"value",
"operator"
]
},
"Operator": {
"type": "string",
"enum": [
"eq",
"ne",
"lt",
"gt",
"contains"
]
}
}
}
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
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sendgrid-contactdb-segments"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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.