Creating a role

POST https://{{base_url}}/v6/roles/new.json

Creating a role

Allows creation of a role, programmatically.

Optional (querystring) Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={aid} optional, changes the account group context of the current request. If an invalid account group ID is specified as a parameter, the response will come back as an HTTP/400 error

Request

  • content-type and accept headers must be set (both to application/json) when using this endpoint.
  • Request body should contain the following fields:
    • roleName string required the name of the role
    • permissions list of permission objects optional see below
    • permissions.permissionId integer required for permissions object system-defined unique ID of the permission

A few notes on the topic of role creation: * Post with a role name, and permissions that need to be assigned to the role. * Permission definitions and details can be obtained from the permissions endpoint.

Request Body

{"roleName"=>"Postman DevNet role", "permissions"=>[{"permissionId"=>1}, {"permissionId"=>2}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring