Ugrás a fő tartalomhoz

Konfiguráció létrehozása

POST/api/v1/organizations/telephony-configs

Create a new telephony configuration for the org.

cURL példa

curl -X POST \
  'https://app.intracord.hu/api/v1/organizations/telephony-configs' \
  -H "X-API-Key: $INTRACORD_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json

Paraméterek

NévHelyTípusLeírás
authorizationheaderobject
X-API-Keyheaderobject

Kérés törzse

application/json
Séma megtekintése
{
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Name"
    },
    "is_default_outbound": {
      "type": "boolean",
      "title": "Is Default Outbound",
      "default": false
    },
    "config": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/ARIConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/CloudonixConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/ExotelConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/PlivoConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/TelnyxConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/TwilioConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/VobizConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/VonageConfigurationRequest"
        }
      ],
      "title": "Config",
      "discriminator": {
        "propertyName": "provider",
        "mapping": {
          "ari": "#/components/schemas/ARIConfigurationRequest",
          "cloudonix": "#/components/schemas/CloudonixConfigurationRequest",
          "exotel": "#/components/schemas/ExotelConfigurationRequest",
          "plivo": "#/components/schemas/PlivoConfigurationRequest",
          "telnyx": "#/components/schemas/TelnyxConfigurationRequest",
          "twilio": "#/components/schemas/TwilioConfigurationRequest",
          "vobiz": "#/components/schemas/VobizConfigurationRequest",
          "vonage": "#/components/schemas/VonageConfigurationRequest"
        }
      }
    }
  },
  "type": "object",
  "required": [
    "name",
    "config"
  ],
  "title": "TelephonyConfigurationCreateRequest",
  "description": "Body for ``POST /telephony-configs``.\n\n``config`` carries the provider-specific credential fields (the same\ndiscriminated union used by the legacy single-config endpoint). Any\n``from_numbers`` on the inner config are ignored — phone numbers are\nmanaged via the dedicated phone-numbers endpoints."
}

Válaszok

200Successful Response
application/json
Séma megtekintése
{
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "provider": {
      "type": "string",
      "title": "Provider"
    },
    "connectivity": {
      "type": "string",
      "enum": [
        "api",
        "sip"
      ],
      "title": "Connectivity",
      "default": "api"
    },
    "is_default_outbound": {
      "type": "boolean",
      "title": "Is Default Outbound"
    },
    "inactive": {
      "type": "boolean",
      "title": "Inactive",
      "default": false
    },
    "inactive_since": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inactive Since"
    },
    "inactive_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inactive Reason"
    },
    "credentials": {
      "additionalProperties": true,
      "type": "object",
      "title": "Credentials"
    },
    "sip_connectivity": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/SIPConnectivityDetails"
        },
        {
          "type": "null"
        }
      ]
    },
    "setup_checklist": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ProviderSetupChecklist"
        },
        {
          "type": "null"
        }
      ]
    },
    "supports_trunks": {
      "type": "boolean",
      "title": "Supports Trunks",
      "default": false
    },
    "trunks": {
      "items": {
        "$ref": "#/components/schemas/TrunkResponse"
      },
      "type": "array",
      "title": "Trunks"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "provider",
    "is_default_outbound",
    "credentials",
    "created_at",
    "updated_at"
  ],
  "title": "TelephonyConfigurationDetail",
  "description": "Body of ``GET /telephony-configs/{id}`` — credentials are masked."
}
404Not found
422Validation Error
application/json
Séma megtekintése
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}