---
title: "Import Identity Template"
slug: "import-identity-template"
updated: 2026-01-29T09:35:49Z
published: 2026-01-29T09:35:49Z
---

> ## 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 Identity Template

Post/api/1.0/identity-templates/{envId}

This version will be sunset (retired) in June 2026. Refer to [Import Identity Template V2](/apidocs/import-identity-template-v2) to use the newer version.

This API call is designed to support CREATE and UPDATE operations to the indicated Environment. An **import** operation occurs when a *new* `identityAttributeId` is used. An **update** operation occurs if the `identityTemplateId` *already exists* or templateId already in use.

## Notice

Accessing the API call is through a dedicated domain/URL, according to your PlainID Tenant Location**United States (US)** - `https://api.us1.plainid.io`**Canada (CA)** - `https://api.ca1.plainid.io`**Europe (EU)** - `https://api.eu1.plainid.io`   
 

## Using HTML Encoded Special Characters

 

Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this [HTML URL Encoding Reference](https://www.w3schools.com/tags/ref_urlencode.ASP) for a full list.

   

## Important note about headers

 

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.

 

### Headers

 *Required 

| Header | Value | cURL Line |
| --- | --- | --- |
| Accept | `application/json` | `-H "Accept:application/json"` |
| Content-Type | `application/json` | `-H "Content-Type:application/json"` |

   
 

### cURL Sample Guidelines

 

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.

SecurityHTTPType bearer

For more details about Administration API Authentication, check out the Authentication APIs documentation Provide your bearer token in the Authorization header when making requests to protected resources. Example: `Authorization: Bearer 123`

Path parametersenvIdstring (uuid) Required

The Environment ID can be found under the Details Tab in the Environment Settings.

Query parametersidWsIdstring (uuid) Required

Identity Workspace ID. This can be found in your Identity Workspace Settings under Workspace ID.

Body parameters

Identity Template to import.

<select class='api-response-data' aria-label='Media type'><option value='65005821-bd3f-484e-a356-19af50d32908'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='16bc57d4-85c9-4f38-83ab-4a1a95c3da03'>example</option>
</select>example

```json
{
  "templateId": "CaCIdentity",
  "attributes": [
    {
      "attributeId": "userAccount",
      "displayName": "userAccount",
      "description": "user account id",
      "type": "NUMERIC",
      "isAvailableForPolicies": true,
      "nameForRequest": "userAccount",
      "isUsedInAccessRequest": false
    },
    {
      "attributeId": "userRole",
      "displayName": "User Role",
      "description": "user role name",
      "type": "STRING",
      "isAvailableForPolicies": true,
      "nameForRequest": "userRole",
      "isUsedInAccessRequest": false
    }
  ]
}
```

Expand Allobject  

Identity Template

templateIdstring    Required

A unique string for the Identity Template.

Min length1Max length128
attributes Array of object (IdentityAttribute)   object  

Attribute

displayNamestring    Required

A display name that acts as a label for your Attribute.

Min length1Max length100
descriptionstring    

Attribute description.

Min length1Max length200
attributeIdstring    Required

The Attribute ID. This can be found in Identity Settings.

Min length1Max length128
attributeTypestring    

Attribute Data Type

Valid values[
  "STRING",
  "NUMERIC"
]
isAvailableForPoliciesboolean    

Indicates if the Attribute is allowed for Policies.

isUsedInAccessRequestboolean    Required

Indicates if the Attribute is used in an Access Request.

nameForRequeststring    

The name of the Attribute as it should appear in an Authorization Request.

Min length1

Responses201

Successful operation

Headersx-request-idstringThe ID of the request
<select class='api-response-data' aria-label='Media type'><option value='48f7c004-c105-43d4-9c75-8b579db16949'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='55acc451-da06-4f16-9891-a0d2ff66464a'>example</option>
</select>example

```json
{
  "data": {
    "templateId": "CaCIdentity",
    "attributes": [
      {
        "attributeId": "userAccount",
        "displayName": "userAccount",
        "description": "user account id",
        "type": "NUMERIC",
        "isAvailableForPolicies": true,
        "isUsedInAccessRequest": false,
        "nameForRequest": "userAccount"
      },
      {
        "attributeId": "userRole",
        "displayName": "User Role",
        "description": "user role name",
        "type": "STRING",
        "isAvailableForPolicies": true,
        "isUsedInAccessRequest": false,
        "nameForRequest": "userRole"
      }
    ]
  }
}
```

Expand Allobject  

Identity template

dataobject (IdentityTemplate)  

Identity Template

templateIdstring    

A unique string for the Identity Template.

Min length1Max length128
attributes Array of object (IdentityAttribute)   object  

Attribute

displayNamestring    

A display name that acts as a label for your Attribute.

Min length1Max length100
descriptionstring    

Attribute description.

Min length1Max length200
attributeIdstring    

The Attribute ID. This can be found in Identity Settings.

Min length1Max length128
attributeTypestring    

Attribute Data Type

Valid values[
  "STRING",
  "NUMERIC"
]
isAvailableForPoliciesboolean    

Indicates if the Attribute is allowed for Policies.

isUsedInAccessRequestboolean    

Indicates if the Attribute is used in an Access Request.

nameForRequeststring    

The name of the Attribute as it should appear in an Authorization Request.

Min length1

400

Validation Error

Headersx-request-idstringThe ID of the request
<select class='api-response-data' aria-label='Media type'><option value='60cc310b-c7b4-4fb0-ab80-04b5828d0f9f'>application/json</option>
</select><select class='select-example' aria-label='Media type'><option value='4f9827c8-101b-4a63-bc3b-12f0334903ac'>validationError</option>
</select>validationError

```json
{
  "errors": [
    {
      "code": "EMIT-007",
      "id": "EQ7CMX",
      "status": "400",
      "name": "IdentityAttributeUserIdCannotBeEdited",
      "message": "Default Identity Template Attribute ID: [attribueKeyNew] Display name cannot be edited. Hint: Revert back to: [attribueKeyOld]"
    }
  ]
}
```

object  codestring    
messagestring    
detailsstring    

401

Unauthorized

Headersx-request-idstringThe ID of the request

403

Forbidden

Headersx-request-idstringThe ID of the request

404

Object not found

Headersx-request-idstringThe ID of the request

422

Payload Validation Error

Headersx-request-idstringThe ID of the request

500

Internal Server Error

Headersx-request-idstringThe ID of the request
