{
    "openapi": "3.0.0",
    "servers": [
        {
            "url": "https://api.contiguity.com/conversations"
        }
    ],
    "info": {
        "version": "v2026.3.3",
        "title": "Conversations API"
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {},
        "parameters": {}
    },
    "paths": {
        "/history/message/{id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "schema": {
                            "type": "string",
                            "description": "Message ID",
                            "example": "text_u98sZQCVsLvgBq80"
                        },
                        "required": true,
                        "description": "Message ID",
                        "name": "id",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get any message by its ID",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "req_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "response"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "Message ID",
                                                    "example": "text_u98sZQCVsLvgBq80"
                                                },
                                                "to": {
                                                    "type": "string",
                                                    "description": "Recipient phone number (E.164).",
                                                    "example": "+1234567890"
                                                },
                                                "from": {
                                                    "type": "string",
                                                    "description": "Sender phone number (E.164).",
                                                    "example": "+15555555555"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "description": "Message content",
                                                    "example": "Hello, world!"
                                                },
                                                "timestamp": {
                                                    "type": "number",
                                                    "description": "Unix ms when sent or received.",
                                                    "example": 1757550304652
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "description": "Status",
                                                    "example": "delivered"
                                                },
                                                "attachments": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "description": "URLs of attachments",
                                                    "example": []
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "to",
                                                "from",
                                                "message",
                                                "timestamp",
                                                "status",
                                                "attachments"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Bad Request"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 400
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Unauthorized"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 401
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Forbidden"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 403
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Internal Server Error"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 500
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/history/imessage/{to}/{from}/{limit}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "schema": {
                            "type": "string",
                            "description": "Recipient's iMessage address. Must be in E.164 format.",
                            "example": "+1234567890"
                        },
                        "required": true,
                        "description": "Recipient's iMessage address. Must be in E.164 format.",
                        "name": "to",
                        "in": "path"
                    },
                    {
                        "schema": {
                            "type": "string",
                            "description": "Leased iMessage number that has been used to send messages to the recipient. Must be in E.164 format.",
                            "example": "+15555555555"
                        },
                        "required": true,
                        "description": "Leased iMessage number that has been used to send messages to the recipient. Must be in E.164 format.",
                        "name": "from",
                        "in": "path"
                    },
                    {
                        "schema": {
                            "type": "string",
                            "default": 20,
                            "description": "Limit of how many messages to return, default is 20. Should never exceed 200.",
                            "example": 20
                        },
                        "required": false,
                        "description": "Limit of how many messages to return, default is 20. Should never exceed 200.",
                        "name": "limit",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get iMessage conversation history for a thread",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "req_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "response"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "conversation": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "to": {
                                                                "type": "string",
                                                                "description": "Recipient's iMessage address. Must be in E.164 format.",
                                                                "example": "+1234567890"
                                                            },
                                                            "from": {
                                                                "type": "string",
                                                                "description": "Leased iMessage number that has been used to send messages to the recipient. Must be in E.164 format.",
                                                                "example": "+15555555555"
                                                            },
                                                            "message": {
                                                                "type": "string",
                                                                "description": "Message content.",
                                                                "example": "Hello, world!"
                                                            },
                                                            "timestamp": {
                                                                "type": "number",
                                                                "description": "Timestamp (when the message was sent).",
                                                                "example": 1757550304652
                                                            },
                                                            "read": {
                                                                "type": "number",
                                                                "description": "Timestamp (when the message was read).",
                                                                "example": 1757550304652
                                                            },
                                                            "delivery": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "status": {
                                                                        "type": "string",
                                                                        "description": "Status of the delivery (delivered, failed, delayed).",
                                                                        "example": "delivered"
                                                                    },
                                                                    "delayed": {
                                                                        "type": "boolean",
                                                                        "description": "Whether the message was delayed.",
                                                                        "example": false
                                                                    },
                                                                    "timestamp": {
                                                                        "type": "number",
                                                                        "description": "Timestamp (when the message was delivered).",
                                                                        "example": 1757550304652
                                                                    }
                                                                },
                                                                "required": [
                                                                    "status",
                                                                    "delayed",
                                                                    "timestamp"
                                                                ]
                                                            },
                                                            "risk": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "auto_reported_as_spam": {
                                                                        "type": "boolean",
                                                                        "description": "Whether the message was automatically labeled as spam by Apple.",
                                                                        "example": true
                                                                    },
                                                                    "marked_as_spam": {
                                                                        "type": "boolean",
                                                                        "description": "Whether the message was marked as spam by the user.",
                                                                        "example": false
                                                                    }
                                                                },
                                                                "required": [
                                                                    "auto_reported_as_spam",
                                                                    "marked_as_spam"
                                                                ]
                                                            },
                                                            "attachments": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "description": "URLs of the attachments.",
                                                                "example": []
                                                            }
                                                        },
                                                        "required": [
                                                            "to",
                                                            "from",
                                                            "message",
                                                            "timestamp",
                                                            "read",
                                                            "delivery",
                                                            "risk",
                                                            "attachments"
                                                        ]
                                                    }
                                                },
                                                "reactions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "reaction": {
                                                                "type": "string",
                                                                "description": "Reaction emoji.",
                                                                "example": "love"
                                                            },
                                                            "on": {
                                                                "type": "string",
                                                                "description": "Message content.",
                                                                "example": "Hello, world!"
                                                            },
                                                            "timestamp": {
                                                                "type": "number",
                                                                "description": "Timestamp of the reaction.",
                                                                "example": 1757550304652
                                                            },
                                                            "action": {
                                                                "type": "string",
                                                                "description": "Action of the reaction.",
                                                                "example": "added"
                                                            },
                                                            "from": {
                                                                "type": "string",
                                                                "description": "Leased iMessage number that has been used to send the reaction. Must be in E.164 format.",
                                                                "example": "+15555555555"
                                                            }
                                                        },
                                                        "required": [
                                                            "reaction",
                                                            "on",
                                                            "timestamp",
                                                            "action",
                                                            "from"
                                                        ]
                                                    }
                                                },
                                                "chat": {
                                                    "type": "object",
                                                    "properties": {
                                                        "filtered": {
                                                            "type": "boolean",
                                                            "description": "Whether the conversation was filtered by Apple.",
                                                            "example": false
                                                        },
                                                        "chat_marked_as_spam": {
                                                            "type": "boolean",
                                                            "description": "Whether the chat was automatically labeled as spam by Apple.",
                                                            "example": false
                                                        },
                                                        "limit": {
                                                            "type": "number",
                                                            "description": "Message return limit.",
                                                            "example": 20
                                                        },
                                                        "total": {
                                                            "type": "number",
                                                            "description": "Total number of messages in the conversation.",
                                                            "example": 382
                                                        },
                                                        "count": {
                                                            "type": "number",
                                                            "description": "Number of messages returned.",
                                                            "example": 20
                                                        }
                                                    },
                                                    "required": [
                                                        "filtered",
                                                        "chat_marked_as_spam",
                                                        "limit",
                                                        "total",
                                                        "count"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "conversation",
                                                "reactions",
                                                "chat"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Bad Request"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 400
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Unauthorized"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 401
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Forbidden"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 403
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Internal Server Error"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 500
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/history/text/{to}/{from}/{limit}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "schema": {
                            "type": "string",
                            "description": "Other party's phone number. Must be in E.164 format.",
                            "example": "+1234567890"
                        },
                        "required": true,
                        "description": "Other party's phone number. Must be in E.164 format.",
                        "name": "to",
                        "in": "path"
                    },
                    {
                        "schema": {
                            "type": "string",
                            "description": "Your leased number used in this thread. Must be in E.164 format.",
                            "example": "+15555555555"
                        },
                        "required": true,
                        "description": "Your leased number used in this thread. Must be in E.164 format.",
                        "name": "from",
                        "in": "path"
                    },
                    {
                        "schema": {
                            "type": "string",
                            "default": 20,
                            "description": "Limit of how many messages to return, default is 20. Should never exceed 200.",
                            "example": 20
                        },
                        "required": false,
                        "description": "Limit of how many messages to return, default is 20. Should never exceed 200.",
                        "name": "limit",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Get SMS/MMS conversation history for a thread. Queries your sent messages and incoming webhook events only.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "req_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "response"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "conversation": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "to": {
                                                                "type": "string",
                                                                "description": "Recipient phone number (E.164).",
                                                                "example": "+1234567890"
                                                            },
                                                            "from": {
                                                                "type": "string",
                                                                "description": "Sender phone number (E.164).",
                                                                "example": "+15555555555"
                                                            },
                                                            "message": {
                                                                "type": "string",
                                                                "description": "Message content.",
                                                                "example": "Hello, world!"
                                                            },
                                                            "timestamp": {
                                                                "type": "number",
                                                                "description": "Timestamp when the message was sent or received (Unix ms).",
                                                                "example": 1757550304652
                                                            },
                                                            "delivery": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "status": {
                                                                        "type": "string",
                                                                        "description": "Delivery status (e.g. delivered, failed, delayed).",
                                                                        "example": "delivered"
                                                                    },
                                                                    "delayed": {
                                                                        "type": "boolean",
                                                                        "description": "Whether the message was delayed.",
                                                                        "example": false
                                                                    },
                                                                    "timestamp": {
                                                                        "type": "number",
                                                                        "description": "Timestamp when the message was delivered (Unix ms).",
                                                                        "example": 1757550304652
                                                                    }
                                                                },
                                                                "required": [
                                                                    "status",
                                                                    "delayed",
                                                                    "timestamp"
                                                                ]
                                                            },
                                                            "attachments": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "description": "URLs of attachments (MMS).",
                                                                "example": []
                                                            }
                                                        },
                                                        "required": [
                                                            "to",
                                                            "from",
                                                            "message",
                                                            "timestamp",
                                                            "delivery",
                                                            "attachments"
                                                        ]
                                                    }
                                                },
                                                "reactions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "reaction": {
                                                                "type": "string",
                                                                "description": "Reaction type (e.g. love, thumbsup, thumbsdown, haha, emphasized, questioned).",
                                                                "example": "love"
                                                            },
                                                            "on": {
                                                                "type": "string",
                                                                "description": "Message content that was reacted to.",
                                                                "example": "Hello, world!"
                                                            },
                                                            "timestamp": {
                                                                "type": "number",
                                                                "description": "Timestamp of the reaction (Unix ms).",
                                                                "example": 1757550304652
                                                            },
                                                            "action": {
                                                                "type": "string",
                                                                "description": "Whether the reaction was added or removed.",
                                                                "example": "added"
                                                            },
                                                            "from": {
                                                                "type": "string",
                                                                "description": "Phone number that sent the reaction (E.164).",
                                                                "example": "+15555555555"
                                                            }
                                                        },
                                                        "required": [
                                                            "reaction",
                                                            "on",
                                                            "timestamp",
                                                            "action",
                                                            "from"
                                                        ]
                                                    }
                                                },
                                                "chat": {
                                                    "type": "object",
                                                    "properties": {
                                                        "limit": {
                                                            "type": "number",
                                                            "description": "Message return limit.",
                                                            "example": 20
                                                        },
                                                        "total": {
                                                            "type": "number",
                                                            "description": "Number of messages in this response.",
                                                            "example": 20
                                                        },
                                                        "count": {
                                                            "type": "number",
                                                            "description": "Number of messages returned.",
                                                            "example": 20
                                                        }
                                                    },
                                                    "required": [
                                                        "limit",
                                                        "total",
                                                        "count"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "conversation",
                                                "reactions",
                                                "chat"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Bad Request"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 400
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Unauthorized"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 401
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Forbidden"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 403
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Internal Server Error"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 500
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/availability/imessage/{to}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "schema": {
                            "type": "string",
                            "description": "Phone number to check. Must be in E.164 format.",
                            "example": "+1234567890"
                        },
                        "required": true,
                        "description": "Phone number to check. Must be in E.164 format.",
                        "name": "to",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Check if a phone number supports iMessage",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "req_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "response"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "available": {
                                                    "type": "boolean",
                                                    "description": "Whether the number supports iMessage.",
                                                    "example": true
                                                }
                                            },
                                            "required": [
                                                "available"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Bad Request"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 400
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Unauthorized"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 401
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Forbidden"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 403
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string",
                                            "example": "err_xxxxxxxxxxxxxxxx"
                                        },
                                        "timestamp": {
                                            "type": "number",
                                            "example": 1772568052124
                                        },
                                        "api_version": {
                                            "type": "string",
                                            "example": "v2026.3.3"
                                        },
                                        "object": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "error": {
                                                    "type": "string",
                                                    "example": "Internal Server Error"
                                                },
                                                "status": {
                                                    "type": "number",
                                                    "example": 500
                                                }
                                            },
                                            "required": [
                                                "error",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "timestamp",
                                        "api_version",
                                        "object",
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}