Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Update siteId on phone

    Posted 06-05-2025 18:22

    jyubero | 2022-04-06 05:38:09 UTC | #1

    Hello

    I'm trying to update the siteId on phones vía API. The PUT endpoint used is https://api.{{environment}}/api/v2/telephony/providers/edges/phones/:phoneId, but I'm receiving a 400 response bacause I need to pass a "templateId" field in the request body.

    The "templateId" field not exist in schema example that Genesys offers in postman. Please, I need to know the parameter required and format.

    The API Explorer assistant is not correct or it's not showing the required input parameters. I filled the fields for the endpoint PUT /api/v2/telephony/providers/edges/phones/{phoneId}

    and the body generated was the next

    { "id": "a38a0d57-55f8-4842-bd00-07dd2d753e2c", "site": { "id": "1aa4aeff-99b2-490b-b436-c4f14b0c6b7e" }, "phoneBaseSettings": { "id": "8015bca2-8474-4661-b92c-624610ac135a" }, "lines": [ { "id": "b05d6aae-4040-446f-86c6-5558a5d7e2b3", "template": { "id": "d76d735b-5344-4462-a9bf-10f5071f12b5" } } ], "webRtcUser": { "id": "beb9e90d-be5a-42e7-85b4-121363056e6a" } }

    But the response to this request was { "message": "Field 'templateId' is required and cannot be empty.", "code": "general.bad.request", "status": 400, "messageWithParams": "Field '{fieldName}' is required and cannot be empty.", "messageParams": { "fieldName": "templateId" }, "contextId": "28fb7545-96a5-412a-9b97-c4d98719d27f", "details": [ { "errorCode": "REQUIREDFIELDMISSING", "fieldName": "lines[0].templateId" } ], "errors": [] }

    Thanks


    system | 2022-05-07 05:38:11 UTC | #2

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 14190