> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update the license pool for a workspace

> Create or update the license pool for a workspace

## OpenAPI

````json PUT /v1/teams/{team_id}/workspaces/{workspace_uuid}/license-pool
{
  "openapi": "3.0.3",
  "info": {
    "title": "Management API Reference",
    "version": "2.0.0",
    "description": "API Documentation for the Supermetrics Management API. For more information, visit https://supermetrics.com.",
    "termsOfService": "https://supermetrics.com/terms-of-service",
    "contact": {
      "name": "Supermetrics Suppot",
      "email": "support@supermetrics.com",
      "url": "https://supermetrics.com/support"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "x-api-id": "sm-management-api",
    "x-audience": "public"
  },
  "servers": [
    {
      "url": "https://api.supermetrics.com/v2",
      "description": "Global production public Supermetrics Management API base path.",
      "x-internal": "false"
    },
    {
      "url": "https://api.supermetrics.com",
      "description": "Global production public Supermetrics API base path (for Connector Builder and Team endpoints).",
      "x-internal": "false"
    }
  ],
  "tags": [
    {
      "name": "API Keys",
      "description": "Manage API keys to access Supermetrics API"
    },
    {
      "name": "Saved Queries",
      "description": "Manage queries saved in Query Manager"
    },
    {
      "name": "Datasources",
      "description": "Retrieve datasource configuration details"
    },
    {
      "name": "Data Source Logins",
      "description": "Access your data source authentications and login links"
    },
    {
      "name": "Custom Fields",
      "description": "Create and manage Custom Fields"
    },
    {
      "name": "Account Tags",
      "description": "Group data source accounts into reusable tags"
    },
    {
      "name": "Data Blending",
      "description": "Create and manage Data Blending"
    },
    {
      "name": "Connector Builder",
      "description": "Create and manage custom connectors, including their secrets, logos, logs, and schemas"
    },
    {
      "name": "Teams",
      "description": "View and update team details"
    },
    {
      "name": "Team Users",
      "description": "Manage members and invitations for your team"
    },
    {
      "name": "Team Licenses",
      "description": "Assign and manage your team's licenses"
    },
    {
      "name": "Team Settings",
      "description": "Configure general settings for your team"
    },
    {
      "name": "Workspaces",
      "description": "Create and manage workspaces, their members, and license pools"
    },
    {
      "name": "Data Transfers",
      "description": "Create, configure, and manage Data Warehouse transfers, their runs, backfills, and data source connections"
    },
    {
      "name": "Data Destinations",
      "description": "Create, configure, and manage Data Warehouse destinations"
    },
    {
      "name": "Table Groups",
      "description": "Manage your team's table groups"
    }
  ],
  "externalDocs": {
    "description": "Find out more about Supermetrics Management API",
    "url": "https://docs.supermetrics.com/apidocs/management-api"
  },
  "paths": {
    "/v1/teams/{team_id}/workspaces/{workspace_uuid}/license-pool": {
      "servers": [
        {
          "url": "https://api.supermetrics.com",
          "description": "production server",
          "x-internal": "false"
        }
      ],
      "put": {
        "summary": "Create or update the license pool for a workspace",
        "description": "Create or update the license pool for a workspace",
        "operationId": "upsertWorkspaceLicensePool",
        "security": [
          {
            "ApiKeyAuth": [
              "license_pool_write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "path",
            "required": "true",
            "description": "The ID of the team",
            "example": "936506",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": "1",
              "maximum": "9223372036854776000"
            }
          },
          {
            "name": "workspace_uuid",
            "in": "path",
            "required": "true",
            "description": "UUID of the workspace associated with the license pool",
            "example": "71bc0582-31b5-11f1-a55c-4201ac182030",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": "36",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          }
        ],
        "requestBody": {
          "required": "true",
          "description": "License pool configuration",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "destinations",
                  "data_sources",
                  "total_number_of_users",
                  "max_accounts_per_data_source",
                  "start_date",
                  "end_date"
                ],
                "properties": {
                  "destinations": {
                    "type": "array",
                    "description": "Destinations to include in the license pool",
                    "maxItems": "50",
                    "example": [
                      "google_sheets",
                      "excel"
                    ],
                    "items": {
                      "type": "string",
                      "maxLength": "255",
                      "pattern": "^.+"
                    }
                  },
                  "data_sources": {
                    "type": "array",
                    "description": "Data sources to include in the license pool",
                    "maxItems": "100",
                    "example": [
                      "GA4",
                      "GADS"
                    ],
                    "items": {
                      "type": "string",
                      "maxLength": "255",
                      "pattern": "^.+"
                    }
                  },
                  "total_number_of_users": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": "1",
                    "maximum": "9223372036854776000",
                    "description": "Total number of users for the license pool",
                    "example": "10"
                  },
                  "max_accounts_per_data_source": {
                    "type": "integer",
                    "format": "int64",
                    "minimum": "1",
                    "maximum": "9223372036854776000",
                    "description": "Maximum number of accounts per data source",
                    "example": "5"
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date",
                    "maxLength": "10",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Start date of the license pool in YYYY-MM-DD format",
                    "example": "2026-01-01"
                  },
                  "end_date": {
                    "type": "string",
                    "format": "date",
                    "maxLength": "10",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "End date of the license pool in YYYY-MM-DD format",
                    "example": "2026-12-31"
                  }
                }
              },
              "example": {
                "destinations": [
                  "google_sheets",
                  "excel"
                ],
                "data_sources": [
                  "GA4",
                  "GADS"
                ],
                "total_number_of_users": "10",
                "max_accounts_per_data_source": "5",
                "start_date": "2026-01-01",
                "end_date": "2026-12-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "License pool created or updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicensePoolResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid or missing parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — token is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity — request failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableEntityError"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests - rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerError"
                }
              }
            }
          }
        },
        "tags": [
          "Workspaces"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "LicensePoolResponse": {
        "type": "object",
        "description": "Response envelope containing license pool data",
        "properties": {
          "meta": {
            "type": "object",
            "description": "Response metadata",
            "example": {},
            "properties": {
              "request_id": {
                "type": "string",
                "maxLength": "36",
                "pattern": "^[A-Za-z0-9_-]+",
                "description": "Unique ID of the request",
                "example": "RfNUgKPReZtgmzkqAFe4ArjuCQXQuaRr"
              }
            }
          },
          "data": {
            "$ref": "#/components/schemas/LicensePoolData"
          }
        }
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Bad request error"
          },
          "code": {
            "type": "string",
            "enum": [
              "BAD_REQUEST"
            ],
            "description": "BAD_REQUEST"
          }
        }
      },
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Unauthorized access"
          },
          "code": {
            "type": "string",
            "enum": [
              "UNAUTHORIZED"
            ],
            "description": "UNAUTHORIZED"
          }
        }
      },
      "PermissionError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Permission error"
          },
          "code": {
            "type": "string",
            "enum": [
              "PERMISSION_ERROR"
            ],
            "description": "PERMISSION_ERROR"
          }
        }
      },
      "NotFoundError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Not found"
          },
          "code": {
            "type": "string",
            "enum": [
              "NOT_FOUND"
            ],
            "description": "NOT_FOUND"
          }
        }
      },
      "UnprocessableEntityError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Validation failed for the request parameters"
          },
          "code": {
            "type": "string",
            "enum": [
              "UNPROCESSABLE_ENTITY"
            ],
            "description": "UNPROCESSABLE_ENTITY"
          }
        }
      },
      "TooManyRequestsError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Too many requests"
          },
          "code": {
            "type": "string",
            "enum": [
              "TOO_MANY_REQUESTS"
            ],
            "description": "TOO_MANY_REQUESTS"
          }
        }
      },
      "InternalServerError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "maxLength": "255",
            "pattern": "^.+$",
            "description": "Internal server error"
          },
          "code": {
            "type": "string",
            "enum": [
              "INTERNAL_SERVER_ERROR"
            ],
            "description": "INTERNAL_SERVER_ERROR"
          }
        }
      },
      "LicensePoolData": {
        "type": "object",
        "description": "License pool resource",
        "properties": {
          "workspace_id": {
            "type": "integer",
            "format": "int64",
            "minimum": "1",
            "maximum": "9223372036854776000",
            "description": "Internal identifier of the workspace",
            "example": "1"
          },
          "destinations": {
            "type": "array",
            "maxItems": "50",
            "description": "Destinations included in the license pool",
            "example": [
              "google_sheets"
            ],
            "items": {
              "type": "string",
              "maxLength": "255",
              "pattern": "^.+"
            }
          },
          "data_sources": {
            "type": "array",
            "maxItems": "100",
            "description": "Data sources included in the license pool",
            "example": [
              "GA"
            ],
            "items": {
              "type": "string",
              "maxLength": "255",
              "pattern": "^.+"
            }
          },
          "total_number_of_users": {
            "type": "integer",
            "format": "int64",
            "minimum": "1",
            "maximum": "9223372036854776000",
            "description": "Total number of users allowed in the license pool",
            "example": "50"
          },
          "max_accounts_per_data_source": {
            "type": "integer",
            "format": "int64",
            "minimum": "1",
            "maximum": "9223372036854776000",
            "description": "Maximum number of accounts allowed per data source",
            "example": "10"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "maxLength": "10",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Start date of the license pool in YYYY-MM-DD format",
            "example": "2025-01-01"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "maxLength": "10",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "End date of the license pool in YYYY-MM-DD format",
            "example": "2026-12-31"
          },
          "license_features": {
            "type": "array",
            "maxItems": "100",
            "description": "Additional license features enabled for the pool",
            "example": [],
            "items": {
              "type": "string",
              "maxLength": "255",
              "pattern": "^.+"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API_KEY",
        "description": "API key authentication. Create API keys in the Supermetrics Hub and send\nthem in the Authorization header:\n`Authorization: Bearer <your-api-key>`\n"
      }
    }
  }
}
````

