Ugrás a fő tartalomhoz

Telefonszám hozzáadása

POST/api/v1/organizations/telephony-configs/{config_id}/phone-numbers

cURL példa

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

Paraméterek

NévHelyTípusLeírás
config_idkötelezőpathinteger
authorizationheaderobject
X-API-Keyheaderobject

Kérés törzse

application/json
Séma megtekintése
{
  "properties": {
    "address": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Address"
    },
    "country_code": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2,
          "minLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Country Code"
    },
    "label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Label"
    },
    "inbound_workflow_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inbound Workflow Id"
    },
    "telephony_trunk_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Telephony Trunk Id"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active",
      "default": true
    },
    "is_default_caller_id": {
      "type": "boolean",
      "title": "Is Default Caller Id",
      "default": false
    },
    "extra_metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Extra Metadata"
    }
  },
  "type": "object",
  "required": [
    "address"
  ],
  "title": "PhoneNumberCreateRequest",
  "description": "Create a new phone number under a telephony configuration.\n\n``address_normalized`` and ``address_type`` are computed server-side from\n``address`` (and ``country_code`` if PSTN). ``address`` itself is stored\nverbatim for display."
}

Válaszok

200Successful Response
application/json
Séma megtekintése
{
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "telephony_configuration_id": {
      "type": "integer",
      "title": "Telephony Configuration Id"
    },
    "address": {
      "type": "string",
      "title": "Address"
    },
    "address_normalized": {
      "type": "string",
      "title": "Address Normalized"
    },
    "address_type": {
      "type": "string",
      "title": "Address Type"
    },
    "country_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Country Code"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Label"
    },
    "inbound_workflow_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inbound Workflow Id"
    },
    "inbound_workflow_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inbound Workflow Name"
    },
    "telephony_trunk_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Telephony Trunk Id"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active"
    },
    "is_default_caller_id": {
      "type": "boolean",
      "title": "Is Default Caller Id"
    },
    "extra_metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Extra Metadata"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "provider_sync": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ProviderSyncStatus"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "id",
    "telephony_configuration_id",
    "address",
    "address_normalized",
    "address_type",
    "is_active",
    "is_default_caller_id",
    "extra_metadata",
    "created_at",
    "updated_at"
  ],
  "title": "PhoneNumberResponse"
}
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"
}