---
updatedAt: 2026-08-13T23:51:37.000Z
---

# Bulk create roles

Create multiple roles in a single request.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Core API Resources",
    "version": "2.0.0",
    "description": "Buzz API v2"
  },
  "paths": {
    "/roles/bulk": {
      "post": {
        "operationId": "roles_bulk_create",
        "description": "Create multiple roles in a single request.",
        "summary": "Bulk create roles",
        "parameters": [
          {
            "name": "order",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Role"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RoleCreate"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RoleCreate"
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RoleCreate"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "nestSessionAuth": []
          },
          {
            "nestBasicAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRoleList"
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaginatedRoleList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          }
        }
      },
      "Permission": {
        "type": "object",
        "properties": {
          "object_type": {
            "type": "string",
            "description": "The name of the resource, e.g. \"advertiser\" (note, these are singular)"
          },
          "permission": {
            "type": "integer"
          }
        },
        "required": [
          "object_type",
          "permission"
        ]
      },
      "Role": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "nullable": true,
            "description": "The account associated with the role. Defaults to the current account."
          },
          "alternative_id": {
            "type": "string",
            "nullable": true,
            "description": "An ID that may be used for any reporting or administrative purpose. Limited to 191 characters.",
            "maxLength": 200
          },
          "archived": {
            "type": "boolean",
            "default": true,
            "description": "Archived roles cannot add new users"
          },
          "create_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was first created",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          },
          "dashboard_ids": {
            "type": "array",
            "items": {},
            "description": "List of dashboard IDs users associated with this role should be able to access"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique ID of the role"
          },
          "is_system": {
            "type": "boolean",
            "readOnly": true,
            "description": "If true, the role was created by the system and cannot be changed"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true,
            "description": "Free-form notes of up to 255 characters.",
            "maxLength": 255
          },
          "parent_role_id": {
            "type": "integer"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "description": "Object containing resource-level permissions for this Role"
          },
          "report_field_group_ids": {
            "type": "array",
            "items": {},
            "description": "List of report field group IDs users associated with this role should be able to access"
          },
          "report_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of IDs of reports users associated with this role should be able to access. A list of reports may be queried using /reporting/reports."
          },
          "shared_across_accounts": {
            "type": "boolean",
            "default": false
          },
          "update_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was last updated",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          }
        },
        "required": [
          "create_date",
          "id",
          "is_system",
          "name",
          "parent_role_id",
          "update_date"
        ]
      },
      "RoleCreate": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "nullable": true,
            "description": "The account associated with the role. Defaults to the current account."
          },
          "alternative_id": {
            "type": "string",
            "nullable": true,
            "description": "An ID that may be used for any reporting or administrative purpose. Limited to 191 characters.",
            "maxLength": 200
          },
          "archived": {
            "type": "boolean",
            "readOnly": true,
            "default": true,
            "description": "Archived roles cannot add new users"
          },
          "create_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was first created",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          },
          "dashboard_ids": {
            "type": "array",
            "items": {},
            "description": "List of dashboard IDs users associated with this role should be able to access"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique ID of the role"
          },
          "is_system": {
            "type": "boolean",
            "readOnly": true,
            "description": "If true, the role was created by the system and cannot be changed"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true,
            "description": "Free-form notes of up to 255 characters.",
            "maxLength": 255
          },
          "parent_role_id": {
            "type": "integer"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "description": "Object containing resource-level permissions for this Role"
          },
          "report_field_group_ids": {
            "type": "array",
            "items": {},
            "description": "List of report field group IDs users associated with this role should be able to access"
          },
          "report_ids": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of IDs of reports users associated with this role should be able to access. A list of reports may be queried using /reporting/reports."
          },
          "shared_across_accounts": {
            "type": "boolean",
            "default": false
          },
          "update_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was last updated",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          }
        },
        "required": [
          "archived",
          "create_date",
          "id",
          "is_system",
          "name",
          "parent_role_id",
          "update_date"
        ]
      }
    },
    "securitySchemes": {
      "nestBasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Form-based Basic Authentication"
      },
      "nestSessionAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Form-based Basic Authentication"
      }
    }
  },
  "x-explorer-enabled": false,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python",
    "php",
    "java"
  ],
  "servers": [
    {
      "url": "https://{buzz_key}.api.beeswax.com/rest/v2",
      "variables": {
        "buzz_key": {
          "default": "stingersbx",
          "description": "Unique customer ID assigned by the Beeswax"
        }
      }
    }
  ],
  "x-readme": {
    "apply-endpoint-order": true,
    "apply-tag-changes": true
  }
}
```