Site Access & Permissions

Granting Site Access to a Client

Team members have access to all sites in an organization. Client accounts, in comparison, are granted access on a site-by-site basis. A client may have access to a single site or many sites within your organization, and an individual site may be accessible to one or more clients. This access is given either directly through the Duda client management page, or by using the Duda Partner API.

The grant access endpoint requires both the account_name associated with the client and the site_name property assigned to a Duda website as path parameters. You are also able to supply a list of permissions which describe the level of access the client will be given when editing the specified site.

To grant access via the API, create or select an existing client member from the client management page. Note the value in the Email address field. This will be the account_name needed for the call. Next create or select an existing site from the site dashboard. While editing the site, note the unique site name located in the URL bar of the browser e.g., https://my.duda.co/home/site/**site_name**. Substitute your values in the example below along with your [Duda API key and password]https://developer.duda.co/reference/getting-started-with-the-duda-api).

curl -S -u 'APIusername:APIpassword' \
-H 'Content-Type: application/json' \
-X POST \
-k https://api.duda.co/api/accounts/[email protected]/sites/146856ab/permissions \
-d '{"permissions":["EDIT","DEV_MODE","STATS_TAB"]}'

You can always view what permissions a client has on a given site by making a get permissions API call as illustrated below. Substituting your own values for the account and site name within the URL path.

curl -S -u 'APIusername:APIpassword' \
-H 'Content-Type: application/json' \
-X GET \
-k https://api.duda.co/api/accounts/[email protected]/sites/146856ab/permissions

It is important to note that some permissions are dependent on other permissions being present. For example, you cannot grant a client access to a site's DEV_MODE if they do not have the EDIT permission defined. You can find a list of all possible permissions, along with any dependencies, within our API reference.

Team Member Permissions & Site Access

Team Members have access to all sites under your Duda account. Currently there is not a way to allow a team member access to a subset of sites. You are able to manage what permissions a team member has for all sites. This can be done via the Duda dashboard or using the Duda Partner API.