> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Activate a smart credential

`PUT /api/web/v1/smartcredentials/{id}/activate`

Activate the specified smart credential. Caller requires the SMARTCREDENTIALS:EDIT permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| id | path | Yes | string | The UUID of the smart credential to be activated. |

## Request Body

Required.

### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "additionalUserInfo": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "description": "A map which consists of additional attributes and values to be used for smart credential encoding. Currently the only value that is supported is the value with name \"photo\" where the value is a Base-64 encoded JPEG or PNG image or a data URL of the form \"data:image/<type>;base64,<data>\" where <type> is jpeg or png and <data> is a Base-64 encoded JPEG or PNG image."
      },
      "description": "A map which consists of additional attributes and values to be used for smart credential encoding. Currently the only value that is supported is the value with name \"photo\" where the value is a Base-64 encoded JPEG or PNG image or a data URL of the form \"data:image/<type>;base64,<data>\" where <type> is jpeg or png and <data> is a Base-64 encoded JPEG or PNG image."
    },
    "deliverActivationEmail": {
      "type": "boolean",
      "description": "A flag indicating if the activation email should be delivered to the user.  If not set, it defaults to false."
    },
    "mobile": {
      "type": "boolean",
      "description": "A flag indicating if the target is mobile smart credential."
    },
    "requirePassword": {
      "type": "array",
      "description": "A list of which activation types (LINK or QRCODE) should use a random password to encrypt the activation information. If the list is null or empty, QRCODE activation will require a password and LINK will not.",
      "items": {
        "type": "string",
        "description": "A list of which activation types (LINK or QRCODE) should use a random password to encrypt the activation information. If the list is null or empty, QRCODE activation will require a password and LINK will not.",
        "enum": [
          "LINK",
          "QRCODE"
        ]
      }
    },
    "type": {
      "type": "array",
      "description": "A list of activation types (LINK or QRCODE) to perform.  If the list is null or empty, all activation types are performed",
      "items": {
        "type": "string",
        "description": "A list of activation types (LINK or QRCODE) to perform.  If the list is null or empty, all activation types are performed",
        "enum": [
          "LINK",
          "QRCODE"
        ]
      }
    }
  },
  "description": "Parameters for the smart credential activation.",
  "title": "ActivateSmartCredentialParms"
}
```

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "activationPassword": {
      "type": "string",
      "description": "If either the QR Code URL or the Link URL were password protected, the password needed to unprotect them."
    },
    "linkHttpURL": {
      "type": "string",
      "description": "The HTTP version of the link activation URL"
    },
    "linkURL": {
      "type": "string",
      "description": "The link activation URL"
    },
    "qrCode": {
      "type": "string",
      "description": "Base-64 encoded activation QR Code"
    },
    "qrCodeURL": {
      "type": "string",
      "description": "The activation URL encoded into the QR Code"
    }
  },
  "description": "Information returned from the activate smart credential operation.",
  "title": "ActivateSmartCredentialResult"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "SMARTCREDENTIALS:EDIT"
    ]
  }
]
```
