Users

Users in VEO belong to one or many organisations and each organisation they have a role. Here we will look at how to invite members to your organisation via the API and manage them once they're there.

Roles

Some roles are reserved for VEO team members and so for the most part, a user in your organisation will have one of two roles:

IdRoleDescription
4UserMost users in VEO. This allows user to upload and share video, be members of groups, create tag sets and tag videos and comment on videos of their own or that have been shared with them
2Organisation AdminThis role allows users to do all of the things a user can do but it also allows them to invite other people to the organisation and manage user accounts within an organisation.

Some organisational structures are broken into sites which have a more granular level of video sharing and these may have an additional role as seen below:

IdRoleDescription
8Site adminAllows the sharing of video across sites

POST/userinvites/multiple

Invite users

This endpoint allows you to invite one or multiple users to your organisation and is the simplest and most effective way of inviting users.

When you submit users to this endpoint they will receive an email depending on their scenario:

  • If they are already a VEO user in another organisation they will be given new rights in your organisation and be sent an email to that effect.
  • If they are not yet a VEO user then they will be sent an email with a link allowing them to accept the invite and create their profile.
  • If they are already a member of your organisation and you've added the "IsOrgAdmin" flag to their account then they'll receive an email telling them they have new rights.

JSON Attributes of Invite model

  • Name
    OrganisationId
    Type
    string
    Description

    The identity of the organisation you're adding to. This must be an organisation that you are an administrator of. If you don't know your organisation ID you can get this from the /me endpoint

  • Name
    Users
    Type
    User[]
    Description

    An array of the users to add.

JSON Attributes of User model.

  • Name
    Email
    Type
    string
    Description

    The email address of the user

  • Name
    IsOrgAdmin
    Type
    boolean
    Description

    Set to true if you wish to give the user administrative rights of your organisation.

  • Name
    Communities
    Type
    long[]
    Description

    An array of IDs of the groups/communities you wish to automatically add the user to. Read more about groups

Response

The response contains 5 properties:

  • Name
    TotalInvites
    Type
    int
    Description

    The total number of invites the API dealt with

  • Name
    SuccessList
    Type
    string[]
    Description

    Emails which are brand new to VEO and have been invited to your organisation.

  • Name
    ErrorList
    Type
    string[]
    Description

    Emails which failed, most likely due to invalid email address structure

  • Name
    AlreadyInOrganisationList
    Type
    string[]
    Description

    Emails which are already part of your organisation and who's rights have been set to the rights you requested.

  • Name
    ExistingUserAddedMembershipToOrganisation
    Type
    string[]
    Description

    Emails which existing in VEO and previously weren't part of your organisation but have now been added.

Request

POST
/userinvites/multiple
curl --location 'https://api.veo.co.uk/api/userinvites/multiple' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "OrganisationId":{organisationId},
    "Users":[
        {
            "Email":"{emailAddress}",
            "IsOrgAdmin":true,
            "Communities":[]
        }
    ]
}'

POST/users/create

Create users without invite

Your organisation use case may be that you wish to create users without inviting them. This is usually if you wish to use VEO entirely on an API basis and want to link your system user with a VEO user.

In this scenario you should use this endpoint as it allows you to create a new user, set their password and skips the sending of invitation emails.

JSON Attributes of User model

  • Name
    OrganisationId
    Type
    string
    Description

    The identity of the organisation you're adding to. This must be an organisation that you are an administrator of. If you don't know your organisation ID you can get this from the /me endpoint

  • Name
    FirstName
    Type
    string
    Description

    The users first name

  • Name
    LastName
    Type
    string
    Description

    The users last name

  • Name
    Email
    Type
    string
    Description

    The users email address

  • Name
    Password
    Type
    string
    Description

    The initial password to set for the user.

  • Name
    AcceptsPrivacyPolicy
    Type
    boolean
    Description

    This should be set to true and indicates that they have accepted the privacy policy.

  • Name
    AcceptsTermsAndConditions
    Type
    boolean
    Description

    This should be set to true and indicates that they have accepted terms and conditions.

  • Name
    IsActive
    Type
    bool
    Description

    This should be set to true

  • Name
    Roles
    Type
    int[]
    Description

    An array of role ids. All users should have the role ID of 4, optionally you can give them a role of 2 to make them an organisation admin.

  • Name
    RegionId
    Type
    int
    Description

    The region the user belongs to. If you don't know the region ID you can find it in the regions endpoint or look in the request dialog on this page where we've included a copy of the regions JSON.

