Ana içeriğe geç

Get AI Prompt-Decorator Preset

Endpoint

GET /apiops/settings/ai-prompt-decorator-presets/{presetName}/

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
presetNamestringYesName of the preset to retrieve (case-insensitive)

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringNoadminScope project id. Omit for the admin/global scope.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"resultList": [
{
"id": "665f3b2d8c4f5b0013cd91bb",
"projectId": "admin",
"name": "support-tone",
"content": "Answer in a calm, professional tone and always offer a next step.",
"role": "system",
"position": "PREPEND",
"category": "tone",
"description": "House style for support assistants",
"enabled": true,
"builtIn": false
}
],
"resultCount": 1
}

Response Fields

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarraySingle-element list holding the requested preset
resultCountintegerAlways 1 on success

The preset object carries the same fields documented in List AI Prompt-Decorator Presets.

Error Response (400 Bad Request)

Returned when the name is empty, no preset with that name is visible in the scope, or the caller lacks the ADMIN role.

{
"status": "FAILURE",
"resultMessage": "AI prompt-decorator preset (name: support-tone) was not found!"
}

Error Response (401 Unauthorized)

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example

curl -X GET \
"https://demo.apinizer.com/apiops/settings/ai-prompt-decorator-presets/support-tone/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Name Resolution:
    • Names are matched case-insensitively within the scope's visible set (built-in ∪ admin-shared ∪ scope-owned)
    • When the same name exists in more than one tier, the row the scope actually owns wins
  • Admin Only:
    • A project-scoped AI_DEVELOPMENT token is not sufficient on this surface