m4Mindset docs

Mindset v3 / Deploy in your app / Labels

View as Markdown

Create a new label

Mindset v3 REST API reference: Labels.

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

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 label

externalIdstringbody

Optional External ID of the label

showInDiscoverybooleanbody

Is this label visible to end users?

json
{
  "name": "string",
  "externalId": "string",
  "showInDiscovery": true
}

Responses

201

Label created successfully

json
{
  "uid": "string",
  "name": "string",
  "externalId": "string",
  "showInDiscovery": true,
  "createdAt": "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}/labels" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","externalId":"string","showInDiscovery":true}'