Skip to main content
POST
Create a role

Authorizations

x-conveyour-token
string
header
required

Your API key token. Contacts endpoints require a Server-only — Full API key — see Authentication.

Query Parameters

teams[]
string[]

Team scope for the request, as one or more team ObjectIds. The brackets are required: PHP keeps only the last value for a repeated plain key, so teams=A&teams=B silently resolves to B alone. On requests with a JSON body you may send teams (no brackets) in the body instead.

Values that are not valid ObjectIds are silently ignored — a mistyped team ID behaves as if no team was sent. See the teams section of the API conventions guide.

Body

application/json
name
string
required

Human-readable name for the role. Must be unique within the org.

slug
string
required

Machine-friendly identifier for the role. Must be unique within the org and in tag format (lowercase letters, numbers, and underscores).

description
string

A short description of what the role is for.

permissions
string[]

Array of permission keys granted by this role. Invalid keys are stripped. See Permission keys.

source_template
string

Slug of the system template this role was cloned from, if any.

Response

Success.

The common response envelope shared by all ConveYour endpoints.

status
enum<string>

ok on success, failed on error.

Available options:
ok,
failed
message
string

Human-readable description of the result.

data
object

A custom role. Custom roles carry type: "custom" and is_editable: true.