Skip to content

Create role ​

Creates a role and sets which features it can use.

POST /fieldservicegateway/usermanagement/v3/authorization/create-role

Request ​

FieldTypeRequiredDescription
roleNamestringyesApplication:RoleName, for example Honeycomb:Read
isTechnicianRolebooleanyestrue when people with this role are technicians
roleTypestringnoSA for a service administrator role, or SP for a service provider role
assignFeaturesstring[]noFeatures to grant. Each item is module:level or module/feature:level
unassignFeaturesstring[]noFeatures to remove, in the same form
serviceProviderNumberstringfor a custom roleWhen set, the role belongs to this service provider. Required for ServiceBenchElite

Example ​

json
{
  "roleName": "Honeycomb:Read",
  "isTechnicianRole": false,
  "roleType": "SP",
  "assignFeatures": ["jobmanagement:Read"]
}

cURL ​

bash
curl --request POST 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/authorization/create-role' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: {{x-api-key}}' \
  --header 'Authorization: {{Authorization}}' \
  --header 'Asurion-correlationid: correlation-id' \
  --header 'Asurion-enduser: end-user' \
  --header 'Asurion-sourcesystem: source-system' \
  --header 'Asurion-serviceprovider: company-id' \
  --header 'Asurion-client: default' \
  --data '{
    "roleName": "Honeycomb:Read",
    "isTechnicianRole": false,
    "roleType": "SP",
    "assignFeatures": ["jobmanagement:Read"]
  }'

Response ​

201 Created

json
{
  "success": true,
  "message": "Role definition processed successfully — 1 tuple(s) inserted",
  "data": {
    "tupleCount": 1,
    "tuples": []
  }
}
FieldTypeDescription
successbooleantrue when the role was saved
messagestringWhat changed. If nothing changed, the message says the role was already in the requested state
data.tupleCountnumberHow many permission records were written or removed
data.tuplesarrayThe records that were written or removed

Errors ​

StatusCodeWhen
400VALIDATION_ERRORroleName is not Application:RoleName, or a feature string is the wrong shape
500INTERNAL_ERRORSomething unexpected failed
json
{
  "success": false,
  "error": "roleName must be in format \"Application:RoleName\" (e.g., \"Honeycomb:Honeycomb Read\")",
  "code": "VALIDATION_ERROR",
  "details": {
    "fields": [
      {
        "field": "roleName",
        "message": "Expected format: Application:RoleName",
        "code": "INVALID_FORMAT"
      }
    ]
  },
  "correlationId": "correlation-id",
  "timestamp": "2026-10-16T00:00:00.000Z"
}