Share template

patch/v1-beta/template/share

Manage team-level access to a template within an organization. Grant or revoke access for one or more teams in a single request.

Common use cases include:

  • Granting Use access so another team can create documents from the template
  • Granting Edit access so another team can modify the template
  • Revoking previously granted access

How sharing works

Sharing is configured per team:

  • Provide an array of team entries in the request body.
  • Each entry includes a teamId and an action.
  • When action is Grant, accessLevel is required.

The API applies your requested changes to the template's team-sharing configuration.

Actions

  • Grant: Assign an access level to a team.
  • Revoke: Remove a team's access.

Access levels

  • Use: The team can use the template to create documents.
  • Edit: The team can edit the template and also use it to create documents.

Code snippet

The following example shares a template with multiple teams, granting different access levels and revoking access for another team.

curl -X PATCH 'https://api.boldsign.com/v1-beta/template/share?templateId=54e67b1a-af13-4370-91ed-031343170578' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API-KEY}' \
-d '{
    "teams": [
        {
            "teamId": "54e67b1a-af13-4370-91ed-031343170578",
            "action": "Grant",
            "accessLevel": "Edit"
        },
        {
            "teamId": "41b498c3-cbee-488d-8c7c-4dc97a7f31e7",
            "action": "Grant",
            "accessLevel": "Use"
        },
        {
            "teamId": "96d38f94-d636-4215-9f50-ff21d90baba8",
            "action": "Revoke"
        }
    ]
}'
var apiClient = new ApiClient("YOUR_API_KEY");

var templateClient = new TemplateClient(apiClient);

var shareTemplateRequest = new ShareTemplateRequest
{
    Teams =
    [
        new TemplateTeamShare
        {
            TeamId = "54e67b1a-af13-4370-91ed-031343170578",
            Action = TemplateShareAction.Grant,
            AccessLevel = TemplateAccessLevel.Edit
        },
        new TemplateTeamShare
        {
            TeamId = "41b498c3-cbee-488d-8c7c-4dc97a7f31e7",
            Action = TemplateShareAction.Grant,
            AccessLevel = TemplateAccessLevel.Use
        },
        new TemplateTeamShare
        {
            TeamId = "96d38f94-d636-4215-9f50-ff21d90baba8",
            Action = TemplateShareAction.Revoke
        }
    ]
};

templateClient.ShareTemplate("YOUR_TEMPLATE_ID", shareTemplateRequest);

Query parameters

templateIdstringRequiredThe unique identifier of the template to share.

Request body

Provide the list of sharing updates in the teams array.

teamsarray

Array of team sharing configurations. At least one item must be provided.

teamIdstringRequiredThe unique identifier of the team to share the template with.
actionstringRequiredThe action to perform. The available values are Grant and Revoke.
  • Grant: Grants the specified access level to the team
  • Revoke: Revokes the team's access to the template
accessLevelstringThe access level to assign to the team. Required when action is Grant, ignored when action is Revoke. The available values are:
  • Use: Grants use template access
  • Edit: Grants edit and use access

Example response

200 OK

A successful request returns 200 and does not include a response body.

Error responses

400 Bad Request - Team Not Found

One or more team IDs in the request could not be found.

{
    "errorType": "TeamNotFound",
    "error": "Team not found.",
    "teams": ["96d38f94-d636-4215-9f50-ff21d90baba8"]
}

400 Bad Request - Missing Required Target

The request must include a teams array with at least one item.

{
    "errorType": "MissingRequiredTarget",
    "error": "Request must include teams object."
}

403 Forbidden - Permission Denied

The user does not have permission to modify the template's sharing settings.

{
    "errorType": "PermissionDenied",
    "error": "Template does not exists or you do not have permission to modify this template's sharing settings.",
    "templateId": ["96d38f94-d636-4215-9f50-ff21d90baba8"]
}

500 Internal Server Error

An unexpected error occurred while processing the request.

{
    "errorType": "InternalServerError",
    "error": "An unexpected error occurred. Please try again later."
}