EndpointsOrganizations

Organizations

Function-calling namespace: organizations

  • 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/organizations/create

Input Fields

FieldTypeRequired
stackTeamIdstringYes
namestringYes
slugstringYes
verificationStatusstringNo
typestringYes
facilitiesmap[string]boolNo
logoIdstringNo
logoUrlstringNo
settingsmap[string]interface{}No
addressmap[string]interface{}No
addressStreetstringNo
addressCitystringNo
addressStatestringNo
addressPostalCodestringNo
addressCountrystringNo
contactEmailstringNo
contactPhonestringNo
bankDetailsmap[string]interface{}No
isActiveboolNo
createdAt*int64No
updatedAt*int64No

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": "organizations",
  "apiName": "create",
  "data": {
    "stackTeamId": "org_123",
    "name": "value",
    "slug": "value",
    "type": "GENERAL"
  }
}'

Example Response

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

delete

Source: backend/endpoints/organizations/delete

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": "organizations",
  "apiName": "delete",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

getById

Source: backend/endpoints/organizations/get-by-id

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes

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": "organizations",
  "apiName": "getById",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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

listByOrganization

Source: backend/endpoints/organizations/list-by-organization

Input Fields

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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": "organizations",
  "apiName": "listByOrganization",
  "data": {
    "organizationId": "org_123"
  }
}'

Example Response

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

update

Source: backend/endpoints/organizations/update

Input Fields

FieldTypeRequired
idstringYes
organizationIdstringYes
stackTeamId*stringNo
name*stringNo
slug*stringNo
verificationStatus*stringNo
type*stringNo
facilities*map[string]boolNo
logoId*stringNo
logoUrl*stringNo
settings*map[string]interface{}No
address*map[string]interface{}No
addressStreet*stringNo
addressCity*stringNo
addressState*stringNo
addressPostalCode*stringNo
addressCountry*stringNo
contactEmail*stringNo
contactPhone*stringNo
bankDetails*map[string]interface{}No
isActive*boolNo
createdAt*int64No
updatedAt*int64No

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": "organizations",
  "apiName": "update",
  "data": {
    "id": "id_123",
    "organizationId": "org_123"
  }
}'

Example Response

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