Upload background image

Uploads or replaces the background image for the specified side.

PUT /api/3/card_templates/{id}/background_image/{side}

Authentication

This endpoint requires authentication:

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. Learn how to obtain an access token.

Header Format:

Authorization: Bearer YOUR_ACCESS_TOKEN

Required Scopes:

private.account.card_template

Parameters

Path Parameters

id integer
Required

Card template ID

side string
Required

Which side of the card

Responses

200

Background image uploaded successfully

Response Fields

id integer required

Server-assigned identifier

eg. 42
uuid string required

Client-generated UUID (RFC 4122)

eg. 550E8400-E29B-41D4-A716-446655440000
name string required

Template display name, unique per account

eg. Staff Card
template_type_code string required

References a template type code

eg. ISO_CARD
card_type string

Card finish/format

eg. standard
double_sided boolean

Whether the card has a reverse side

eg. true
orientation_front string

P = Portrait, L = Landscape

eg. P
orientation_back string

P = Portrait, L = Landscape

eg. L
default_template boolean

Whether this is the account default template

background_image_front_url string | null

URL to the front background image, or null if not set

background_image_back_url string | null

URL to the back background image, or null if not set

template_objects array<object>

Free-form JSONB objects representing layout elements on this template

owner_id integer | null

ID of the user who owns this template, or null if unowned. Set server-side on create. May be reassigned via PATCH by the current owner or by any admin in the account; the new value must be the ID of an admin in the same account.

editable_by string

Who can edit this template

deleted_at string | null

Soft-delete timestamp. Null for live templates. Writable via PATCH: sending a non-null value soft-deletes the template; sending null restores it. Soft-deleted templates are excluded from index by default (see include_deleted).

deleted_by_id integer | null

ID of the user who soft-deleted this template, set server-side from the authenticated user when deleted_at is written. Cleared when deleted_at is cleared.

linked_files array<object>

Files linked to this template (images, fonts, etc.)

created_at string

ISO 8601 UTC timestamp.

updated_at string

ISO 8601 UTC timestamp.

401

Unauthorized - Invalid or missing authentication

Response Fields

error string
eg. unauthorized
error_description string
eg. The access token is invalid
403

Forbidden - User does not have permission

Response Fields

error string
eg. forbidden
error_description string
eg. You are not authorized to access this resource
404

Not Found - Resource does not exist or is not an admission request event

Response Fields

error string
eg. not_found
error_description string
eg. The requested resource was not found
422

Unprocessable Entity - Validation failed

Response Fields

error string

Error message

errors object

Field-specific validation errors

Show child attributes
value array
eg. ["value is already in use on your account", "must be between 4 and 7 digits in length"]

Validation errors for the credential value

credential_type_id array
eg. ["Not found for this account"]

Validation errors for the credential type

limit_reached string
eg. You have reached your HID Mobile licence limit. Please contact DoorFlow Support.

License limit error message

Request

curl -X PUT \
  "https://api.doorflow.com/api/3/card_templates/{id}/background_image/{side}" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

Background image uploaded successfully

{
  "id": 42,
  "uuid": "550E8400-E29B-41D4-A716-446655440000",
  "name": "Staff Card",
  "template_type_code": "ISO_CARD",
  "card_type": "standard",
  "double_sided": true,
  "orientation_front": "P",
  "orientation_back": "L",
  "default_template": false,
  "background_image_front_url": "string",
  "background_image_back_url": "string",
  "template_objects": [
    {}
  ],
  "owner_id": 0,
  "editable_by": "string",
  "deleted_at": "string",
  "deleted_by_id": 0,
  "linked_files": [
    {
      "uuid": "string",
      "entity_type": "string",
      "entity_uuid": "string",
      "file_role": "string",
      "url": "string",
      "content_type": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ],
  "created_at": "string",
  "updated_at": "string"
}