Contextual AI Users API

Manage workspace users.

Operations 6

GET /users Get Users #
PUT /users Update User #
DELETE /users Remove User #
POST /users Invite Users #
PATCH /users Update User #
POST /users/invite Invite 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. 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: Contextual Ai /users API
  version: '1.0'
  description: 'Operations tagged /users across 2 of this provider''s published API definitions: contextual-ai-openapi.json, contextual-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.contextual.ai/v1
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'
      security:
      - BearerAuth: []
    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'
      security:
      - BearerAuth: []
    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'
      security:
      - BearerAuth: []
    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'
      security:
      - BearerAuth: []
    patch:
      operationId: updateUser
      tags:
      - /users
      summary: Update User
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: User updated.
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
      - BearerAuth: []
    servers:
    - url: https://api.contextual.ai/v1
  /users/invite:
    post:
      operationId: inviteUsers
      tags:
      - /users
      summary: Invite Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emails:
                  type: array
                  items:
                    type: string
                    format: email
      responses:
        '200':
          description: Users invited.
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.contextual.ai/v1
      description: Contextual AI production API
components:
  schemas:
    EmptyResponse:
      properties: {}
      type: object
      title: EmptyResponse
    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.
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.
    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
    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
    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
    HTTPValidationError_2:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorDetail'
    ValidationErrorDetail:
      type: object
      properties:
        loc:
          type: array
          items:
            oneOf:
            - type: string
            - type: integer
        msg:
          type: string
        type:
          type: string
  responses:
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError_2'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    bearerAuth:
      type: http
      scheme: bearer
      description: Contextual AI API key supplied as a Bearer token.
x-refined-from:
- contextual-ai-openapi.json
- contextual-ai-openapi.yml