> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plainid.io/llms.txt
> Use this file to discover all available pages before exploring further.
# Import Asset Template
> This API call is designed to support CREATE and UPDATE operations to the indicated Environment. An **import** operation occurs when a *new* `templateId` is used. An **update** operation occurs if the `templateId` *already exists*.
Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.
Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your cURL sample before pasting into your API tool.
| Header | Value | cURL Line |
|---|---|---|
| Accept | `application/json` | `-H "Accept:application/json"` |
| Content-Type | `application/json` | `-H "Content-Type:application/json"` |
In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.
## OpenAPI ````json POST /api/1.0/asset-templates/{envId} { "openapi": "3.0.3", "info": { "title": "Management APIs", "version": "1.0.0", "contact": { "name": "PlainID", "url": "https://plainid.com", "email": "contact@plainid.com" }, "license": { "name": "Commercial", "url": "https://plainid.com/license" }, "termsOfService": "https://www.plainid.com/terms/", "description": "| Region | Base URL |
|---|---|
| United States (US) | https://api.us1.plainid.io |
| Canada (CA) | https://api.ca1.plainid.io |
| Europe (EU) | https://api.eu1.plainid.io |
| Local PAA | https://api.plainid.local |
Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.
Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your cURL sample before pasting into your API tool.
| Header | Value | cURL Line |
|---|---|---|
| Accept | `application/json` | `-H \"Accept:application/json\"` |
| Content-Type | `application/json` | `-H \"Content-Type:application/json\"` |
In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.
", "tags": [ "Asset Template" ], "parameters": [ { "name": "authWsId", "in": "query", "required": "true", "schema": { "type": "string", "format": "uuid" }, "description": "Authorization Workspace ID. This can be found in your Authorization Workspace Settings under Workspace ID." }, { "name": "envId", "in": "path", "required": "true", "schema": { "type": "string", "format": "uuid" }, "description": "The Environment ID can be found under the Details Tab in the Environment Settings." } ], "requestBody": { "description": "Fields to update in the Asset Template", "required": "true", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTemplate" }, "examples": { "example": { "value": { "templateId": "Bank Accounts", "displayName": "Bank Accounts", "description": "This Asset Template describes the bank accounts", "logoUrl": "url", "source": "EXTERNAL", "paaGroupId": "my_paa_group", "viewName": "accounts", "isAttributeSentInRequest": "false", "isUsedForFiltering": "false", "attributes": [ { "attributeId": "accountnum", "displayName": "accountNum", "type": "STRING", "maxLength": "21", "isRequired": "false", "isMultiValue": "false", "canBeUpdated": "ONLY_ON_CREATE", "isAvailableForPolicies": "true", "nameForRequest": "accountNum", "sourceAttribute": "accountNumber" }, { "attributeId": "accounttype", "displayName": "accountType", "type": "STRING", "maxLength": "21", "isRequired": "false", "isMultiValue": "true", "canBeUpdated": "ALWAYS", "isAvailableForPolicies": "true", "nameForRequest": "accountType", "sourceAttribute": "accountType" } ], "actions": [ { "actionId": "Approve", "value": "Approve" }, { "actionId": "Update", "value": "Update123" } ] } } } } } }, "responses": { "201": { "description": "Successful operation", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTemplateResponse" }, "examples": { "example": { "value": { "data": { "templateId": "Bank Accounts", "displayName": "Bank Accounts", "description": "This Asset Template describes the bank accounts", "logoUrl": "url", "source": "EXTERNAL", "paaGroupId": "my_paa_group", "viewName": "accounts", "isAttributeSentInRequest": "false", "isUsedForFiltering": "false", "attributes": [ { "attributeId": "accountnum", "displayName": "accountNum", "type": "STRING", "maxLength": "21", "isRequired": "false", "isMultiValue": "true", "canBeUpdated": "ONLY_ON_CREATE", "isAvailableForPolicies": "true", "nameForRequest": "accountNum", "sourceAttribute": "accountNumber" }, { "attributeId": "accounttype", "displayName": "accountType", "type": "STRING", "maxLength": "21", "isRequired": "false", "isMultiValue": "false", "canBeUpdated": "ALWAYS", "isAvailableForPolicies": "true", "nameForRequest": "accountType", "sourceAttribute": "accountType" } ], "actions": [ { "actionId": "Approve", "value": "Approve" }, { "actionId": "Update", "value": "Update123" } ] } } } } } } }, "400": { "description": "Validation Error", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "validationError": { "$ref": "#/components/examples/missingNameValidation" } } } } }, "401": { "description": "Unauthorized", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } } }, "403": { "description": "Forbidden", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } } }, "404": { "description": "Object not found", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } } }, "422": { "description": "Payload Validation Error", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } } }, "500": { "description": "Internal Server Error", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "The ID of the request" } } } } } } }, "components": { "schemas": { "AssetTemplate": { "type": "object", "description": "Asset Type", "required": [ "templateId", "displayName", "source" ], "properties": { "displayName": { "type": "string", "maxLength": "100", "minLength": "1", "description": "A display name that acts as a label for your Asset Template." }, "templateId": { "type": "string", "maxLength": "128", "minLength": "1", "description": "A unique string for the Asset Template." }, "description": { "type": "string", "description": "A description for your Asset Template." }, "logoUrl": { "type": "string", "description": "Logo URL for the Asset Template." }, "source": { "type": "string", "enum": [ "EXTERNAL", "PLAINID", "REQUEST" ], "description": "Repository type. This parameter refers to the location of your Assets.