Contextual AI Users API

Manage workspace users.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /users List users in the tenant · Get Users #
Ask an LLM
“Who are the users in my tenant?”
“Can I include deactivated users in the user list?”
Tell an agent
List users matching {search}.
Show {limit} users from cursor {cursor}.
PUT /users Update a user's roles or admin status · Update User #
Ask an LLM
“How do I make a user a tenant admin?”
“Can I change a user's roles without creating them?”
Tell an agent
Set the admin flag of {email} to {is_tenant_admin}.
Give {email} roles {roles}.
DELETE /users Delete a user · Remove User #
Ask an LLM
“How do I remove a user from my tenant?”
“Can I delete a user by email?”
Tell an agent destructive · confirm first
Delete user {email}.
Remove {email} from the tenant.
POST /users Invite new users to the tenant · Invite Users #
Ask an LLM
“How do I invite new people to my tenant?”
“What happens if an invited user is already in the tenant?”
Tell an agent
Invite {new_users} to tenant {tenant_short_name}.
Add {new_users} to tenant {tenant_short_name} as new users.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contextual-ai:contextual-ai-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contextual-ai-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Endpoints /users API
  version: '1.0'
servers:
- url: https://api.contextual.ai/v1
security:
- BearerAuth: []
tags:
- name: /users
paths:
  /users:
    get:
      tags:
      - /users
      summary: Get Users
      description: Retrieve a list of `users`.
      operationId: get_users_users_get
      parameters:
      - name: search
        in: query
        required: false
        schema:
          type: string
          description: Query to filter users by email
          title: Search
        description: Query to filter users by email
      - name: cursor
        in: query
        required: false
        schema:
          type: string
          description: Cursor for the beginning of the current page
          title: Cursor
        description: Cursor for the beginning of the current page
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          description: Number of users to return
          default: 50
          title: Limit
        description: Number of users to return
      - name: deactivated
        in: query
        required: false
        schema:
          type: boolean
          description: When set to true, return deactivated users instead.
          default: false
          title: Deactivated
        description: When set to true, return deactivated users instead.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - /users
      summary: Update User
      description: 'Modify a given `User`.


        Fields not included in the request body will not be modified.'
      operationId: update_user_users_put
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantNewUserInfo'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - /users
      summary: Remove User
      description: Delete a given `user`.
      operationId: remove_user_users_delete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantRemoveUser'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - /users
      summary: Invite Users
      description: Invite users to the tenant. This checks if the user is already in the tenant and if not, creates the user. We will return a list of user emails that were successfully created (including existing users).
      operationId: invite_users_users_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteUsersRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteUsersResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InviteUsersResponse:
      properties:
        invited_user_emails:
          items:
            type: string
          type: array
          title: Invited User Emails
          description: List of emails of the invited users
        error_details:
          additionalProperties:
            type: string
          type: object
          title: Error Details
          description: Details of the errors occurred while inviting users, where keys are the emails and values are the error messages
      type: object
      required:
      - invited_user_emails
      - error_details
      title: InviteUsersResponse
    UserRolesEnum:
      type: string
      enum:
      - VISITOR
      - AGENT_USER
      - CUSTOMER_USER
      - CUSTOMER_INTERNAL_USER
      - CONTEXTUAL_STAFF_USER
      - CONTEXTUAL_EXTERNAL_STAFF_USER
      - CONTEXTUAL_INTERNAL_STAFF_USER
      - TENANT_ADMIN
      - CUSTOMER_ADMIN
      - CONTEXTUAL_ADMIN
      - SUPER_ADMIN
      - SERVICE_ACCOUNT
      title: UserRolesEnum
    InviteUsersRequest:
      properties:
        tenant_short_name:
          type: string
          title: Tenant Short Name
          description: The short name of the tenant
        new_users:
          items:
            $ref: '#/components/schemas/TenantNewUserInfo'
          type: array
          title: New Users
          description: List of new users to be invited
      type: object
      required:
      - tenant_short_name
      - new_users
      title: InviteUsersRequest
    TenantNewUserInfo:
      properties:
        email:
          type: string
          title: Email
          description: The email of the user
        is_tenant_admin:
          type: boolean
          title: Is Tenant Admin
          description: Flag indicating if the user is a tenant admin
          default: false
        roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Roles
          description: The user level roles of the user.
      type: object
      required:
      - email
      title: TenantNewUserInfo
      description: The schema used for creating new users or updating existing users.
    EmptyResponse:
      properties: {}
      type: object
      title: EmptyResponse
    UsersListResponse:
      properties:
        users:
          items:
            $ref: '#/components/schemas/TenantUserInfo'
          type: array
          title: Users
          description: List of users
        next_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Next Cursor
          description: Cursor for the beginning of the next page
      type: object
      required:
      - users
      title: UsersListResponse
    TenantRemoveUser:
      properties:
        email:
          type: string
          title: Email
          description: The email of the user
      type: object
      required:
      - email
      title: TenantRemoveUser
      description: The schema used for removing a user
    TenantUserInfo:
      properties:
        email:
          type: string
          title: Email
          description: The email of the user
        is_tenant_admin:
          type: boolean
          title: Is Tenant Admin
          description: Flag indicating if the user is a tenant admin
          default: false
        roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Roles
          description: The user level roles of the user.
        id:
          type: string
          title: Id
        effective_roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Effective Roles
          description: The effective roles of the user.
      type: object
      required:
      - email
      - id
      title: TenantUserInfo
      description: The schema used for listing existing (activated / deactivated) users.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key