---
title: "API: updateCredential"
slug: "api-updatecredential"
updated: 2023-03-31T14:31:22Z
published: 2023-03-31T14:31:22Z
canonical: "support.smarteru.com/api-updatecredential"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.smarteru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API: updateCredential

- Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
- If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
- Tags are required unless specified.

## Description

The updateCredential method edits an [action](/v1/docs/actions).

[Actions](/v1/docs/actions) were previously referred to *credentials*.  

## Who Has Access

The following users have access to the updateCredential method:

- Users with the [Manage Learning Plans, Certifications, and Requirements](/v1/docs/account-permission-manage-learning-plans-certifications-and-requirements) account permission.
- [Administrators and owners](/v1/docs/user-profile-information#access-level).

## **API Call XML Package**

```markup
<SmarterU>
   <AccountAPI><![CDATA[]]></AccountAPI>
   <UserAPI><![CDATA[]]></UserAPI>
   <Method>updateCredential</Method>
   <Parameters>
      <Credential>
         <Identifier>
            <Name></Name>
               - OR - 
            <ID></ID>
         </Identifier>
         <Name></Name>
         <Status></Status>
         <Description></Description>
         <AllowsAttachments></AllowsAttachments>
         <Expires></Expires>
         <DaysGood></DaysGood>
         <ExpirationDate></ExpirationDate>
         <RecallDays></RecallDays>
         <VisibleToLearners></VisibleToLearners>

         <AddedPrerequisites>
           <LearningModules></LearningModules>
           <Credentials></Credentials>
         </AddedPrerequisites>

         <RemovedPrerequisites>
            <LearningModules></LearningModules>
            <Credentials></Credentials>
         </RemovedPrerequisites>

         <RequiresConfirmation></RequiresConfirmation>
         <ConfirmationAttachments></ConfirmationAttachments>
         <ConfirmationNotification></ConfirmationNotification>

         <Permissions>
            <Types>
               <Type></Type>
            </Types>
         </Permissions>

         <Tags2>
            <Tag2>
               <TagID><![CDATA[]]></TagID>
               - OR -
               <TagName><![CDATA[]]></TagName>
 
               <TagValues><![CDATA[]]></TagValues>
            </Tag2>
         </Tags2> 

         <TrainingCost>
            <Trainer>
               <TrainerID></TrainerID>
                  - OR -
               <TrainerEmail><![CDATA[]]></TrainerEmail>
                  - OR -
               <TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
            </Trainer>
            <LearnerHours></LearnerHours>
            <TrainerHours></TrainerHours>
            <ExtraCostAmount></ExtraCostAmount>
            <ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
         </TrainingCost>

      </Credential>
   </Parameters>
</SmarterU>
```

## **Credential Tag Group**

The Credential tag group is a container for the action's details.

```markup
<Credential>
   <Identifier>
      <Name></Name>
         - OR -
      <ID></ID>
   </Identifier>
   <Name></Name>
   <Status></Status>
   <Description></Description>
   <AllowsAttachments></AllowsAttachments>
   <Expires></Expires>
   <DaysGood></DaysGood>
   <ExpirationDate></ExpirationDate>
   <RecallDays></RecallDays>
   <VisibleToLearners></VisibleToLearners>

   <AddedPrerequisites>
      <LearningModules></LearningModules>
      <Credentials></Credentials>
   </AddedPrerequisites>

   <RemovedPrerequisites>
      <LearningModules></LearningModules>
      <Credentials></Credentials>
   </RemovedPrerequisites>

   <RequiresConfirmation></RequiresConfirmation>
   <ConfirmationAttachments></ConfirmationAttachments>
   <ConfirmationNotification></ConfirmationNotification>

   <Permissions>
      <Types>
         <Type></Type>
      </Types>
   </Permissions>

   <Tags2>
      <Tag2>
         <TagID><![CDATA[]]></TagID>
            - OR -
         <TagName><![CDATA[]]></TagName>
         <TagValues><![CDATA[]]></TagValues>
      </Tag2>
   </Tags2> 

   <TrainingCost>
      <Trainer>
         <TrainerID></TrainerID>
            - OR -
         <TrainerEmail><![CDATA[]]></TrainerEmail>
            - OR -
         <TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
      </Trainer>
      <LearnerHours></LearnerHours>
      <TrainerHours></TrainerHours>
      <ExtraCostAmount></ExtraCostAmount>
      <ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
   </TrainingCost>

</Credential>
```

The Credential tag may contain the following.

The Identifier tag contains the information for the action you want to update. The remaining tags in the Credential tag group specify the updates to the action. 

### **Identifier**

The identifier of the action you want to update. This tag contains the following.

| Tag | Description |
| --- | --- |
| **Name** | The [action's name](/v1/docs/action-main#name). This tag is mutually exclusive with the [ID](https://help.smarteru.com/api-updatecredential$certification_identifier_Id) tag. |
| **ID** | The action's system-generated identifier. This tag is mutually exclusive with the [Name](/v1/docs/api-updatecredential#name-optional) tag. This is the CredentialID returned by the [getCredential](/v1/docs/api-getcredential) method. |

### **Name** (optional)

The [action's name](/v1/docs/action-main#name).

### **Status** (optional)

The [action's status](/v1/docs/action-main#status). Acceptable values are *Active* and *Inactive*.

### **Description** (optional)

The [description of the action](/v1/docs/action-main#description).

### **AllowsAttachments** (optional)

This is tag only required when the [VisibleToLearners tag](/v1/docs/api-updatecredential#visibletolearners-optional) is set to *1*.

Indicates whether learners must upload an attachment with the action in order for it to be accepted. Acceptable values are:

- *Yes* - Learners may upload a file with the action.
- *No* - Learner do not have to upload a file in order for the action to be confirmed.
- *Required* - Learners must upload a file with the action in order for the action to be confirmed.

### Expires (optional)

Indicates whether the [action expires](https://support.smarteru.com/v1/docs/action-expiration#expires). Acceptable values are:

- *0*  - The action doesn't expire.
- *1* - The action expires.

### **DaysGood** (optional)

This tag is only used when the [Expires tag](/v1/docs/api-updatecredential#expires-optional) is set to *1* and you want the action to expire after the specified number of days. The [number of days the action is valid](/v1/docs/action-expiration#this-action-is-valid-for).

### **ExpirationDate** (optional)

This tag is only used when the [Expires tag](/v1/docs/api-updatecredential#expires-optional) is set to *1* and you want the action to expire on a specific date. The [date the action will expire](/v1/docs/action-expiration#this-action-is-valid-until) in D-MMM format.

### **RecallDays** (optional)

This tag is only used when the [Expires tag](/v1/docs/api-updatecredential#expires-optional) is set to *1*. The [number of days prior to the action's expiration when the status will change to *Warning*](/v1/docs/action-expiration#warning-period-should-start).

### **VisibleToLearners** (optional)

Indicates whether the [action is visible to learners](https://help.smarteru.com/action-main-settings$setting_visible_to_learners). Acceptable values are:

- *0*  - The action isn't visible to learners.
- *1* - The action is visible to learners.

### **AddedPrerequisites** (optional)

A container for the [prerequisites](/v1/docs/action-prerequisites) that you want to add to the action. The tag may contain the following:

| Tag | Description |
| --- | --- |
| **LearningModules** | The prerequisite course's system-generated identifier. To specify multiple courses, separate each with a comma. |
| **Credentials** | The prerequisite action's system-generated identifier. To specify multiple actions, separate each with a comma. |

### **RemovedPrerequisites** (optional)

A container for the [prerequisites](/v1/docs/action-prerequisites) that you want to remove from the action. The tag may contain the following:

| Tag | Description |
| --- | --- |
| **LearningModules** | The prerequisite course's system-generated identifier. To specify multiple courses, separate each with a comma. |
| **Credentials** | The prerequisite action's system-generated identifier. To specify multiple actions, separate each with a comma. |

### **RequiresConfirmation** (optional)

Indicates [whether a user other than the learner must confirm the action](https://support.smarteru.com/v1/docs/action-confirmation#requires-confirmation) before its status can be set to Accepted. Acceptable values are:

- *0* - The action doesn't require confirmation.
- *1* - The action requires confirmation.

If you are changing RequiresConfirmation from *0* to *1* and the required permissions were not previously specified, you will also need to include the [Permissions tag.](/v1/docs/api-updatecredential#permissions) 

### ConfirmationAttachments (optional)

This tag is only used when the [RequiresConfirmation tag](/v1/docs/api-updatecredential#requiresconfirmation-optional) is set to *1*.

Indicates whether the user confirming the action must [upload an attachment with the action in order for it to be confirmed](/v1/docs/action-confirmation#allow-confirmation-attachments). Acceptable values are:

- *Yes* - The user confirming the action may upload a file with the action.
- *No* - The user confirming the action does not have to upload a file in order for the action to be confirmed.
- *Required* - The user confirming the action must upload a file with the action in order for the action to be confirmed.

### **ConfirmationNotification** (optional)

This tag is only used when the [RequiresConfirmation tag](/v1/docs/api-updatecredential#requiresconfirmation-optional) is set to *1*.

Indicates whether the Action Confirmation Notification email will be sent to the selected users. Acceptable values are:

- *0*  - The email isn't sent.
- *1*  - The email is sent.

### Permissions

The Permissions tag is a container for the [user types who are able to confirm the action](https://support.smarteru.com/v1/docs/action-confirmation#requires-confirmation-by). Each user type is contained in a Types tag and may contain the following.

| Tag | Description |
| --- | --- |
| **Type** | The type of user who is able to confirm the action. Acceptable values are: - *GM* - Users with the Group Manager group permission. - *SUP* - The learner's supervisor(s). - *MGU* - Users with the Manage Group Users group permission. |

### Tags2 (optional)

A container for the action's tags. Refer to [Tags2 Tag Group](/v1/docs/api-updatecredential#tags2-tag-group).

### TrainingCost (optional)

A container for the action's training cost. Refer to [TrainingCost Tag Group](/v1/docs/api-updatecredential#trainingcost-tag-group).

## Tags2 Tag Group

The Tags2 tag group is a container for the [action's tags](/v1/docs/action-tags). The tags specified will replace any tags already assigned to the action.

```markup
<Tags2>
   <Tag2>
      <TagID><![CDATA[]]></TagID>
         - OR -
      <TagName><![CDATA[]]></TagName> 

      <TagValues><![CDATA[]]></TagValues>
   </Tag2>
</Tags2>
```

Each tag is contained in a Tag2 tag and may contain the following.

### TagID

To obtain a tag's ID:

1. Navigate to the [Tag Management Dashboard](https://support.smarteru.com/docs/tag-management-dashboard).
2. Right click on a tag.
3. Click **Inspect** (or Inspect Element, in some browsers). This displays the Developer Tools in your browser. The tag's ID will be located within the code.

![](https://cdn.document360.io/7efaadab-fef6-4186-806a-2ca14c9ce9ea/Images/Documentation/Tag%20ID%2020211115.png)

If you do not see the code, you may need to view a different tab within your Developer Tools.

### TagName

The [tag's name](https://support.smarteru.com/docs/tag-main#name). The tag must already exist within your SmarterU account. This tag is mutually exclusive with the [TagID tag](/v1/docs/api-updatecredential#tagid).

### TagValues

A comma-separated list of [values for the tag](/v1/docs/tag-pre-defined-values). The allowed values are controlled by the tag's settings.

If no Tag2 tags are included, all existing tags and values assigned to the action will be removed.

## TrainingCost Tag Group

The TrainingCost tag group is a container for the [action's training cost](/v1/docs/action-training-cost). The training cost information specified will replace any training cost information already assigned to the action.

```markup
<TrainingCost>
   <Trainer>
      <TrainerID></TrainerID>
         - OR -
      <TrainerEmail><![CDATA[]]></TrainerEmail>
         - OR -
      <TrainerEmployeeID><![CDATA[]]></TrainerEmployeeID>
   </Trainer>
   <LearnerHours></LearnerHours>
   <TrainerHours></TrainerHours>
   <ExtraCostAmount></ExtraCostAmount>
   <ExtraCostDescription><![CDATA[]]></ExtraCostDescription>
</TrainingCost>
```

## 

The TrainingCost tag may contain the following.

### Trainer

A container for specifying the action's trainer. The trainer must already exist in SmarterU. The Trainer tag must contain one of the following:

| Tag | Description |
| --- | --- |
| **TrainerID** | The trainer's system-generated identifier. |
| **TrainerEmail** | The trainer's email address. |
| **TrainerEmployeeID** | The trainer's employee ID. |

### LearnerHours

The number of hours the learner spends completing this action.

### TrainerHours

The number of hours the selected trainer spends on this action.

### ExtraCostAmount

The amount of any additional cost associated with this action.

### ExtraCostDescription

A description for any additional cost associated with this action.

## **API Response XML Package**

The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-updatecredential#error-codes) tag.

```markup
<SmarterU>
   <Result></Result>
   <Info>
      <Credential><![CDATA[]]></Credential>
      <CredentialID><![CDATA[]]></CredentialID>
   </Info>

   <Errors>
      <Error>
         <ErrorID></ErrorID>
         <ErrorMessage></ErrorMessage>
      </Error>
   </Errors>
</SmarterU>
```

The response may also contain the following.

### **Credential**

The [action's name](/v1/docs/action-main#name).

### **CredentialID**

The action's system-generated identifier.

### Example API Response XML Package

Below is an example of an API response XML package.

```markup
<SmarterU>
   <Result>Success</Result>
   <Info>
      <Credential><![CDATA[In-person Interview]]></Credential>
      <CredentialID><![CDATA[10122]]></CredentialID>
   </Info>

   <Errors>
   </Errors>
</SmarterU>
```

## **Error Codes**

| Error Code | Message |
| --- | --- |
| UC:01 | The identifier provided is invalid. |
| UC:02 | The name provided is invalid. |
| UC:03 | The ID provided is invalid. |
| UC:04 | The status provided is invalid. |
| UC:05 | the description provided is invalid. |
| UC:06 | The allow attachments is invalid. |
| UC:07 | The expires provided is invalid. |
| UC:08 | The days good is invalid. |
| UC:09 | The visible to learner provided is invalid. |
| UC:10 | The learning modules provided is invalid. |
| UC:11 | The credentials provided is invalid. |
| UC:12 | The added prerequisites provided is invalid. |
| UC:13 | The remove prerequisites provided is invalid. |
| UC:14 | the learning modules provided is invalid. |
| UC:15 | The credentials provided is invalid. |
| UC:16 | The requires confirmation provided is invalid. |
| UC:17 | The confirmation attachments provided is invalid. |
| UC:18 | The confirmation notification provided is invalid. |
| UC:19 | The permissions provided is invalid. |
| UC:20 | One or more Learning Modules provided are not valid. |
| UC:21 | One or more Credentials provided are not valid. |
| UC:22 | One or more Learning Modules provided are not valid. |
| UC:23 | One or more Credentials provided are not valid. |
| UC:24 | Type not specified. |
| UC:25 | One or more permission types provided are not valid. Only GM, MGU, and SUP are allowed values. |
| UC:26 | Credential name cannot be used. |
| UC:27 | Credential ID cannot be used. |
| UC:28 | The required permissions are not met to call the createCredential method. |
| UC:29 | Days good should not be greater than recall days. |
| UC:30 | The allows attachments provided is not valid. Only NO, YES or REQUIRED are allowed values. |
| UC:31 | The confirmation attachments provided is not valid. Only NO, YES or REQUIRED are allowed values. |
| UC:32 | The recall days is invalid. |
| UC:33 | It was not possible to inactivate this action as it is prerequisite of another action. |
| UC:34 | Permissions are required when requires confirmation is 1. |
| UC:35 | The required permissions are not met to call the createCredential method. |
| UC:36 | The requested credential does not exist. |
| UC:37 | The status provided is not valid. Only ACTIVE or INACTIVE are allowed values. |
| UC:38 | Either DaysGood or ExpirationDate can be provided. |
| UC:40 | One or more tags do not exist in the provided account. |
| UC:41 | All tags provided must have at least one value. |
| UC:42 | Values must be from the pre-defined list specified for the tag. |
| UC:43 | The training cost provided is invalid. |
| UC:44 | The trainer provided is invalid. |
| UC:45 | The trainer ID provided is invalid. |
| UC:46 | The trainer email provided is invalid. |
| UC:47 | The trainer employee ID provided is invalid. |
| UC:48 | The learner hours provided is invalid. |
| UC:49 | The trainer hours provided is invalid. |
| UC:50 | The extra cost amount provided is invalid. |
| UC:51 | The extra cost description provided is invalid. |
| UC:52 | The trainer does not exist. |

## Related

- [Actions](/actions.md)
- [API: createCredential](/api-createcredential.md)
- [API: getCredential](/api-getcredential.md)
- [API: listCredentials](/api-listcredentials.md)
- [Editing an Action](/editing-an-action.md)
