{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/telnyx/main/json-schema/telnyx-phone-number-with-messaging-settings-schema.json", "title": "PhoneNumberWithMessagingSettings", "x-generated": "2026-10-08", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/telnyx-messaging-api-openapi.yml#/components/schemas/PhoneNumberWithMessagingSettings", "properties": { "country_code": { "description": "ISO 3166-1 alpha-2 country code.", "pattern": "^[A-Z]{2}$", "readOnly": true, "type": "string" }, "created_at": { "description": "ISO 8601 formatted date indicating when the resource was created.", "format": "date-time", "readOnly": true, "type": "string" }, "eligible_messaging_products": { "description": "The messaging products that this number can be registered to use", "items": { "type": "string" }, "readOnly": true, "type": "array" }, "features": { "properties": { "mms": { "$ref": "#/$defs/MessagingFeatureSet" }, "sms": { "$ref": "#/$defs/MessagingFeatureSet" } }, "readOnly": true, "type": "object" }, "health": { "$ref": "#/$defs/NumberHealthMetrics" }, "id": { "description": "Identifies the type of resource.", "readOnly": true, "type": "string" }, "messaging_product": { "description": "The messaging product that the number is registered to use", "type": "string" }, "messaging_profile_id": { "description": "Unique identifier for a messaging profile.", "type": [ "string", "null" ] }, "organization_id": { "description": "The organization that owns this phone number.", "type": "string" }, "phone_number": { "description": "+E.164 formatted phone number.", "readOnly": true, "type": "string", "x-format": "e164" }, "record_type": { "description": "Identifies the type of the resource.", "enum": [ "messaging_phone_number", "messaging_settings" ], "readOnly": true, "type": "string" }, "tags": { "description": "Tags associated with this phone number.", "items": { "type": "string" }, "type": "array" }, "traffic_type": { "description": "The messaging traffic or use case for which the number is currently configured.", "readOnly": true, "type": "string" }, "type": { "description": "The type of the phone number", "enum": [ "long-code", "toll-free", "short-code", "longcode", "tollfree", "shortcode" ], "readOnly": true, "type": "string" }, "updated_at": { "description": "ISO 8601 formatted date indicating when the resource was updated.", "format": "date-time", "readOnly": true, "type": "string" } }, "type": "object", "$defs": { "MessagingFeatureSet": { "description": "The set of features available for a specific messaging use case (SMS or MMS). Features\ncan vary depending on the characteristics the phone number, as well as its current\nproduct configuration.\n", "properties": { "domestic_two_way": { "description": "Send messages to and receive messages from numbers in the same country.", "type": "boolean" }, "international_inbound": { "description": "Receive messages from numbers in other countries.", "type": "boolean" }, "international_outbound": { "description": "Send messages to numbers in other countries.", "type": "boolean" } }, "required": [ "domestic_two_way", "international_inbound", "international_outbound" ], "type": [ "object", "null" ] }, "NumberHealthMetrics": { "description": "High level health metrics about the number and it's messaging sending patterns.\n", "properties": { "inbound_outbound_ratio": { "description": "The ratio of messages received to the number of messages sent.", "format": "float", "type": "number" }, "message_count": { "description": "The number of messages analyzed for the health metrics.", "type": "integer" }, "spam_ratio": { "description": "The ratio of messages blocked for spam to the number of messages attempted.", "format": "float", "type": "number" }, "success_ratio": { "description": "The ratio of messages sucessfully delivered to the number of messages attempted.", "format": "float", "type": "number" } }, "required": [ "message_count", "inbound_outbound_ratio", "success_ratio", "spam_ratio" ], "type": "object" } } }