---
llm-context: api-documentation
purpose: Assist LLMs and developers with integrating the DoorFlow API API
service: doorflow
version: 3.0
endpoint: POST /api/3/card_template_types
summary: Create card template type
auth: oauth2
format: markdown
updated: 2026-06-14
---

# POST /api/3/card_template_types

Create card template type

Creates a new card template type. The code field must be unique.

## Authentication

This endpoint requires authentication using one of the following methods:

### OAuth 2.0 (Recommended)

Use an OAuth 2.0 access token in the Authorization header. This is the recommended authentication method for all integrations. OAuth provides automatic token expiration, granular permission scopes, detailed usage tracking, and per-integration revocation.

**Required Scopes:** private.card_template_type

**Example:**
```
Authorization: Bearer YOUR_ACCESS_TOKEN
```

## Request Body

### Fields

**`card_template_type`** *object*

### Example

```json
{
  "card_template_type": {
    "code": "string",
    "name": "string",
    "page_size": "string",
    "width_mm": "value",
    "height_mm": "value",
    "orientation_default": "string",
    "non_printable_zones": [
      {
        "label": null,
        "x_mm": null,
        "y_mm": null,
        "width_mm": null,
        "height_mm": null
      }
    ]
  }
}
```

## Responses

### 201 - Card template type created successfully

#### Response Fields

**`code`** *string* - **Required**
Unique identifier for this type
*Example:* `ISO_CARD`

**`name`** *string* - **Required**
Display name
*Example:* `Standard ISO Card`

**`page_size`** *string*
Physical page size category
*Example:* `ISO_CARD`

**`width_mm`** *number*
Physical width in millimetres
*Example:* `85.6`

**`height_mm`** *number*
Physical height in millimetres
*Example:* `54.0`

**`orientation_default`** *string*
Default orientation: P = Portrait, L = Landscape
*Example:* `L`

**`preview_image_url`** *string | null*
URL to a preview image, or null if not set

**`non_printable_zones`** *array&lt;object&gt;*
Non-printable zone definitions

**`created_at`** *string*
When the record was created

**`updated_at`** *string*
When the record was last updated

#### Example Response

```json
{
  "code": "ISO_CARD",
  "name": "Standard ISO Card",
  "page_size": "ISO_CARD",
  "width_mm": 85.6,
  "height_mm": 54.0,
  "orientation_default": "L",
  "preview_image_url": "string",
  "non_printable_zones": [
    {
      "label": "signature_stripe",
      "x_mm": "value",
      "y_mm": "value",
      "width_mm": "value",
      "height_mm": "value"
    }
  ],
  "created_at": "string",
  "updated_at": "string"
}
```

### 401 - Unauthorized - Invalid or missing authentication

#### Response Fields

**`error`** *string*
*Example:* `unauthorized`

**`error_description`** *string*
*Example:* `The access token is invalid`

#### Example Response

```json
{
  "error": "unauthorized",
  "error_description": "The access token is invalid"
}
```

### 403 - Forbidden - User does not have permission

#### Response Fields

**`error`** *string*
*Example:* `forbidden`

**`error_description`** *string*
*Example:* `You are not authorized to access this resource`

#### Example Response

```json
{
  "error": "forbidden",
  "error_description": "You are not authorized to access this resource"
}
```

### 422 - Unprocessable Entity - Validation failed

#### Response Fields

**`error`** *string*
Error message

**`errors`** *object*
Field-specific validation errors

#### Example Response

```json
{
  "error": "string",
  "errors": {
    "value": [
      "string"
    ],
    "credential_type_id": [
      "string"
    ],
    "limit_reached": "You have reached your HID Mobile licence limit. Please contact DoorFlow Support."
  }
}
```

### 500 - Internal Server Error

#### Response Fields

**`error`** *string*
*Example:* `internal_server_error`

**`error_description`** *string*
*Example:* `An unexpected error occurred`

#### Example Response

```json
{
  "error": "internal_server_error",
  "error_description": "An unexpected error occurred"
}
```
