m4Mindset docs

Mindset v3 / Deploy in your app / Contexts

View as Markdown

Create a new context

Mindset v3 REST API reference: Contexts.

POST /api/v1/appuid/{appUid}/contexts

Base URL

Requests go to your region's API host, for example https://a.api.mindset.ai. Hosts: https://a.api.mindset.ai, https://b.api.mindset.ai, https://c.api.mindset.ai, https://d.api.mindset.ai.

Authorization

x-api-keystringheaderrequired

Your API key.

Path parameters

appUidstringpathrequired

Your application's uid

Request body

Content type: application/json.

namestringbodyrequired

Name of the context

descriptionstringbody

Description of the context

externalIdstringbody

Optional External ID of the context

externalTenantIdstringbody

External tenant identifier (optional, immutable after creation)

isSyncedbooleanbody

Is the context synced

json
{
  "name": "string",
  "description": "string",
  "externalId": "string",
  "externalTenantId": "string",
  "isSynced": true
}

Responses

201

Context created successfully

json
{
  "uid": "string",
  "name": "string",
  "description": "string",
  "externalId": "string",
  "createdAt": "string",
  "isSynced": true,
  "externalTenantId": "string"
}

400

Bad Request

401

Unauthorized

403

Forbidden

422

Unprocessable Entity

500

Internal Server Error

Example request

bash
curl -X POST "https://a.api.mindset.ai/api/v1/appuid/{appUid}/contexts" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","externalId":"string","externalTenantId":"string","isSynced":true}'