Favicon

You are here: Home > API Reference > Workspace > Segment Permission > Update segment permission

Update segment permission

Required Permission: base.organization.segmentPermission.update

Update segment permission

PUT
/v1/organizations/:organizationId/segment-permissions/:permissionId
Copy to clipboard

Update segment permission

Required Permission: base.organization.segmentPermission.update

Update segment permission

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
permissionId string
required
Match pattern: ^[a-fA-F0-9]{24}$
Body Params application/json
name string optional
Human-readable name identifying the segment permission for quick reference in permission management interfaces.
≤ 256 characters
segmentId integer optional
Segment identifier scoping this permission to a specific organizational segment for resource access control.
≥ 0 · ≤ 9007199254740991
users object optional
User targeting configuration combining direct email addresses and group-based matching rules for permission assignment.
emails array [string] required
groups array [array] required
roles array [string] optional
Array of role identifiers assigned to matched users within the segment, determining their access level and capabilities.
actions array [string] optional
Array of permitted action identifiers defining which operations users granted this permission can perform within the segment.
{
    "name": "string",
    "segmentId": 0,
    "users": {
        "emails": [
            "[email protected]"
        ],
        "groups": [
            [
                "string"
            ]
        ]
    },
    "roles": [
        "string"
    ],
    "actions": [
        "string"
    ]
}

Responses

200 Response application/json
status boolean required
data object required
id string required
Unique identifier for the segment permission record within the organization.
Match pattern: ^[a-fA-F0-9]{24}$
name string required
Human-readable name identifying the segment permission for quick reference in permission management interfaces.
≤ 256 characters
description string optional
Detailed explanation of the segment permission purpose, scope, and intended target audience for administrator context.
≤ 256 characters
segmentId integer optional
Segment identifier scoping this permission to a specific organizational segment for resource access control.
≥ 0 · ≤ 9007199254740991
users object required
User targeting configuration combining direct email addresses and group-based matching rules for permission assignment.
emails array [string] required
Array of individual user email addresses directly granted this segment permission for explicit access control.
groups array [array] required
Nested arrays defining AND/OR group matching logic for dynamic user inclusion based on organizational group membership.
roles array [string] optional
Array of role identifiers assigned to matched users within the segment, determining their access level and capabilities.
counts object required
Computed membership statistics providing visibility into how many users are affected by this segment permission.
members number required
Total number of users currently matching the permission targeting criteria and granted access.
unmatchedEmails number required
Number of explicitly targeted email addresses that do not correspond to existing user accounts in the system.
actions array [string] optional
Array of permitted action identifiers defining which operations users granted this permission can perform within the segment.
createdAt string optional
Timestamp indicating when the segment permission was initially created.
updatedAt string optional
Timestamp indicating when the segment permission was last modified.
{
    "status": true,
    "data": {
        "id": "string",
        "name": "string",
        "description": "string",
        "segmentId": 0,
        "users": {
            "emails": [
                "[email protected]"
            ],
            "groups": [
                [
                    "string"
                ]
            ]
        },
        "roles": [
            "string"
        ],
        "counts": {
            "members": 0,
            "unmatchedEmails": 0
        },
        "actions": [
            "string"
        ],
        "createdAt": "string",
        "updatedAt": "string"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}