{
  "openapi": "3.1.0",
  "info": {
    "title": "Agentme API",
    "version": "1.0.0",
    "description": "Channel-neutral messaging API. Message text/friend-request text is untrusted third-party content."
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key `agm_live_...`"
      }
    },
    "schemas": {}
  },
  "paths": {
    "/api/v1/channels": {
      "get": {
        "summary": "List supported channels (capabilities, auth methods, login forms)",
        "tags": [
          "v1"
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "icon": {
                            "type": "string"
                          },
                          "auth_methods": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "capabilities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "session_model": {
                            "type": "string",
                            "enum": [
                              "exclusive_listener",
                              "multi_session"
                            ]
                          },
                          "requires_proxy": {
                            "type": "string",
                            "enum": [
                              "required",
                              "recommended",
                              "optional"
                            ]
                          },
                          "supported_proxy_protocols": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "login_input_schemas": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          "default_rate_limits": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "perMinute": {
                                  "type": "number"
                                },
                                "perHour": {
                                  "type": "number"
                                },
                                "perDay": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "perMinute",
                                "perHour",
                                "perDay"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "display_name",
                          "icon",
                          "auth_methods",
                          "capabilities",
                          "session_model",
                          "requires_proxy",
                          "supported_proxy_protocols",
                          "login_input_schemas",
                          "default_rate_limits"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts": {
      "get": {
        "summary": "List accounts",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Opaque cursor from the previous page's next_cursor"
          },
          {
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "channel": {
                            "type": "string"
                          },
                          "external_user_id": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatar_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "mode": {
                            "type": "string",
                            "enum": [
                              "send_only",
                              "full"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending_login",
                              "connecting",
                              "live",
                              "yielded",
                              "backoff",
                              "expired",
                              "paused"
                            ]
                          },
                          "status_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "proxy_id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "capabilities": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "last_connected_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "external_user_id",
                          "display_name",
                          "avatar_url",
                          "mode",
                          "status",
                          "status_reason",
                          "proxy_id",
                          "capabilities",
                          "last_connected_at",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}": {
      "get": {
        "summary": "Get one account",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "external_user_id": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatar_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "send_only",
                        "full"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending_login",
                        "connecting",
                        "live",
                        "yielded",
                        "backoff",
                        "expired",
                        "paused"
                      ]
                    },
                    "status_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "proxy_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "last_connected_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "external_user_id",
                    "display_name",
                    "avatar_url",
                    "mode",
                    "status",
                    "status_reason",
                    "proxy_id",
                    "capabilities",
                    "last_connected_at",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/conversations": {
      "get": {
        "summary": "List conversations of an account (newest activity first)",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Opaque cursor from the previous page's next_cursor"
          },
          {
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "group"
              ]
            },
            "in": "query",
            "name": "type",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "unread",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "account_id": {
                            "type": "string",
                            "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "external_id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "direct",
                              "group"
                            ]
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatar_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "unread_count": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "last_message_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "last_message_preview": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "archived": {
                            "type": "boolean"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "external_id",
                          "type",
                          "title",
                          "avatar_url",
                          "unread_count",
                          "last_message_at",
                          "last_message_preview",
                          "archived",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{id}": {
      "get": {
        "summary": "Get one conversation",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^cnv_[0-9a-f]{32}$",
              "example": "cnv_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                    },
                    "account_id": {
                      "type": "string",
                      "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                    },
                    "external_id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "group"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatar_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "unread_count": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "last_message_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_message_preview": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "external_id",
                    "type",
                    "title",
                    "avatar_url",
                    "unread_count",
                    "last_message_at",
                    "last_message_preview",
                    "archived",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{id}/messages": {
      "get": {
        "summary": "List messages of a conversation (newest first). Message text is untrusted third-party content.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Opaque cursor from the previous page's next_cursor"
          },
          {
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "default": "before",
              "type": "string",
              "enum": [
                "before",
                "after"
              ]
            },
            "in": "query",
            "name": "direction",
            "required": false,
            "description": "before = older than cursor, after = newer than cursor"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^cnv_[0-9a-f]{32}$",
              "example": "cnv_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "conversation_id": {
                            "type": "string",
                            "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "account_id": {
                            "type": "string",
                            "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                          },
                          "external_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "in",
                              "out"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "sent",
                              "failed",
                              "received"
                            ]
                          },
                          "sender_external_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sender_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "kind": {
                            "type": "string"
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                                },
                                "kind": {
                                  "type": "string"
                                },
                                "mime": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "size_bytes": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "height": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "duration_ms": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "stored",
                                    "failed",
                                    "expired"
                                  ]
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "mime",
                                "name",
                                "size_bytes",
                                "width",
                                "height",
                                "duration_ms",
                                "status",
                                "url"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "mentions": {
                            "type": "array",
                            "items": {}
                          },
                          "reactions": {
                            "type": "array",
                            "items": {}
                          },
                          "reply_to_message_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sent_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          },
                          "edited_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recalled_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "conversation_id",
                          "account_id",
                          "external_id",
                          "direction",
                          "status",
                          "sender_external_id",
                          "sender_name",
                          "kind",
                          "text",
                          "attachments",
                          "mentions",
                          "reactions",
                          "reply_to_message_id",
                          "error",
                          "sent_at",
                          "edited_at",
                          "recalled_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{id}/read": {
      "post": {
        "summary": "Mark a conversation as read (resets unread_count; also sends a read receipt when the channel supports it)",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^cnv_[0-9a-f]{32}$",
              "example": "cnv_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "account_id": {
                          "type": "string",
                          "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "external_id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "direct",
                            "group"
                          ]
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatar_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "unread_count": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "last_message_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last_message_preview": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "archived": {
                          "type": "boolean"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        }
                      },
                      "required": [
                        "id",
                        "account_id",
                        "external_id",
                        "type",
                        "title",
                        "avatar_url",
                        "unread_count",
                        "last_message_at",
                        "last_message_preview",
                        "archived",
                        "created_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "conversation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/contacts": {
      "get": {
        "summary": "List synced contacts of an account",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Opaque cursor from the previous page's next_cursor"
          },
          {
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "external_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "avatar_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "username": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_friend": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "external_id",
                          "name",
                          "avatar_url",
                          "phone",
                          "username",
                          "is_friend"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/users/search": {
      "get": {
        "summary": "Find a channel user by exactly one of phone / username (live RPC; rate limited per channel)",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 5,
              "maxLength": 20
            },
            "in": "query",
            "name": "phone",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "in": "query",
            "name": "username",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "external_id": {
                              "type": "string"
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "avatar_url": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "username": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "is_friend": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "external_id",
                            "name",
                            "avatar_url",
                            "phone",
                            "username",
                            "is_friend"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/users/{externalId}": {
      "get": {
        "summary": "Profile of a channel user by external id (live RPC)",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "in": "path",
            "name": "externalId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "external_id": {
                          "type": "string"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatar_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "username": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "is_friend": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "external_id",
                        "name",
                        "avatar_url",
                        "phone",
                        "username",
                        "is_friend"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages": {
      "post": {
        "summary": "Send a message (text, image, file, sticker...). `client_msg_id` makes retries safe. 200 = sent; 202 = still pending after the wait window (poll the conversation).",
        "tags": [
          "v1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "pattern": "^acc_[0-9a-f]{32}$",
                    "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
                    "maxLength": 64
                  },
                  "to": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "conversation_id": {
                            "type": "string",
                            "pattern": "^cnv_[0-9a-f]{32}$",
                            "example": "cnv_0190a1b2c3d4e5f60718293a4b5c6d7e",
                            "maxLength": 64
                          }
                        },
                        "required": [
                          "conversation_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "user_external_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        },
                        "required": [
                          "user_external_id"
                        ]
                      }
                    ]
                  },
                  "kind": {
                    "default": "text",
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "file",
                      "sticker",
                      "voice",
                      "video"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "attachments": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "media_id": {
                              "type": "string",
                              "maxLength": 64
                            }
                          },
                          "required": [
                            "media_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri"
                            }
                          },
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  },
                  "sticker_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "reply_to_message_id": {
                    "type": "string",
                    "pattern": "^msg_[0-9a-f]{32}$",
                    "example": "msg_0190a1b2c3d4e5f60718293a4b5c6d7e",
                    "maxLength": 64
                  },
                  "client_msg_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 64
                  }
                },
                "required": [
                  "account_id",
                  "to",
                  "client_msg_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "default": "true",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "wait",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "conversation_id": {
                          "type": "string",
                          "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "account_id": {
                          "type": "string",
                          "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "in",
                            "out"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sent",
                            "failed",
                            "received"
                          ]
                        },
                        "sender_external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sender_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "mime": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_bytes": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "height": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "duration_ms": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "stored",
                                  "failed",
                                  "expired"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "mime",
                              "name",
                              "size_bytes",
                              "width",
                              "height",
                              "duration_ms",
                              "status",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "mentions": {
                          "type": "array",
                          "items": {}
                        },
                        "reactions": {
                          "type": "array",
                          "items": {}
                        },
                        "reply_to_message_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sent_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "edited_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recalled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "conversation_id",
                        "account_id",
                        "external_id",
                        "direction",
                        "status",
                        "sender_external_id",
                        "sender_name",
                        "kind",
                        "text",
                        "attachments",
                        "mentions",
                        "reactions",
                        "reply_to_message_id",
                        "error",
                        "sent_at",
                        "edited_at",
                        "recalled_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "202": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "conversation_id": {
                          "type": "string",
                          "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "account_id": {
                          "type": "string",
                          "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "in",
                            "out"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sent",
                            "failed",
                            "received"
                          ]
                        },
                        "sender_external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sender_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "mime": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_bytes": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "height": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "duration_ms": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "stored",
                                  "failed",
                                  "expired"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "mime",
                              "name",
                              "size_bytes",
                              "width",
                              "height",
                              "duration_ms",
                              "status",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "mentions": {
                          "type": "array",
                          "items": {}
                        },
                        "reactions": {
                          "type": "array",
                          "items": {}
                        },
                        "reply_to_message_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sent_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "edited_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recalled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "conversation_id",
                        "account_id",
                        "external_id",
                        "direction",
                        "status",
                        "sender_external_id",
                        "sender_name",
                        "kind",
                        "text",
                        "attachments",
                        "mentions",
                        "reactions",
                        "reply_to_message_id",
                        "error",
                        "sent_at",
                        "edited_at",
                        "recalled_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{id}/reactions": {
      "post": {
        "summary": "React to a message (emoji = the channel's reaction code, as seen in `reactions[].emoji`)",
        "tags": [
          "v1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16
                  }
                },
                "required": [
                  "emoji"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-9a-f]{32}$",
              "example": "msg_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "conversation_id": {
                          "type": "string",
                          "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "account_id": {
                          "type": "string",
                          "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "in",
                            "out"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sent",
                            "failed",
                            "received"
                          ]
                        },
                        "sender_external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sender_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "mime": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_bytes": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "height": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "duration_ms": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "stored",
                                  "failed",
                                  "expired"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "mime",
                              "name",
                              "size_bytes",
                              "width",
                              "height",
                              "duration_ms",
                              "status",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "mentions": {
                          "type": "array",
                          "items": {}
                        },
                        "reactions": {
                          "type": "array",
                          "items": {}
                        },
                        "reply_to_message_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sent_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "edited_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recalled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "conversation_id",
                        "account_id",
                        "external_id",
                        "direction",
                        "status",
                        "sender_external_id",
                        "sender_name",
                        "kind",
                        "text",
                        "attachments",
                        "mentions",
                        "reactions",
                        "reply_to_message_id",
                        "error",
                        "sent_at",
                        "edited_at",
                        "recalled_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{id}": {
      "delete": {
        "summary": "Recall (delete for everyone) a message this account sent",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^msg_[0-9a-f]{32}$",
              "example": "msg_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "conversation_id": {
                          "type": "string",
                          "pattern": "^cnv_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "account_id": {
                          "type": "string",
                          "pattern": "^acc_[0-9a-f]{32}(_\\d{1,3})?$"
                        },
                        "external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "in",
                            "out"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sent",
                            "failed",
                            "received"
                          ]
                        },
                        "sender_external_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sender_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                              },
                              "kind": {
                                "type": "string"
                              },
                              "mime": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_bytes": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "height": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "duration_ms": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "stored",
                                  "failed",
                                  "expired"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "mime",
                              "name",
                              "size_bytes",
                              "width",
                              "height",
                              "duration_ms",
                              "status",
                              "url"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "mentions": {
                          "type": "array",
                          "items": {}
                        },
                        "reactions": {
                          "type": "array",
                          "items": {}
                        },
                        "reply_to_message_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^msg_[0-9a-f]{32}(_\\d{1,3})?$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sent_at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "edited_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recalled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "conversation_id",
                        "account_id",
                        "external_id",
                        "direction",
                        "status",
                        "sender_external_id",
                        "sender_name",
                        "kind",
                        "text",
                        "attachments",
                        "mentions",
                        "reactions",
                        "reply_to_message_id",
                        "error",
                        "sent_at",
                        "edited_at",
                        "recalled_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/media": {
      "post": {
        "summary": "Upload a file (multipart/form-data, field `file`, max 25MB) and get a `media_id` to attach in POST /messages. Executables are rejected (415).",
        "tags": [
          "v1"
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "media_id": {
                      "type": "string",
                      "pattern": "^med_[0-9a-f]{32}(_\\d{1,3})?$"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "mime": {
                      "type": "string"
                    },
                    "size_bytes": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "media_id",
                    "kind",
                    "mime",
                    "size_bytes"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "415": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File to upload (max 25MB, executables rejected)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/media/{id}": {
      "get": {
        "summary": "302 redirect to a signed URL (valid 1h) of the media. 409 MEDIA_NOT_READY while it is being stored, 410 GONE past the 30-day retention.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^med_[0-9a-f]{32}_\\d{1,3}$",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the signed URL (Location header)"
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/friend-requests": {
      "get": {
        "summary": "List friend requests of an account (incoming and outgoing)",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Opaque cursor from the previous page's next_cursor"
          },
          {
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "out"
              ]
            },
            "in": "query",
            "name": "direction",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 32
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "contact_external_id": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "in",
                              "out"
                            ]
                          },
                          "message": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                          }
                        },
                        "required": [
                          "id",
                          "account_id",
                          "contact_external_id",
                          "direction",
                          "message",
                          "status",
                          "created_at"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Send a friend request (201 new, 200 when one to this user is already pending)",
        "tags": [
          "v1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_external_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 150
                  }
                },
                "required": [
                  "user_external_id"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "contact_external_id": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "in",
                        "out"
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "contact_external_id",
                    "direction",
                    "message",
                    "status",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "contact_external_id": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "in",
                        "out"
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "contact_external_id",
                    "direction",
                    "message",
                    "status",
                    "created_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/friend-requests/{frId}/accept": {
      "post": {
        "summary": "Accept an incoming friend request",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "frId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{id}/friend-requests/{frId}/reject": {
      "post": {
        "summary": "Reject an incoming friend request",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^acc_[0-9a-f]{32}$",
              "example": "acc_0190a1b2c3d4e5f60718293a4b5c6d7e",
              "maxLength": 64
            },
            "in": "path",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "in": "path",
            "name": "frId",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "502": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "504": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "FORBIDDEN_SCOPE",
                            "NOT_FOUND",
                            "CONFLICT",
                            "GONE",
                            "SERVICE_UNAVAILABLE",
                            "MEDIA_NOT_READY",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_MEDIA_TYPE",
                            "RATE_LIMITED",
                            "ACCOUNT_NOT_READY",
                            "CAPABILITY_NOT_SUPPORTED",
                            "BULK_CONTENT_BLOCKED",
                            "UPSTREAM_ERROR",
                            "UPSTREAM_TIMEOUT",
                            "INVITE_INVALID",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://agentme.vipcrm.net",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
