EndpointsInstruction Templates

Instruction Templates

Function-calling namespace: instructionTemplates

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/instruction-templates/create

Input Fields

FieldTypeRequiredConstraints
titlestringYes-
contentstringYes-
organizationIdstringNo-
isGlobalbooleanNonullable
isActivebooleanNonullable

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "instructionTemplates",
  "apiName": "create",
  "data": {
    "title": "value",
    "content": "value"
  }
}'

Example Response

{ "status": "ok", "data": {} }

delete

Source: backend/endpoints/instruction-templates/delete

Input Fields

FieldTypeRequiredConstraints
idstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "instructionTemplates",
  "apiName": "delete",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

getById

Source: backend/endpoints/instruction-templates/get-by-id

Input Fields

FieldTypeRequiredConstraints
idstringYes-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "instructionTemplates",
  "apiName": "getById",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

list

Source: backend/endpoints/instruction-templates/list

Input Fields

FieldTypeRequiredConstraints
organizationIdstringNo-
searchstringNo-
sortBystringNo-
sortOrderstringNo-
pageintegerNo-
pageSizeintegerNo-

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "instructionTemplates",
  "apiName": "list",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }

update

Source: backend/endpoints/instruction-templates/update

Input Fields

FieldTypeRequiredConstraints
idstringYes-
titlestringNonullable
contentstringNonullable
organizationIdstringNonullable
isGlobalbooleanNonullable
isActivebooleanNonullable

Example Request

curl -X POST https://api.aivida.in/api \
  -H "Content-Type: application/json" \
  -H "x-stack-access-token: <access_token_optional>" \
  -d '{
  "namespace": "instructionTemplates",
  "apiName": "update",
  "data": {
    "id": "id_123"
  }
}'

Example Response

{ "status": "ok", "data": {} }