younifyd
Menu

Create Role

Create a role

POST/spaces/{spaceId}/roles

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Create Role action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{createRole.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

The name of the role.

descriptionstringrequired

A short description of the role.

permissionsobject

A map of permissions associated with the role.

policiesarray<any>

A map of permissions associated with the role.

json
{
  "name": "Editor",
  "description": "Can edit content but not publish.",
  "permissions": {},
  "policies": [
    null
  ]
}

Response

Returns 201 with an object. Read it in later steps with {{createRole.response.data.<field>}}.

sysobject
namestring

The name of the role.

descriptionstring

A short description of the role.

permissionsobject

A map of permissions associated with the role.

policiesarray<any>

A map of permissions associated with the role.

json
{
  "sys": {},
  "name": "string",
  "description": "string",
  "permissions": {},
  "policies": [
    null
  ]
}

Need more? See the Contentful guide for connection setup and behaviour shared by every action.