# Create "app" configuration and 'custom dimension" only with one codevia Piwik Pro API

**URL:** <https://community.piwik.pro/t/create-app-configuration-and-custom-dimension-only-with-one-codevia-piwik-pro-api/2061>\
**Category:** API & integrations\
**Created:** [April 24, 2023, 9:55am UTC](https://community.piwik.pro/t/create-app-configuration-and-custom-dimension-only-with-one-codevia-piwik-pro-api/2061 "2023-04-24T09:55:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [April 24, 2023, 9:55am UTC](https://community.piwik.pro/t/create-app-configuration-and-custom-dimension-only-with-one-codevia-piwik-pro-api/2061/1 "2023-04-24T09:55:58Z")

</div>

Hello the Piwik Pro Team and the Piwik Community,

I’m a newbee in the use of the API.  
I would like to know if it’s possible to create a new “app” configuration and also 'custom dimensions" only with one code via Piwik Pro API ?  
If so do you provide some examples please ?

Thanks in advance for your kindly support.  
Kind regards,  
Sébastien

---

<div class="post-metadata">

**Author:** ![pwachala](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/pwachala/32/315_2.png) [@pwachala](https://community.piwik.pro/u/pwachala)\
**Post date:** [April 24, 2023, 1:24pm UTC](https://community.piwik.pro/t/create-app-configuration-and-custom-dimension-only-with-one-codevia-piwik-pro-api/2061/2 "2023-04-24T13:24:02Z")

</div>

Hey Sébastien,  
you would need to use 2 API calls here: one to create a new App and one to create custom dimensions.

To create a new App you can use [`/api/apps/v2`](https://developers.piwik.pro/en/latest/platform/authorized_api/apps/apps_api.html#operation/api_app_add_v2) endpoint.  
As you can see in our documentation, the required attributes are `name` and `urls`. On the right, you can expand the sample request or you can use the one below:

```auto
{
    "data": {
        "type": "ppms/app",
        "attributes": {
            "name": "New App",
            "urls": [
                "https://example.com"
            ]
        }
    }
}

```

To create custom dimensions you’d need to use [`/api/analytics/v1/manage/custom-dimensions/`](https://developers.piwik.pro/en/latest/custom_reports/object_management_api/object_management_api.html#tag/Custom-Dimensions/paths/~1api~1analytics~1v1~1manage~1custom-dimensions~1/post) endpoint. Again, you can also see a sample request on the right. Please remember to change the `website_id` to the one that you got from creating a new app.

---

<div class="post-metadata">

**Author:** ![spujade](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/spujade/32/1453_2.png) [@spujade](https://community.piwik.pro/u/spujade)\
**Post date:** [April 24, 2023, 1:26pm UTC](https://community.piwik.pro/t/create-app-configuration-and-custom-dimension-only-with-one-codevia-piwik-pro-api/2061/3 "2023-04-24T13:26:22Z")

</div>

Hi @pwachala many than ks for your kindly support & great suggestion.

Have a lovely day. Kind regards, Sébastien
