{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/PostCampaignMessageResponse",
"title": "PostCampaignMessageResponse",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/CampaignMessageEnum"
},
"id": {
"description": "The message ID",
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"label": {
"description": "The label or name on the message",
"type": "string"
},
"channel": {
"description": "The channel the message is to be sent on",
"type": "string"
},
"content": {
"description": "Additional attributes relating to the content of the message",
"oneOf": [
{
"$ref": "#/components/schemas/EmailContentSubObject"
},
{
"$ref": "#/components/schemas/SMSContentSubObject"
}
]
},
"send_times": {
"description": "The list of appropriate Send Time Sub-objects associated with the message",
"type": "array",
"items": {
"$ref": "#/components/schemas/SendTimeSubObject"
},
"nullable": true
},
"render_options": {
"description": "Additional options for rendering the message",
"$ref": "#/components/schemas/RenderOptionsSubObject",
"nullable": true
},
"created_at": {
"description": "The datetime when the message was created",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00",
"nullable": true
},
"updated_at": {
"description": "The datetime when the message was last updated",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00",
"nullable": true
}
},
"required": [
"label",
"channel",
"content"
]
},
"relationships": {
"type": "object",
"properties": {
"campaign": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/CampaignEnum"
},
"id": {
"description": "The parent campaign id",
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
},
"template": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateEnum"
},
"id": {
"description": "The associated template id",
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
}
}
},
"links": {
"$ref": "#/components/schemas/ObjectLinks"
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"links": {
"$ref": "#/components/schemas/ObjectLinks"
}
},
"required": [
"data"
]
}