Skip to main content
SONZAI
Api

Project Config

List project config keys

GET
/projects/{projectId}/config
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/config"
{
  "property1": null,
  "property2": null
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a project config value

GET
/projects/{projectId}/config/{key}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

key*string

Config key

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/config/string"
null
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a project config key

DELETE
/projects/{projectId}/config/{key}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

key*string

Config key

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/config/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Set a project config value

PUT
/projects/{projectId}/config/{key}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

key*string

Config key

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*file
Formatbinary

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/projects/string/config/string" \  -H "Content-Type: application/json" \  -d 'string'
{
  "$schema": "/api/v1/schemas/SetProjectConfigOutputBody.json",
  "success": true
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}