{
  "key": "company.dialpad-call",
  "title": "Start a Dialpad call",
  "description": "Ask a Dialpad user to call one exact recipient using their active Dialpad device.",
  "runner": "http",
  "inputs": {
    "type": "object",
    "required": [
      "userId",
      "phone",
      "callerId"
    ],
    "properties": {
      "userId": {
        "type": "integer",
        "minimum": 1,
        "description": "The verified Dialpad user whose devices should ring."
      },
      "phone": {
        "type": "string",
        "pattern": "^\\+[1-9][0-9]{7,14}$",
        "description": "The exact recipient's E.164 phone number."
      },
      "callerId": {
        "type": "string",
        "pattern": "^\\+[1-9][0-9]{7,14}$",
        "description": "The saved Dialpad texting/calling number, assigned to the chosen user or their group."
      }
    }
  },
  "limits": {
    "audience": "customer",
    "allowedOrigins": [
      "https://dialpad.com"
    ]
  },
  "sensitive": [],
  "verification": "Dialpad accepts call initiation. Read original call events or history to confirm connection; acceptance does not prove anyone answered.",
  "request": {
    "method": "POST",
    "origin": "https://dialpad.com",
    "path": "/api/v2/call",
    "auth": {
      "scheme": "bearer",
      "credential": "DIALPAD_API_KEY"
    },
    "body": {
      "user_id": "{{userId}}",
      "phone_number": "{{phone}}",
      "outbound_caller_id": "{{callerId}}"
    },
    "successStatus": [
      200
    ]
  }
}
