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

# Contexts API

> Parameters full description

<Card title="Note" icon="link" iconType="solid" href="/deploy/api/contexts/retrieve-contexts" cta="Contexts API playground">
  You can find below the full description of Parameters for each POST/PATCH/GET/DELETE methods and also what parameters you can expect from the API responses.

  <br />

  If you want to test the API, please see the Contexts API playground.
</Card>

<AccordionGroup>
  <Accordion title="POST - Create a new context">
    ## Parameters:

    #### **name** *String*

    Displayed name of the context

    #### **description** *String*

    Description of the context

    #### **externalId** *String*

    Unique Identifier of the context you can optionally provide

    #### **isSynced** *Boolean*

    When a context is synced, files ingestion are synced with automatic mechanism (external process). Hence, the files ingested in the context cannot be managed manually via the Mindset App admin portal.

    #### **externalTenantId** *String*

    External tenant identifier. Valid characters are A-Za-z0-9\_-.
    (optional, immutable after creation)
  </Accordion>

  <Accordion title="PATCH - Update an existing context">
    ## Parameters:

    #### **name** *String*

    Displayed name of the context

    #### **description** *String*

    Description of the context

    #### **externalTenantId** *String*

    External tenant identifier. Valid characters are A-Za-z0-9\_-.
    (optional, immutable after creation)
  </Accordion>

  <Accordion title="GET - Query the list of contexts or get context individually">
    ## Parameters:

    #### **startAfter - Querying for “the next page”** *String*

    Use the `startAfter` parameter and provide the `createdAt` string of the last context in the current results set When there are no more results you will receive an empty array in the response and a 404 status code.

    #### **externalTenantId** *String*

    Filter results to a specific externalTenantId
  </Accordion>

  <Accordion title="DELETE - Delete a context by providing its uid">
    Note: You cannot delete a context containing files. You will receive a 422 response code if you try.
  </Accordion>

  <Accordion title="RESPONSE DATA">
    You will get the same response data when calling POST, PATCH or GET

    ***Note***: When retrieving a collection of contexts, the response will be an array of objects.

    #### ***uid String***

    Mindset internal context uid

    #### ***externalId String***

    Unique Identifier of the context you can optionally provide

    #### ***name String***

    Displayed name of the context

    #### ***description String***

    Description of the context

    #### ***createdAt ISO timestamp***

    Context creation date

    #### ***isSynced Boolean***

    Set to **True** when you need to syncronize the context files with an ingestion integrated process (Via Cyclr)
  </Accordion>
</AccordionGroup>
