---
title: "POST /v1/{+parent}/queryTemplates"
method: POST
path: "/v1/{+parent}/queryTemplates"
tags: ["projects"]
---

# POST /v1/{+parent}/queryTemplates

`POST /v1/{+parent}/queryTemplates`

Creates a new QueryTemplate

## Path parameters

- `parent` string, required

## Query parameters

- `queryTemplateId` string

## Request body

- QueryTemplate — A query template is a container for sharing table-valued functions defined by contributors in a data clean room.
  - `updateTime` string, google-datetime — Output only. Timestamp when the QueryTemplate was last modified.
  - `documentation` string — Optional. Documentation describing the QueryTemplate.
  - `displayName` string — Required. Human-readable display name of the QueryTemplate. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
  - `routine` Routine — Represents a bigquery routine.
    - `routineType` 'ROUTINE_TYPE_UNSPECIFIED' | 'TABLE_VALUED_FUNCTION' — Required. The type of routine.
    - `definitionBody` string — Optional. The definition body of the routine.
  - `proposer` string — Optional. Will be deprecated. Email or URL of the primary point of contact of the QueryTemplate. Max Length: 1000 bytes.
  - `name` string — Output only. The resource name of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/456`
  - `primaryContact` string — Optional. Email or URL of the primary point of contact of the QueryTemplate. Max Length: 1000 bytes.
  - `state` 'STATE_UNSPECIFIED' | 'DRAFTED' | 'PENDING' | 'DELETED' | 'APPROVED' — Output only. The QueryTemplate lifecycle state.
  - `description` string — Optional. Short description of the QueryTemplate. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
  - `createTime` string, google-datetime — Output only. Timestamp when the QueryTemplate was created.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/analyticshub.md) · [All operations](https://skmtc.dev/google/apis/analyticshub/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/analyticshub/revisions/64724ad4013d/schema)
