POST
/v1/organizations/:organizationId/segment-roles/
Copy to clipboard
Create segment role
Required Permission: base.organization.segmentRole.create
Create segment role
Request
Add parameter in header
authorization
Example:
Authorization: Bearer <token>
organizationId
string
required
Body Params
application/json
name
string
required
actions
array [string]
required
{
"name": "string",
"actions": [
"string"
]
}
Responses
200 Response
application/json
status
boolean
required
data
object
required
id
string
required
name
string
required
slug
string
required
actions
array [string]
required
{
"status": true,
"data": {
"id": "string",
"name": "string",
"slug": "string",
"actions": [
"string"
]
}
}
400 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 5209,
"message": "Invalid input"
}
}
401 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
404 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}