Search code examples
twiliotwilio-api

Can all of Flex be configured via an API


I'm looking to configure Twilio Flex only via code without using the UI. However, I'm stuck trying to find out how to enable the dial pad and caller ID details along with a few other settings.

Is everything able to be configured via an API/Terraform?

enter image description here

How can I find out the missing parts.


Solution

  • You can edit this information by Flex Configuration API.

    Follow an example of a request that you can use:

    Request method: POST

    Request URL: https://flex-api.twilio.com/v1/Configuration?UiVersion=1.30.2 (The UiVersion will be the version of your environment, in this example, the version of the Flex is 1.30.2)

    Authentication Type: Basic

    Authentication credentials: accountSid:authToken (accountSid is the username and authToken is the password)

    Request Body:

    {
    "account_sid": "ACXXXX",
    "outbound_call_flows": {
        "default": {
            "workflow_sid": "WWXXXX",
            "enabled": true,
            "queue_sid": "WQXXXX",
            "caller_id": "+551199998888",
            "location": "BR"
        }
    }
    

    I hope that it can help you! :D