def create(name, api_permissions, playbook_permissions, client):
    """Create new role in Decapod."""

    permissions = [
        {"name": "api", "permissions": api_permissions},
        {"name": "playbook", "permissions": playbook_permissions}
    ]

    return client.create_role(name, permissions)