Skip to content

API reference

Projects

A project scopes AI work, files, stores, and credentials inside an organization. Create it before issuing a project API key.

How it fits together

  1. 01Create a project
  2. 02List projects in the caller's organization
  3. 03Retrieve one project

Select an action to see its complete inputs, request, response, and status codes.

Create a project

POST/api/v1/tenancy/projects
Production base URLhttps://api.mahvashai.ir
AuthenticationUser access JWT
ResponseMahvash product envelope
Content typeapplication/json

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.
default_retrieval_placementBodystringOptionalMahvash extensionDefault placement for newly created vector stores.
descriptionBodystringOptionalMahvash extensionOptional description.
nameBodystringRequiredMahvash extensionHuman-readable project name.
orchestration_allow_cross_companyBodybooleanOptionalMahvash extensionWhether specialists from another model company may process project content.
orchestration_enabled_capabilitiesBodyarray<value>OptionalMahvash extensionManaged capabilities enabled for this project.
orchestration_max_generated_imagesBodyintegerOptionalMahvash extensionMaximum generated images in one request chain.
orchestration_max_web_search_callsBodyintegerOptionalMahvash extensionMaximum managed web searches in one request chain.
slugBodystringRequiredMahvash extension1 to 64 lowercase letters, digits, or hyphens. Optional: derived from the name when omitted, a random PRJ slug when the name has no Latin letters, and a random suffix when taken.
statusBodystringOptionalMahvash extensionACTIVE or ARCHIVED.

Request

curl -X POST 'https://api.mahvashai.ir/api/v1/tenancy/projects' \
  -H "Authorization: Bearer $MAHVASH_USER_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Research",
  "slug": "research"
}'

Response

{
  "status": 201,
  "data": {
    "id": "<project-uuid>",
    "organization": "<organization-uuid>",
    "name": "Research",
    "slug": "research"
  }
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
201Create a project.
400The request is not valid.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
409The requested transition conflicts with durable resource state.
429A quota or rate limit was exceeded.
500An internal error occurred.

List projects in the caller's organization

GET/api/v1/tenancy/projects
Production base URLhttps://api.mahvashai.ir
AuthenticationUser access JWT
ResponseMahvash product envelope

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
access_modeQuerystringOptionalMahvash extensionBounded project-list access_mode query parameter.
pageQueryintegerOptionalMahvash extensionBounded project-list page query parameter.
page_sizeQueryintegerOptionalMahvash extensionBounded project-list page_size query parameter.
searchQuerystringOptionalMahvash extensionBounded project-list search query parameter.
statusQuerystringOptionalMahvash extensionBounded project-list status query parameter.
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.

Request

curl -X GET 'https://api.mahvashai.ir/api/v1/tenancy/projects' \
  -H "Authorization: Bearer $MAHVASH_USER_JWT"

Response

{
  "status": 0,
  "data": "<value>"
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
200List projects in the caller's organization.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
429A quota or rate limit was exceeded.
500An internal error occurred.

Retrieve one project

GET/api/v1/tenancy/projects/{project_id}
Production base URLhttps://api.mahvashai.ir
AuthenticationUser access JWT
ResponseMahvash product envelope

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
project_idPathstringRequiredMahvash extensionProject UUID.
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.

Request

curl -X GET 'https://api.mahvashai.ir/api/v1/tenancy/projects/<project_id>' \
  -H "Authorization: Bearer $MAHVASH_USER_JWT"

Response

{
  "status": 0,
  "data": "<value>"
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
200Retrieve one project.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
404No such resource is visible to this principal.
429A quota or rate limit was exceeded.
500An internal error occurred.

Update one project

PATCH/api/v1/tenancy/projects/{project_id}
Production base URLhttps://api.mahvashai.ir
AuthenticationUser access JWT
ResponseMahvash product envelope
Content typeapplication/json

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
project_idPathstringRequiredMahvash extensionProject UUID.
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.
default_retrieval_placementBodystringOptionalMahvash extensionNew default placement for future vector stores.
descriptionBodystringOptionalMahvash extensionNew description.
nameBodystringOptionalMahvash extensionNew project name.
orchestration_allow_cross_companyBodybooleanOptionalMahvash extensionWhether specialists from another model company may process project content.
orchestration_enabled_capabilitiesBodyarray<value>OptionalMahvash extensionManaged capabilities enabled for this project.
orchestration_max_generated_imagesBodyintegerOptionalMahvash extensionMaximum generated images in one request chain.
orchestration_max_web_search_callsBodyintegerOptionalMahvash extensionMaximum managed web searches in one request chain.
slugBodystringOptionalMahvash extensionNew slug, unique within the organization.
statusBodystringOptionalMahvash extensionACTIVE or ARCHIVED. The default project stays active.

Request

curl -X PATCH 'https://api.mahvashai.ir/api/v1/tenancy/projects/<project_id>' \
  -H "Authorization: Bearer $MAHVASH_USER_JWT" \
  -H "Content-Type: application/json" \
  -d '{
  "default_retrieval_placement": "hosted"
}'

Response

{
  "status": 0,
  "data": "<value>"
}

Illustrative response shape; actual fields depend on the operation and model.

Status codes

HTTPDetails
200Update one project.
400The request is not valid.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
404No such resource is visible to this principal.
409The requested transition conflicts with durable resource state.
429A quota or rate limit was exceeded.
500An internal error occurred.

Delete one project. The default project cannot be deleted

DELETE/api/v1/tenancy/projects/{project_id}
Production base URLhttps://api.mahvashai.ir
AuthenticationUser access JWT
ResponseMahvash product envelope

Parameters

The table shows the accepted inputs for this endpoint. Examples use placeholders and illustrate a safe integration pattern.

NameLocationTypeRequiredSupportDetails
project_idPathstringRequiredMahvash extensionProject UUID.
X-Request-IDHeaderstringOptionalMahvash extensionClient-supplied correlation ID. Echoed on every response; replaced when absent or malformed.
X-Mahvash-ProjectHeaderstringOptionalMahvash extensionProject slug or ID within the caller's organization. Narrows the request principal; it can never widen it.

Request

curl -X DELETE 'https://api.mahvashai.ir/api/v1/tenancy/projects/<project_id>' \
  -H "Authorization: Bearer $MAHVASH_USER_JWT"

Response

This endpoint returns no JSON body or delivers binary content.

Status codes

HTTPDetails
204Delete one project. The default project cannot be deleted.
401Authentication credentials are missing or invalid.
403The principal is not allowed to perform this request.
404No such resource is visible to this principal.
409The requested transition conflicts with durable resource state.
429A quota or rate limit was exceeded.
500An internal error occurred.