Create Delegates

Creates the specified delegate users. The Create Delegates API allows the logged-in user to send delegate requests to one or more users, as specified in the request array. The specified userNames must be valid citizen users. The logged-in user cannot send more than one delegate request to the same userName. For each new delegate, the delegateStatus is set to PENDING. The citizen user receiving the delegate request will need to accept the delegate request (via Update Invitation API) to enable the assigned permissions. If the citizen user rejects the invitation (via Update Invitation API) , the permissions will not take effect; the delegate record remains until it is deleted by the Delete Delegates API.

Resource Information

Scopeusers

Deprecated scope name:   create_citizenaccess_citizens_delegates

App TypeCitizen
Authorization TypeAccess token
URI /v4/citizenaccess/citizens/delegates?lang={lang}
HTTP MethodPOST
Automation Version(s)7.3.3.5.0

Request Information

Field or ParameterTypeRequiredValuesDescriptionAutomation Version
langStringNoIndicates the language applied.7.3.3.5
invitationMessagestringNoThe invitation message sent to the delegate.7.3.3.5
namestringYesThe delegate's nick name.7.3.3.5
permissions[]permissions{}NoContains delegate permission attributes.7.3.3.5
permissions.amendAllowedbooleanNotrue | falseIf true, the delegate is allowed to amend records.7.3.3.5
permissions.createRecordAllowedbooleanNotrue | falseIf true, the delegate is allowed to create records.7.3.3.5
permissions.documentAllowedbooleanNotrue | falseIf true, the delegate is allowed to manage documents.7.3.3.5
permissions.inspectionAllowedbooleanNotrue | falseIf true, the delegate is allowed to manage inspections.7.3.3.5
permissions.levelstringNoMODULE | AGENCY | RECORD_TYPEThe permission level.7.3.3.5
permissions.levelValuestringNoThe value for the permission level, as configured in Automation.7.3.3.5
permissions.paymentAllowedbooleanNotrue | falseIf true, the delegate is allowed to make payments.7.3.3.5
permissions.renewalAllowedbooleanNotrue | falseIf true, the delegate is allowed to renew records.7.3.3.5
permissions.viewRecordAllowedbooleanNotrue | falseIf true, the delegate is allowed to view records.7.3.3.5
userNamestringYesThe delegate's login name.7.3.3.5

Example

Sample Request Head

POST https://apis.accela.com/v4/citizenaccess/citizens/delegates

Sample Request Body

[
  {
    "userName": "apiextuser2@accela.com",
    "name": "testdelegate",
    "invitationMessage": "You are invited.",
    "permissions": [
      {
        "level": "MODULE",
        "levelValue": "Building",
        "viewRecordAllowed": "true",
        "createRecordAllowed": "false",
        "renewalAllowed": "false",
        "inspectionAllowed": "false",
        "documentAllowed": "false",
        "paymentAllowed": "false",
        "amendAllowed": "false"
      }
    ]
  }
]

Response Information

FieldTypeDescriptionAutomation Version
resultresult{}7.3.3.5
result.codestringA code identifying an associated item7.3.3.5
result.idstringThe unique identifier for the object, assigned by the Civic Platform server and provided in a response.7.3.3.5
result.isSuccessbooleanIndicates whether or not the operation on the item is successful. 7.3.3.5
result.messagestringA text message related to the operation.7.3.3.5
statusintegerThe record status.7.3.3.5

Example

Sample Response Body

{
  "status": 200,
  "result": [
    {
      "id": "8775",
      "code": "Success",
      "message": "apiextuser2@accela.com",
      "isSuccess": true
    }
  ]
}