Guests

Assign Role to Guest

POST
Assigns a role to a guest.

Path parameters

guestIdstringRequired
The guest id

Request

This endpoint expects an object.
roleId
stringRequired
Role ID
resourceId
unionRequired

Response

This endpoint returns an object
data
object

Errors

POST
$curl -X POST https://api.x.flatfile.com/v1/guests/%3AguestId/roles \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "roleId": "string",
> "resourceId": "string"
>}'
Response
1{
2 "data": {
3 "id": "string",
4 "roleId": "string",
5 "actorId": "string",
6 "resourceId": "string",
7 "createdAt": "2023-01-01T00:00:00Z",
8 "updatedAt": "2023-01-01T00:00:00Z"
9 }
10}