> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Look up people

> Find people in the API key's organization by email or by user id. Use it to get the user id to write in a person field (an [ontology](/ontology/field-types#people) field whose storage is `ref(user)` or `ref_list(user)`), or to see who an id you read names.

It is a lookup, not a listing: name at least one email or id, and at most 100 of each. Repeat a parameter or separate values with commas. Emails match in any case.

It finds the organization's members and the people invited to it who have not signed in yet (`invited: true`; they keep the same id when they do). Anyone else, including members of other organizations, is simply absent from the answer, as is anyone you named who was not found.

Needs an API key. A key with scopes needs `users:read` (**Look up people** when you create the key), which allows nothing else. A key without scopes can use it. The key's person must still be a member of the organization.



## OpenAPI

````yaml api-reference/users/users.json GET /users
openapi: 3.1.0
info:
  title: Users API
  version: 1.0.0
  description: >-
    Look up the people of your organization: the user ids that person fields
    hold.
servers:
  - url: https://api.vectorshift.ai/v1
security:
  - BearerAuth: []
paths:
  /users:
    get:
      summary: Look up people
      description: >-
        Find people in the API key's organization by email or by user id. Use it
        to get the user id to write in a person field (an
        [ontology](/ontology/field-types#people) field whose storage is
        `ref(user)` or `ref_list(user)`), or to see who an id you read names.


        It is a lookup, not a listing: name at least one email or id, and at
        most 100 of each. Repeat a parameter or separate values with commas.
        Emails match in any case.


        It finds the organization's members and the people invited to it who
        have not signed in yet (`invited: true`; they keep the same id when they
        do). Anyone else, including members of other organizations, is simply
        absent from the answer, as is anyone you named who was not found.


        Needs an API key. A key with scopes needs `users:read` (**Look up
        people** when you create the key), which allows nothing else. A key
        without scopes can use it. The key's person must still be a member of
        the organization.
      parameters:
        - name: email
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
            maxItems: 100
          description: Emails to look up, in any case.
        - name: id
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
            maxItems: 100
          description: User ids to look up.
      responses:
        '200':
          description: The people found, those named by email first, then by id.
          content:
            application/json:
              schema:
                type: object
                required:
                  - users
                properties:
                  users:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
              examples:
                by_email:
                  summary: Look up one person by email
                  value:
                    users:
                      - id: 6650e7a2c4b1f93d2a8e5c10
                        email: jane@example.com
                        name: Jane Doe
                        invited: false
        '400':
          description: Nothing to look up, or too much.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
              examples:
                lookup_empty:
                  summary: No email or id
                  value:
                    status: failed
                    code: lookup_empty
                    error: >-
                      name at least one email or id: this looks people up, it
                      does not list them
                too_many_values:
                  summary: Over 100 emails or ids
                  value:
                    status: failed
                    code: too_many_values
                    error: >-
                      a lookup names at most 100 of each; this names 120 of
                      email
        '401':
          description: >-
            The API key is missing or invalid, or the request was not made with
            an API key (`unauthorized`).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  status:
                    type: string
                    enum:
                      - failed
                  code:
                    type: string
                    description: >-
                      `unauthorized` when the request was not made with an API
                      key.
                  error:
                    type: string
              examples:
                invalid_key:
                  summary: Missing or invalid key
                  value:
                    error: Missing authorization header
                unauthorized:
                  summary: Not an API key
                  value:
                    status: failed
                    code: unauthorized
                    error: an API key is required
        '403':
          description: >-
            The key lacks `users:read`, or its person is no longer a member of
            the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
              examples:
                scope_required:
                  summary: Missing scope
                  value:
                    status: failed
                    code: scope_required
                    error: this API key lacks the users:read scope
                not_a_member:
                  summary: Person removed
                  value:
                    status: failed
                    code: not_a_member
                    error: >-
                      this API key's person is no longer a member of its
                      organization
        '500':
          description: The organization's people could not be read. Retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failure'
              examples:
                lookup_failed:
                  summary: Read failed
                  value:
                    status: failed
                    code: lookup_failed
                    error: the organization's people could not be read
components:
  schemas:
    User:
      type: object
      required:
        - id
        - email
        - name
        - invited
      properties:
        id:
          type: string
          description: 'The user id: what a person field holds.'
        email:
          type: string
          description: The person's email.
        name:
          type: string
          description: The person's name. Empty when none is known.
        invited:
          type: boolean
          description: Invited, and not signed in yet. They keep this id when they sign in.
    Failure:
      type: object
      properties:
        status:
          type: string
          enum:
            - failed
        code:
          type: string
          description: A stable, machine-readable code. Branch on this, not on `error`.
        error:
          type: string
          description: A human-readable message. Its wording may change.
      required:
        - status
        - code
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.