{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wasync-app/json-schema/wasync-app-create-connection-request-schema.json",
  "title": "CreateConnectionRequest",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wasync-app-openapi.json#/components/schemas/CreateConnectionRequest",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "description": "Optional human-readable label for the connection."
    },
    "country": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$",
      "description": "ISO 3166-1 alpha-2 country of the phone number that will be paired, when you know it. Optional. Lets WASync place the session in that country from the first second; without it the country is taken from the number after pairing. Case-insensitive. Anything that is not two letters is rejected with 400 `{\"error\":\"invalid_request\",\"field\":\"country\"}`. Part of the body compared for `Idempotency-Key`."
    },
    "clientRef": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Optional. Your own id for the END CUSTOMER this number belongs to (e.g. your tenant or account id), when one workspace serves many customers. WASync keeps the numbers of one customer together and isolated from other customers' numbers, and echoes the value back as `clientRef` on GET /connections. Send the same value for every number of the same customer; omit it for your own numbers. Trimmed; 1-128 printable characters, otherwise 400 `{\"error\":\"invalid_request\",\"field\":\"clientRef\"}`. Part of the body compared for `Idempotency-Key`."
    }
  }
}