Response

The response should be a 200 - OK with the body being the new users ID.

Request

POST
/users/create
curl --location 'https://api.veo.co.uk/api/users/create' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "FirstName":"Maia",
    "LastName":"Sanford",
    "Email":"Randall95@hotmail.com",
    "IsActive": true,
    "Roles":[
        4
    ],
    "OrganisationId":1,
    "Password":"password123456789",
    "RegionId":74,
    "AcceptsPrivacyPolicy":true,
    "AcceptsTermsAndConditions":true
}'

PUT/v2/users/{{UserId}}

Updating a user

Updating a user has a similar model to creating a user with one major difference, the user roles are separated by organisation and are required.

User model

  • Name
    FirstName
    Type
    string
    Description

    The users first name

  • Name
    LastName
    Type
    string
    Description

    The users last name

  • Name
    Email
    Type
    string
    Description

    The users email address

  • Name
    Password
    Type
    string
    Description

    Only supply this if you wish to reset the users password.

  • Name
    IsActive
    Type
    bool
    Description

    Set this if you want to deactivate/reactivate the user.

  • Name
    Roles
    Type
    OrganisationRole[]
    Description

    An array of role ids along with their organisation Id. More on this model below.

OrganisationRole model

  • Name
    OrganisationId
    Type
    long
    Description

    The organisation id.

  • Name
    Roles
    Type
    int[]
    Description

    An array of role ids. All users should have the role ID of 4, optionally you can give them a role of 2 to make them an organisation admin.

Request

POST
/v2/users/{{UserId}}
curl --location --request PUT 'https://api.veo.co.uk/api/v2/users/{userId}' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "FirstName":"Lisette",
    "LastName":"Reinger",
    "Email":"Magdalen45@hotmail.com",
    "IsActive": true,
    "Roles":[
        {
            "OrganisationId":1,
            "Roles":[
                4
            ]
        }
    ]
}'

DELETE/user?Id={{UserId}}

Deleting a user

Deleting a user requires a DELETE request on the user endpoint with Id passed as a query string parameter.

The response should return 200 - OK.

Request

DELETE
/user?Id={{UserId}}
curl --location --request DELETE 'https://api.veo.co.uk/api/user?id=50469' \
--header 'Authorization: Bearer {token}'

GET/users/get-all

Getting a list of users

Getting a list of users returns all of the users which match a search criteria passed in the querystring parameter by first name, last name or email address.

The query string parameters which can be passed include:

  • Name
    SearchTerm
    Type
    string
    Description

    A string to match the users first name, last name or email address to.

  • Name
    OrganisationId
    Type
    string
    Description

    The identity of the organisation you're searching. This must be an organisation that you belong to. If you don't know your organisation ID you can get this from the /me endpoint

  • Name
    pageSize
    Type
    bool
    Description

    See pagination

  • Name
    pageNumber
    Type
    bool
    Description

    See pagination

  • Name
    orderByDirection
    Type
    bool
    Description

    See pagination - orders based on the created stamp.

Request

GET
/users/get-all
curl --location 'https://api.veo.co.uk/api/users/get-all?searchTerm=John&pageNumber=1&organisationId=1&pageSize=10' \
--header 'Authorization: Bearer {token}'

Other endpoints

For other endpoints please visit the swagger documentation.