curl --request POST \
--url http://{defaultHost}/api/v2/platform/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"role": {
"name": "vendor"
}
}'
{
"data": {
"id": "5",
"type": "role",
"attributes": {
"name": "Role 5",
"created_at": "2022-11-08T19:35:07.110Z",
"updated_at": "2022-11-08T19:35:07.110Z"
}
}
}
Creates a Role
curl --request POST \
--url http://{defaultHost}/api/v2/platform/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"role": {
"name": "vendor"
}
}'
{
"data": {
"id": "5",
"type": "role",
"attributes": {
"name": "Role 5",
"created_at": "2022-11-08T19:35:07.110Z",
"updated_at": "2022-11-08T19:35:07.110Z"
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Record created
The response is of type object
.
Was this page helpful?