OpenAPI 3.1 · JSON

https://cutuma.com/api/v1/openapi.json?format=json

cutuma-public-api.json 187,496 octets
{
    "openapi": "3.1.0",
    "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
    "info": {
        "title": "CUTUMA Public API",
        "version": "v1",
        "summary": "SMS, contacts, campagnes, Sender IDs, clés API et webhooks.",
        "description": "API publique CUTUMA. Tous les endpoints listés sont actifs. Authentification : Authorization: Bearer <clé> ou header x-api-key. Base URL dynamique via APP_URL dans .env."
    },
    "servers": [
        {
            "url": "https://cutuma.com/api/v1",
            "description": "Base URL de l'API CUTUMA (dérivée de APP_URL)."
        }
    ],
    "tags": [
        {
            "name": "Platform",
            "description": "Service discovery, health, and machine-readable API metadata."
        },
        {
            "name": "SMS",
            "description": "Single-recipient SMS sends from the developer API."
        },
        {
            "name": "Account",
            "description": "Organization account state, entitlements, and invoice-ready usage history."
        },
        {
            "name": "Contacts",
            "description": "Organization-scoped contact management."
        },
        {
            "name": "Campaigns",
            "description": "Create and list outbound SMS campaigns."
        },
        {
            "name": "Sender IDs",
            "description": "List approved sender identities and request new ones for review."
        },
        {
            "name": "API Keys",
            "description": "Manage organization API keys for the developer product."
        },
        {
            "name": "Webhooks",
            "description": "Manage outbound event delivery endpoints."
        }
    ],
    "paths": {
        "/": {
            "get": {
                "tags": [
                    "Platform"
                ],
                "operationId": "getApiIndex",
                "summary": "Get API entrypoint metadata",
                "description": "Returns the current API version, the public docs path, and the machine-readable OpenAPI document path.",
                "responses": {
                    "200": {
                        "description": "API discovery metadata with docs and health paths.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiIndexResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/health": {
            "get": {
                "tags": [
                    "Platform"
                ],
                "operationId": "getHealth",
                "summary": "Get API health",
                "description": "Lightweight health probe for uptime and platform status checks.",
                "responses": {
                    "200": {
                        "description": "Current API health snapshot.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HealthResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/openapi.json": {
            "get": {
                "tags": [
                    "Platform"
                ],
                "operationId": "getOpenApiDocument",
                "summary": "Get the OpenAPI 3.1 document",
                "description": "Returns the machine-readable OpenAPI 3.1 contract generated from the shared Zod schemas.",
                "responses": {
                    "200": {
                        "description": "The current OpenAPI 3.1 document for the public API.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "description": "OpenAPI 3.1 document"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sms/send": {
            "post": {
                "tags": [
                    "SMS"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "sendSms",
                "summary": "Send one SMS",
                "description": "Enqueues and dispatches one SMS through the active supplier resolution flow for the authenticated organization.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/RequestIdHeader"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Single-recipient SMS payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SendSmsRequest"
                            },
                            "examples": {
                                "basic": {
                                    "summary": "Transactional send",
                                    "value": {
                                        "to": "243837509125",
                                        "message": "Votre code de verification est 1234.",
                                        "senderId": "11111111-1111-4111-8111-111111111111",
                                        "clientReference": "txn-2026-0001"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "SMS accepted by the platform and queued for supplier dispatch.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SendSmsSuccessResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/account": {
            "get": {
                "tags": [
                    "Account"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "getAccountSummary",
                "summary": "Get account commercial summary",
                "description": "Returns the authenticated organization commercial state, current subscription, and remaining quota.",
                "responses": {
                    "200": {
                        "description": "Current organization commercial summary.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/AccountSummaryResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/usage": {
            "get": {
                "tags": [
                    "Account"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listUsage",
                "summary": "List quota usage ledger entries",
                "description": "Returns cursor-paginated usage and quota adjustment entries for the authenticated organization.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/LimitQuery"
                    },
                    {
                        "$ref": "#/components/parameters/CursorQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated commercial usage ledger.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListUsageResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/contacts": {
            "get": {
                "tags": [
                    "Contacts"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listContacts",
                "summary": "List contacts",
                "description": "Returns a cursor-paginated collection of organization contacts.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/LimitQuery"
                    },
                    {
                        "$ref": "#/components/parameters/CursorQuery"
                    },
                    {
                        "$ref": "#/components/parameters/ContactTagQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated organization contacts.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListContactsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "post": {
                "tags": [
                    "Contacts"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "createContact",
                "summary": "Create a contact",
                "description": "Creates one organization contact and normalizes phone/tags server-side.",
                "requestBody": {
                    "required": true,
                    "description": "Contact creation payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateContactRequest"
                            },
                            "examples": {
                                "basic": {
                                    "summary": "Contact with tags",
                                    "value": {
                                        "name": "Nadine M.",
                                        "phone": "243837509125",
                                        "tags": [
                                            "vip",
                                            "retail"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Created contact.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateContactResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Contacts"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "deleteContact",
                "summary": "Delete a contact",
                "description": "Deletes one organization contact by identifier.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/ContactIdQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Contact deleted.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/campaigns": {
            "get": {
                "tags": [
                    "Campaigns"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listCampaigns",
                "summary": "List campaigns",
                "description": "Returns cursor-paginated campaigns for the authenticated organization.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/LimitQuery"
                    },
                    {
                        "$ref": "#/components/parameters/CursorQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated campaign collection.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListCampaignsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "post": {
                "tags": [
                    "Campaigns"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "createCampaign",
                "summary": "Create a campaign",
                "description": "Creates one immediate or scheduled SMS campaign on the shared organization-centric runtime.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/RequestIdHeader"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Campaign creation payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCampaignRequest"
                            },
                            "examples": {
                                "scheduled": {
                                    "summary": "Scheduled campaign",
                                    "value": {
                                        "name": "Promo week-end",
                                        "message_template": "Bonjour {{name}}, profitez de -15% ce week-end.",
                                        "scheduled_at": "2026-04-10T08:30:00.000Z",
                                        "sender_id": "11111111-1111-4111-8111-111111111111",
                                        "audience_tags": [
                                            "vip",
                                            "retail"
                                        ],
                                        "audience_tag_match_mode": "all"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created campaign.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateCampaignResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/sender-ids": {
            "get": {
                "tags": [
                    "Sender IDs"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listSenderIds",
                "summary": "List sender IDs",
                "description": "Returns the authenticated organization sender IDs, including approval status and default selection.",
                "responses": {
                    "200": {
                        "description": "Current sender IDs for the organization.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListSenderIdsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "post": {
                "tags": [
                    "Sender IDs"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "createSenderIdRequest",
                "summary": "Request a sender ID",
                "description": "Creates or reopens a sender ID request for the authenticated organization. Approval remains operator and admin controlled.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/RequestIdHeader"
                    },
                    {
                        "$ref": "#/components/parameters/IdempotencyKeyHeader"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Sender ID request payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateSenderIdRequest"
                            },
                            "examples": {
                                "basic": {
                                    "summary": "Request a branded sender",
                                    "value": {
                                        "value": "TESSA"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Created sender ID request.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateSenderIdRequestResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/api-keys": {
            "get": {
                "tags": [
                    "API Keys"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listApiKeys",
                "summary": "List API keys",
                "description": "Lists the organization API keys visible to the authenticated principal, paginated by cursor.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/LimitQuery"
                    },
                    {
                        "$ref": "#/components/parameters/CursorQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated API key collection.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListApiKeysResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "post": {
                "tags": [
                    "API Keys"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "createApiKey",
                "summary": "Create an API key",
                "description": "Creates a new organization API key and returns the plaintext secret exactly once.",
                "requestBody": {
                    "required": true,
                    "description": "API key creation payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateApiKeyRequest"
                            },
                            "examples": {
                                "basic": {
                                    "summary": "Server integration key",
                                    "value": {
                                        "name": "Production backend"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Created API key.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateApiKeyResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/api-keys/{apiKeyId}": {
            "delete": {
                "tags": [
                    "API Keys"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "revokeApiKey",
                "summary": "Revoke an API key",
                "description": "Revokes one organization API key by identifier.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/ApiKeyIdPath"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "API key revoked.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "tags": [
                    "Webhooks"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "listWebhookEndpoints",
                "summary": "List webhook endpoints",
                "description": "Lists outbound webhook endpoints configured for the authenticated organization.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/LimitQuery"
                    },
                    {
                        "$ref": "#/components/parameters/CursorQuery"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated webhook endpoint collection.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListWebhookEndpointsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            },
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "createWebhookEndpoint",
                "summary": "Create a webhook endpoint",
                "description": "Registers a webhook endpoint and returns its signing secret once at creation time.",
                "requestBody": {
                    "required": true,
                    "description": "Webhook endpoint creation payload.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
                            },
                            "examples": {
                                "basic": {
                                    "summary": "Message lifecycle events",
                                    "value": {
                                        "url": "https://example.com/hooks/cutuma",
                                        "subscribed_events": [
                                            "message.sent",
                                            "message.delivered",
                                            "message.failed"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Created webhook endpoint and signing secret.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CreateWebhookEndpointResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "409": {
                        "$ref": "#/components/responses/Conflict"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpointId}": {
            "delete": {
                "tags": [
                    "Webhooks"
                ],
                "security": [
                    {
                        "bearerApiKey": []
                    },
                    {
                        "xApiKey": []
                    }
                ],
                "operationId": "disableWebhookEndpoint",
                "summary": "Disable a webhook endpoint",
                "description": "Disables an existing outbound webhook endpoint by identifier.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/WebhookEndpointIdPath"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Webhook endpoint disabled.",
                        "headers": {
                            "x-request-id": {
                                "$ref": "#/components/headers/XRequestId"
                            },
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/XRateLimitLimit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/XRateLimitRemaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/XRateLimitReset"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SuccessResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "500": {
                        "$ref": "#/components/responses/InternalServerError"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerApiKey": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "API key",
                "description": "Send your CUTUMA API key as Authorization: Bearer <api-key>."
            },
            "xApiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "x-api-key",
                "description": "Alternative header for clients that cannot send Authorization."
            }
        },
        "parameters": {
            "RequestIdHeader": {
                "name": "x-request-id",
                "in": "header",
                "required": false,
                "description": "Optional caller-supplied correlation identifier. The API always echoes a request id in responses.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                }
            },
            "IdempotencyKeyHeader": {
                "name": "Idempotency-Key",
                "in": "header",
                "required": false,
                "description": "Recommended for POST requests. Reusing the same key with the same payload replays the stored response.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                }
            },
            "LimitQuery": {
                "name": "limit",
                "in": "query",
                "required": false,
                "description": "Maximum number of items to return.",
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 25
                }
            },
            "CursorQuery": {
                "name": "cursor",
                "in": "query",
                "required": false,
                "description": "Opaque cursor returned by the previous page.",
                "schema": {
                    "type": "string",
                    "minLength": 1
                }
            },
            "DateFromQuery": {
                "name": "dateFrom",
                "in": "query",
                "required": false,
                "description": "Inclusive lower bound on the resource creation timestamp.",
                "schema": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "DateToQuery": {
                "name": "dateTo",
                "in": "query",
                "required": false,
                "description": "Inclusive upper bound on the resource creation timestamp.",
                "schema": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "WhatsAppTemplateStatusQuery": {
                "name": "status",
                "in": "query",
                "required": false,
                "description": "Filter WhatsApp templates by CUTUMA template status.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "draft",
                        "pending",
                        "approved",
                        "rejected",
                        "paused",
                        "disabled"
                    ]
                }
            },
            "WhatsAppTemplateCategoryQuery": {
                "name": "category",
                "in": "query",
                "required": false,
                "description": "Filter WhatsApp templates by template category.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "authentication",
                        "utility",
                        "marketing"
                    ]
                }
            },
            "WhatsAppConversationStatusQuery": {
                "name": "status",
                "in": "query",
                "required": false,
                "description": "Filter WhatsApp conversations by conversation state.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "open",
                        "pending",
                        "needs_human",
                        "closed",
                        "blocked"
                    ]
                }
            },
            "WhatsAppMessageStatusQuery": {
                "name": "status",
                "in": "query",
                "required": false,
                "description": "Filter WhatsApp messages by delivery state.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "queued",
                        "accepted",
                        "sent",
                        "delivered",
                        "read",
                        "failed",
                        "cancelled"
                    ]
                }
            },
            "WhatsAppBillingCategoryQuery": {
                "name": "category",
                "in": "query",
                "required": false,
                "description": "Filter WhatsApp messages by billing/conversation category.",
                "schema": {
                    "type": "string",
                    "enum": [
                        "authentication",
                        "utility",
                        "marketing",
                        "service"
                    ]
                }
            },
            "WhatsAppTemplateNameQuery": {
                "name": "template",
                "in": "query",
                "required": false,
                "description": "Filter by WhatsApp template name.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "pattern": "^[a-z0-9_]+$"
                }
            },
            "WhatsAppRecipientQuery": {
                "name": "recipient",
                "in": "query",
                "required": false,
                "description": "Filter by recipient phone number in E.164 format.",
                "schema": {
                    "type": "string",
                    "pattern": "^\\+[1-9][0-9]{7,14}$"
                }
            },
            "ContactTagQuery": {
                "name": "tag",
                "in": "query",
                "required": false,
                "description": "Filter contacts to a single tag value.",
                "schema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                }
            },
            "ContactIdQuery": {
                "name": "id",
                "in": "query",
                "required": true,
                "description": "Contact identifier.",
                "schema": {
                    "type": "string",
                    "format": "uuid"
                }
            },
            "ApiKeyIdPath": {
                "name": "apiKeyId",
                "in": "path",
                "required": true,
                "description": "API key identifier.",
                "schema": {
                    "type": "string",
                    "format": "uuid"
                }
            },
            "WebhookEndpointIdPath": {
                "name": "webhookEndpointId",
                "in": "path",
                "required": true,
                "description": "Webhook endpoint identifier.",
                "schema": {
                    "type": "string",
                    "format": "uuid"
                }
            }
        },
        "headers": {
            "XRequestId": {
                "description": "Unique request correlation id generated or echoed by the API.",
                "schema": {
                    "type": "string"
                }
            },
            "XRateLimitLimit": {
                "description": "Rate limit budget allocated to the authenticated API key window.",
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "XRateLimitRemaining": {
                "description": "Remaining requests in the current API key window.",
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "XRateLimitReset": {
                "description": "Unix timestamp at which the current rate-limit window resets.",
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            },
            "RetryAfter": {
                "description": "Seconds to wait before retrying after a rate-limit rejection.",
                "schema": {
                    "type": "integer",
                    "minimum": 0
                }
            }
        },
        "responses": {
            "BadRequest": {
                "description": "Invalid request payload, query, or header values.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ValidationErrorResponse"
                        }
                    }
                }
            },
            "Unauthorized": {
                "description": "Missing or invalid API key authentication.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ErrorResponse"
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "Authenticated principal cannot access the requested organization resource.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ErrorResponse"
                        }
                    }
                }
            },
            "NotFound": {
                "description": "Requested resource was not found.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ErrorResponse"
                        }
                    }
                }
            },
            "Conflict": {
                "description": "The request conflicts with current state or a prior idempotent request.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ConflictErrorResponse"
                        }
                    }
                }
            },
            "RateLimited": {
                "description": "The authenticated API key exceeded its request budget for the current window.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    },
                    "X-RateLimit-Limit": {
                        "$ref": "#/components/headers/XRateLimitLimit"
                    },
                    "X-RateLimit-Remaining": {
                        "$ref": "#/components/headers/XRateLimitRemaining"
                    },
                    "X-RateLimit-Reset": {
                        "$ref": "#/components/headers/XRateLimitReset"
                    },
                    "Retry-After": {
                        "$ref": "#/components/headers/RetryAfter"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ErrorResponse"
                        }
                    }
                }
            },
            "InternalServerError": {
                "description": "Unexpected server-side failure.",
                "headers": {
                    "x-request-id": {
                        "$ref": "#/components/headers/XRequestId"
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ErrorResponse"
                        }
                    }
                }
            }
        },
        "schemas": {
            "ApiIndexResponse": {
                "type": "object",
                "properties": {
                    "service": {
                        "type": "string",
                        "const": "cutuma-sms-api"
                    },
                    "version": {
                        "type": "string",
                        "const": "v1"
                    },
                    "status": {
                        "type": "string",
                        "const": "available"
                    },
                    "docsPath": {
                        "type": "string",
                        "const": "/docs/api"
                    },
                    "healthPath": {
                        "type": "string",
                        "const": "/v1/health"
                    },
                    "openApiPath": {
                        "type": "string",
                        "const": "/v1/openapi.json"
                    }
                },
                "required": [
                    "service",
                    "version",
                    "status",
                    "docsPath",
                    "healthPath",
                    "openApiPath"
                ],
                "additionalProperties": false
            },
            "HealthResponse": {
                "type": "object",
                "properties": {
                    "service": {
                        "type": "string",
                        "const": "cutuma-sms-api"
                    },
                    "version": {
                        "type": "string",
                        "const": "v1"
                    },
                    "status": {
                        "type": "string",
                        "const": "ok"
                    },
                    "timestamp": {
                        "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": [
                    "service",
                    "version",
                    "status",
                    "timestamp"
                ],
                "additionalProperties": false
            },
            "AccountSummaryResponse": {
                "type": "object",
                "properties": {
                    "organizationId": {
                        "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)$"
                    },
                    "organizationName": {
                        "type": "string",
                        "minLength": 1
                    },
                    "organizationSlug": {
                        "type": "string",
                        "minLength": 1
                    },
                    "billingEmail": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "defaultSenderName": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "status": {
                        "type": "string",
                        "minLength": 1
                    },
                    "canSend": {
                        "type": "boolean"
                    },
                    "createdAt": {
                        "type": "string"
                    },
                    "plan": {
                        "anyOf": [
                            {
                                "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)$"
                                    },
                                    "code": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "name": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "description": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "includedSms": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "priceUsd": {
                                        "type": "number",
                                        "minimum": 0
                                    },
                                    "isActive": {
                                        "type": "boolean"
                                    },
                                    "overageEnabled": {
                                        "type": "boolean"
                                    },
                                    "overageLimitSms": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "overagePriceUsdPerSms": {
                                        "type": "number",
                                        "minimum": 0
                                    },
                                    "createdAt": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "updatedAt": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "id",
                                    "code",
                                    "name",
                                    "description",
                                    "includedSms",
                                    "priceUsd",
                                    "isActive",
                                    "overageEnabled",
                                    "overageLimitSms",
                                    "overagePriceUsdPerSms",
                                    "createdAt",
                                    "updatedAt"
                                ],
                                "additionalProperties": false
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "subscription": {
                        "anyOf": [
                            {
                                "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)$"
                                    },
                                    "planId": {
                                        "anyOf": [
                                            {
                                                "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)$"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "status": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "smsLimit": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "priceUsd": {
                                        "type": "number",
                                        "minimum": 0
                                    },
                                    "startsAt": {
                                        "type": "string"
                                    },
                                    "expiresAt": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "createdAt": {
                                        "type": "string"
                                    },
                                    "updatedAt": {
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "overageEnabled": {
                                        "type": "boolean"
                                    },
                                    "overageLimitSms": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "overagePriceUsdPerSms": {
                                        "type": "number",
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "id",
                                    "planId",
                                    "status",
                                    "smsLimit",
                                    "priceUsd",
                                    "startsAt",
                                    "expiresAt",
                                    "createdAt",
                                    "updatedAt",
                                    "overageEnabled",
                                    "overageLimitSms",
                                    "overagePriceUsdPerSms"
                                ],
                                "additionalProperties": false
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "quota": {
                        "type": "object",
                        "properties": {
                            "creditUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "debitUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "remainingUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "limitUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            }
                        },
                        "required": [
                            "creditUnits",
                            "debitUnits",
                            "remainingUnits",
                            "limitUnits"
                        ],
                        "additionalProperties": false
                    },
                    "overage": {
                        "type": "object",
                        "properties": {
                            "enabled": {
                                "type": "boolean"
                            },
                            "limitUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "usedUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "remainingUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "billableUnits": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "priceUsdPerSms": {
                                "type": "number",
                                "minimum": 0
                            }
                        },
                        "required": [
                            "enabled",
                            "limitUnits",
                            "usedUnits",
                            "remainingUnits",
                            "billableUnits",
                            "priceUsdPerSms"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "organizationId",
                    "organizationName",
                    "organizationSlug",
                    "billingEmail",
                    "defaultSenderName",
                    "status",
                    "canSend",
                    "createdAt",
                    "plan",
                    "subscription",
                    "quota",
                    "overage"
                ],
                "additionalProperties": false
            },
            "ListUsageResponse": {
                "type": "object",
                "properties": {
                    "usage": {
                        "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)$"
                                },
                                "organizationId": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "providerAccountId": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "entryType": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "direction": {
                                    "type": "string",
                                    "enum": [
                                        "credit",
                                        "debit"
                                    ]
                                },
                                "units": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "referenceType": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "referenceId": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "note": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "metadata": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "propertyNames": {
                                                "type": "string"
                                            },
                                            "additionalProperties": []
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "createdAt": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organizationId",
                                "providerAccountId",
                                "entryType",
                                "direction",
                                "units",
                                "referenceType",
                                "referenceId",
                                "note",
                                "metadata",
                                "createdAt"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "usage",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "SendSmsRequest": {
                "type": "object",
                "properties": {
                    "to": {
                        "type": "string",
                        "minLength": 6,
                        "maxLength": 32
                    },
                    "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1530
                    },
                    "senderId": {
                        "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)$"
                    },
                    "senderName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32
                    },
                    "clientReference": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                    }
                },
                "required": [
                    "to",
                    "message"
                ],
                "additionalProperties": false
            },
            "SendSmsSuccessResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "queued": {
                        "type": "boolean"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "accepted",
                            "sent"
                        ]
                    },
                    "count": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                    },
                    "remainingQuota": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "provider": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "minLength": 1
                            },
                            "messageId": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "httpStatus": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            }
                        },
                        "required": [
                            "code",
                            "messageId",
                            "httpStatus"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "count",
                    "remainingQuota",
                    "provider"
                ],
                "additionalProperties": false
            },
            "WhatsAppPublicApiSendRequest": {
                "oneOf": [
                    {
                        "type": "object",
                        "properties": {
                            "to": {
                                "type": "string",
                                "pattern": "^\\+[1-9]\\d{7,14}$"
                            },
                            "phoneNumberId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                            },
                            "clientReference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                            },
                            "type": {
                                "type": "string",
                                "const": "template"
                            },
                            "template": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 512,
                                        "pattern": "^[a-z0-9_]+$"
                                    },
                                    "language": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 16
                                    },
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "authentication",
                                            "utility",
                                            "marketing"
                                        ]
                                    },
                                    "parameters": {
                                        "default": [],
                                        "maxItems": 32,
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "maxLength": 1024
                                        }
                                    }
                                },
                                "required": [
                                    "name",
                                    "language",
                                    "category",
                                    "parameters"
                                ],
                                "additionalProperties": false
                            }
                        },
                        "required": [
                            "to",
                            "phoneNumberId",
                            "type",
                            "template"
                        ],
                        "additionalProperties": false
                    },
                    {
                        "type": "object",
                        "properties": {
                            "to": {
                                "type": "string",
                                "pattern": "^\\+[1-9]\\d{7,14}$"
                            },
                            "phoneNumberId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                            },
                            "clientReference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                            },
                            "type": {
                                "type": "string",
                                "const": "text"
                            },
                            "conversationId": {
                                "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)$"
                            },
                            "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4096
                            }
                        },
                        "required": [
                            "to",
                            "phoneNumberId",
                            "type",
                            "conversationId",
                            "text"
                        ],
                        "additionalProperties": false
                    }
                ]
            },
            "WhatsAppSendResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "queued": {
                        "type": "boolean"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "accepted",
                            "queued",
                            "sent"
                        ]
                    },
                    "messageId": {
                        "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)$"
                    },
                    "provider": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "const": "whatsapp"
                            },
                            "messageId": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "httpStatus": {
                                "type": "integer",
                                "minimum": 100,
                                "maximum": 599
                            }
                        },
                        "required": [
                            "code",
                            "messageId",
                            "httpStatus"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "queued",
                    "status",
                    "messageId",
                    "provider"
                ],
                "additionalProperties": false
            },
            "ListWhatsAppTemplatesResponse": {
                "type": "object",
                "properties": {
                    "templates": {
                        "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)$"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "language": {
                                    "type": "string"
                                },
                                "category": {
                                    "type": "string",
                                    "enum": [
                                        "authentication",
                                        "utility",
                                        "marketing"
                                    ]
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "draft",
                                        "pending",
                                        "approved",
                                        "rejected",
                                        "paused",
                                        "disabled"
                                    ]
                                },
                                "createdAt": {
                                    "type": "string"
                                },
                                "updatedAt": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "name",
                                "language",
                                "category",
                                "status",
                                "createdAt",
                                "updatedAt"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "templates",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "ListWhatsAppConversationsResponse": {
                "type": "object",
                "properties": {
                    "conversations": {
                        "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)$"
                                },
                                "recipientPhoneE164": {
                                    "type": "string",
                                    "pattern": "^\\+[1-9]\\d{7,14}$"
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "open",
                                        "pending",
                                        "needs_human",
                                        "closed",
                                        "blocked"
                                    ]
                                },
                                "customerServiceWindowUntil": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "lastCustomerMessageAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "createdAt": {
                                    "type": "string"
                                },
                                "updatedAt": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "recipientPhoneE164",
                                "status",
                                "customerServiceWindowUntil",
                                "lastCustomerMessageAt",
                                "createdAt",
                                "updatedAt"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "conversations",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "ListWhatsAppMessagesResponse": {
                "type": "object",
                "properties": {
                    "messages": {
                        "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)$"
                                },
                                "conversationId": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "direction": {
                                    "type": "string",
                                    "enum": [
                                        "inbound",
                                        "outbound"
                                    ]
                                },
                                "messageType": {
                                    "type": "string",
                                    "enum": [
                                        "template",
                                        "text",
                                        "interactive",
                                        "unknown"
                                    ]
                                },
                                "recipientPhoneE164": {
                                    "type": "string",
                                    "pattern": "^\\+[1-9]\\d{7,14}$"
                                },
                                "templateName": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "templateLanguage": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "category": {
                                    "anyOf": [
                                        {
                                            "type": "string",
                                            "enum": [
                                                "authentication",
                                                "utility",
                                                "marketing",
                                                "service"
                                            ]
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "accepted",
                                        "queued",
                                        "sent",
                                        "delivered",
                                        "read",
                                        "failed",
                                        "cancelled"
                                    ]
                                },
                                "bodyPreview": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "publicErrorCode": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "failureLabel": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "createdAt": {
                                    "type": "string"
                                },
                                "sentAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "deliveredAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "readAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "failedAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "conversationId",
                                "direction",
                                "messageType",
                                "recipientPhoneE164",
                                "templateName",
                                "templateLanguage",
                                "category",
                                "status",
                                "bodyPreview",
                                "publicErrorCode",
                                "failureLabel",
                                "createdAt",
                                "sentAt",
                                "deliveredAt",
                                "readAt",
                                "failedAt"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "messages",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "CreateContactRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                    },
                    "phone": {
                        "type": "string",
                        "minLength": 6,
                        "maxLength": 32
                    },
                    "tags": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                        }
                    }
                },
                "required": [
                    "phone"
                ],
                "additionalProperties": false
            },
            "CreateContactResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "contact": {
                        "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)$"
                            },
                            "organization_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)$"
                            },
                            "name": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "phone": {
                                "type": "string"
                            },
                            "tags": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "metadata": {
                                "anyOf": [
                                    {
                                        "type": "object",
                                        "propertyNames": {
                                            "type": "string"
                                        },
                                        "additionalProperties": []
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "organization_id",
                            "name",
                            "phone",
                            "tags",
                            "created_at",
                            "updated_at"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "contact"
                ],
                "additionalProperties": false
            },
            "ListContactsResponse": {
                "type": "object",
                "properties": {
                    "contacts": {
                        "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)$"
                                },
                                "organization_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)$"
                                },
                                "name": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "phone": {
                                    "type": "string"
                                },
                                "tags": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "metadata": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "propertyNames": {
                                                "type": "string"
                                            },
                                            "additionalProperties": []
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "created_at": {
                                    "type": "string"
                                },
                                "updated_at": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organization_id",
                                "name",
                                "phone",
                                "tags",
                                "created_at",
                                "updated_at"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "contacts",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "CreateCampaignRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                    },
                    "message_template": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1530
                    },
                    "scheduled_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"
                            }
                        ]
                    },
                    "total_recipients": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "sender_id": {
                        "anyOf": [
                            {
                                "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)$"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sender_name": {
                        "anyOf": [
                            {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "audience_preset_id": {
                        "anyOf": [
                            {
                                "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)$"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "audience_tags": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                        }
                    },
                    "audience_tag_match_mode": {
                        "type": "string",
                        "enum": [
                            "any",
                            "all"
                        ]
                    }
                },
                "required": [
                    "name",
                    "message_template"
                ],
                "additionalProperties": false
            },
            "CreateCampaignResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "campaign": {
                        "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)$"
                            },
                            "organization_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)$"
                            },
                            "created_by_user_id": {
                                "anyOf": [
                                    {
                                        "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)$"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "name": {
                                "type": "string"
                            },
                            "sender_id": {
                                "anyOf": [
                                    {
                                        "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)$"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "sender_name": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "message_template": {
                                "type": "string"
                            },
                            "audience_preset_id": {
                                "anyOf": [
                                    {
                                        "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)$"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "audience_tags": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "audience_tag_match_mode": {
                                "type": "string",
                                "enum": [
                                    "any",
                                    "all"
                                ]
                            },
                            "status": {
                                "type": "string"
                            },
                            "scheduled_at": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "total_recipients": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "queued_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "sent_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "delivered_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "failed_count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "organization_id",
                            "created_by_user_id",
                            "name",
                            "sender_id",
                            "sender_name",
                            "message_template",
                            "audience_preset_id",
                            "audience_tags",
                            "audience_tag_match_mode",
                            "status",
                            "scheduled_at",
                            "total_recipients",
                            "queued_count",
                            "sent_count",
                            "delivered_count",
                            "failed_count",
                            "created_at",
                            "updated_at"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "campaign"
                ],
                "additionalProperties": false
            },
            "ListCampaignsResponse": {
                "type": "object",
                "properties": {
                    "campaigns": {
                        "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)$"
                                },
                                "organization_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)$"
                                },
                                "created_by_user_id": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "name": {
                                    "type": "string"
                                },
                                "sender_id": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "sender_name": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "message_template": {
                                    "type": "string"
                                },
                                "audience_preset_id": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "audience_tags": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "audience_tag_match_mode": {
                                    "type": "string",
                                    "enum": [
                                        "any",
                                        "all"
                                    ]
                                },
                                "status": {
                                    "type": "string"
                                },
                                "scheduled_at": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "total_recipients": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "queued_count": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "sent_count": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "delivered_count": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "failed_count": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "created_at": {
                                    "type": "string"
                                },
                                "updated_at": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organization_id",
                                "created_by_user_id",
                                "name",
                                "sender_id",
                                "sender_name",
                                "message_template",
                                "audience_preset_id",
                                "audience_tags",
                                "audience_tag_match_mode",
                                "status",
                                "scheduled_at",
                                "total_recipients",
                                "queued_count",
                                "sent_count",
                                "delivered_count",
                                "failed_count",
                                "created_at",
                                "updated_at"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "campaigns",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "CreateSenderIdRequest": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 11
                    },
                    "metadata": {
                        "anyOf": [
                            {
                                "type": "object",
                                "propertyNames": {
                                    "type": "string"
                                },
                                "additionalProperties": []
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "value"
                ],
                "additionalProperties": false
            },
            "CreateSenderIdRequestResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "sender_id": {
                        "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)$"
                            },
                            "organization_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)$"
                            },
                            "requested_by_user_id": {
                                "anyOf": [
                                    {
                                        "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)$"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "reviewed_by_user_id": {
                                "anyOf": [
                                    {
                                        "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)$"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                            },
                            "normalized_value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "pending_review",
                                    "pending_operator",
                                    "approved",
                                    "rejected",
                                    "archived"
                                ]
                            },
                            "rejection_reason": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "operator_reference": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "is_default": {
                                "type": "boolean"
                            },
                            "metadata": {
                                "anyOf": [
                                    {
                                        "type": "object",
                                        "propertyNames": {
                                            "type": "string"
                                        },
                                        "additionalProperties": []
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "reviewed_at": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "organization_id",
                            "requested_by_user_id",
                            "reviewed_by_user_id",
                            "value",
                            "normalized_value",
                            "status",
                            "rejection_reason",
                            "operator_reference",
                            "is_default",
                            "metadata",
                            "reviewed_at",
                            "created_at",
                            "updated_at"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "sender_id"
                ],
                "additionalProperties": false
            },
            "ListSenderIdsResponse": {
                "type": "object",
                "properties": {
                    "sender_ids": {
                        "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)$"
                                },
                                "organization_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)$"
                                },
                                "requested_by_user_id": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "reviewed_by_user_id": {
                                    "anyOf": [
                                        {
                                            "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)$"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "value": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 32
                                },
                                "normalized_value": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 32
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "pending_review",
                                        "pending_operator",
                                        "approved",
                                        "rejected",
                                        "archived"
                                    ]
                                },
                                "rejection_reason": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "operator_reference": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "is_default": {
                                    "type": "boolean"
                                },
                                "metadata": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "propertyNames": {
                                                "type": "string"
                                            },
                                            "additionalProperties": []
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "reviewed_at": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "created_at": {
                                    "type": "string"
                                },
                                "updated_at": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organization_id",
                                "requested_by_user_id",
                                "reviewed_by_user_id",
                                "value",
                                "normalized_value",
                                "status",
                                "rejection_reason",
                                "operator_reference",
                                "is_default",
                                "metadata",
                                "reviewed_at",
                                "created_at",
                                "updated_at"
                            ],
                            "additionalProperties": false
                        }
                    }
                },
                "required": [
                    "sender_ids"
                ],
                "additionalProperties": false
            },
            "CreateApiKeyRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                    }
                },
                "required": [
                    "name"
                ],
                "additionalProperties": false
            },
            "CreateApiKeyResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "apiKey": {
                        "type": "object",
                        "properties": {
                            "apiKeyId": {
                                "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)$"
                            },
                            "organizationId": {
                                "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)$"
                            },
                            "name": {
                                "type": "string",
                                "minLength": 1
                            },
                            "keyPrefix": {
                                "type": "string",
                                "minLength": 1
                            },
                            "maskedKey": {
                                "type": "string",
                                "minLength": 1
                            },
                            "plainTextKey": {
                                "type": "string",
                                "minLength": 1
                            },
                            "lastUsedAt": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "revokedAt": {
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "createdAt": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "apiKeyId",
                            "organizationId",
                            "name",
                            "keyPrefix",
                            "maskedKey",
                            "plainTextKey",
                            "lastUsedAt",
                            "revokedAt",
                            "createdAt"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "success",
                    "apiKey"
                ],
                "additionalProperties": false
            },
            "ListApiKeysResponse": {
                "type": "object",
                "properties": {
                    "apiKeys": {
                        "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)$"
                                },
                                "organizationId": {
                                    "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)$"
                                },
                                "name": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "keyPrefix": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "maskedKey": {
                                    "type": "string",
                                    "minLength": 1
                                },
                                "lastUsedAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "revokedAt": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "createdAt": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organizationId",
                                "name",
                                "keyPrefix",
                                "maskedKey",
                                "lastUsedAt",
                                "revokedAt",
                                "createdAt"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "apiKeys",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "CreateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "subscribed_events": {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "message.queued",
                                "message.sent",
                                "message.delivered",
                                "message.failed",
                                "message.delivery_unconfirmed"
                            ]
                        }
                    }
                },
                "required": [
                    "url",
                    "subscribed_events"
                ],
                "additionalProperties": false
            },
            "CreateWebhookEndpointResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    },
                    "webhookEndpoint": {
                        "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)$"
                            },
                            "organization_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)$"
                            },
                            "url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "subscribed_events": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "enum": [
                                        "message.queued",
                                        "message.sent",
                                        "message.delivered",
                                        "message.failed",
                                        "message.delivery_unconfirmed"
                                    ]
                                }
                            },
                            "status": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "organization_id",
                            "url",
                            "subscribed_events",
                            "status",
                            "created_at",
                            "updated_at"
                        ],
                        "additionalProperties": false
                    },
                    "signingSecret": {
                        "type": "string",
                        "minLength": 1
                    }
                },
                "required": [
                    "success",
                    "webhookEndpoint",
                    "signingSecret"
                ],
                "additionalProperties": false
            },
            "ListWebhookEndpointsResponse": {
                "type": "object",
                "properties": {
                    "webhookEndpoints": {
                        "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)$"
                                },
                                "organization_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)$"
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "subscribed_events": {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "enum": [
                                            "message.queued",
                                            "message.sent",
                                            "message.delivered",
                                            "message.failed",
                                            "message.delivery_unconfirmed"
                                        ]
                                    }
                                },
                                "status": {
                                    "type": "string"
                                },
                                "created_at": {
                                    "type": "string"
                                },
                                "updated_at": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "organization_id",
                                "url",
                                "subscribed_events",
                                "status",
                                "created_at",
                                "updated_at"
                            ],
                            "additionalProperties": false
                        }
                    },
                    "pageInfo": {
                        "type": "object",
                        "properties": {
                            "limit": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                            },
                            "hasMore": {
                                "type": "boolean"
                            },
                            "nextCursor": {
                                "anyOf": [
                                    {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                        ],
                        "additionalProperties": false
                    }
                },
                "required": [
                    "webhookEndpoints",
                    "pageInfo"
                ],
                "additionalProperties": false
            },
            "SuccessResponse": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": true
                    }
                },
                "required": [
                    "success"
                ],
                "additionalProperties": false
            },
            "ErrorResponse": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "string"
                    },
                    "requestId": {
                        "type": "string"
                    }
                },
                "required": [
                    "error",
                    "requestId"
                ],
                "additionalProperties": true
            },
            "ConflictErrorResponse": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "remainingQuota": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        }
                    }
                ]
            },
            "ValidationErrorResponse": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/ErrorResponse"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "issues": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "path": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "path",
                                        "message"
                                    ],
                                    "additionalProperties": false
                                }
                            }
                        }
                    }
                ]
            }
        }
    },
    "x-cutuma": {
        "app_url": "https://cutuma.com",
        "api_base": "https://cutuma.com/api/v1",
        "features_always_on": true,
        "api_enabled": true,
        "webhooks_enabled": true
    }
}

← Retour à la documentation API