Examplary
  • Start for free

    Create permission

    Create a new permission for a specific resource, or update the role of an existing actor.

    POST https://api.examplary.ai/permissions/{resource}

    Path parameters

    resourcestringrequired

    The ID of the resource to assign the permission on, e.g. `exam_1234`.

    Request body

    application/json

    Option 1: object

    actorstringrequired

    The ID of the actor to assign the permission to, e.g. `user_1234`, `group_1234` or `org_1234`.

    rolestringrequired

    Allowed values:ownermanagereditorviewerparticipant

    Option 2: object

    emailstring· email· pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$required

    The email of the user to add or invite.

    rolestringrequired

    Allowed values:ownermanagereditorviewerparticipant

    sendInviteboolean· default: false

    Whether to send an invitation email if the user does not exist. Defaults to false.

    Responses

    201 — The created or updated permission.

    application/json
    actorobjectrequired
    rolestringrequired

    Allowed values:ownermanagereditorviewerparticipant

    createdAtstring· date-time· pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$required
    updatedAtstring· date-time· pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$required
    createdBystringrequired

    403 — No access to manage this resource.

    Requirements

    OAuth scopes

    This endpoint requires the permissions:write scope to be present.