Projecten en inhoud
Projectprofiel bijwerken
Werk velden van het merkprofiel van een project bij. Weggelaten velden blijven ongewijzigd. Vereist expected_profile_version uit de laatste leesactie en een idempotency_key (rol editor).
POST /studio-api/projects/profile/updateContract beoordeeld: · sha256:563d2d581da0ad29
Overzicht
Werk velden van het merkprofiel van een project bij. Weggelaten velden blijven ongewijzigd. Vereist expected_profile_version uit de laatste leesactie en een idempotency_key (rol editor).
Een geslaagd HTTP-antwoord kan acceptatie betekenen in plaats van voltooiing. Bewaar bij achtergrondwerk de teruggegeven ID en controleer dezelfde bewerking totdat die klaar is. Een ingepland of geaccepteerd bericht is pas gepubliceerd na platformbevestiging; een client-time-out bepaalt het resultaat niet.
Authenticatie en machtigingen
Een token kan alleen rechten van de eigenaar gebruiken. Elk verzoek controleert werkruimtelidmaatschap, resource-eigendom, geselecteerde werkruimten en verleende bevoegdheden. De profielen core en full bepalen welke tools zichtbaar zijn; ze verlenen geen toegang.
Verzoekvelden
Verplicht betekent verplicht binnen het bovenliggende object en de gekozen variant. Een verplicht onderliggend veld maakt een optioneel bovenliggend object niet verplicht. Onderstaande regels en veldnamen zijn uit het contract gekopieerd.
| Veld / variant | Type / verplicht | Beperkingen |
|---|---|---|
$ | objectVerplicht in bovenliggend object |
|
project_id | stringVerplicht in bovenliggend object |
|
expected_profile_version | integerVerplicht in bovenliggend object |
|
idempotency_key | stringVerplicht in bovenliggend object |
|
patch | objectVerplicht in bovenliggend object |
|
patch.tagline | string | nullOptioneel / item | — |
patch.taglineanyOf 1 | stringOptioneel / item |
|
patch.taglineanyOf 2 | nullOptioneel / item | — |
patch.description | string | nullOptioneel / item | — |
patch.descriptionanyOf 1 | stringOptioneel / item |
|
patch.descriptionanyOf 2 | nullOptioneel / item | — |
patch.voice | string | nullOptioneel / item | — |
patch.voiceanyOf 1 | stringOptioneel / item |
|
patch.voiceanyOf 2 | nullOptioneel / item | — |
patch.target_audience | string | nullOptioneel / item | — |
patch.target_audienceanyOf 1 | stringOptioneel / item |
|
patch.target_audienceanyOf 2 | nullOptioneel / item | — |
patch.color_palette | arrayOptioneel / item |
|
patch.color_palette[] | stringOptioneel / item |
|
patch.goals | arrayOptioneel / item |
|
patch.goals[] | stringOptioneel / item |
|
patch.no_go_topics | arrayOptioneel / item |
|
patch.no_go_topics[] | stringOptioneel / item |
|
patch.language_primary | stringOptioneel / item |
|
patch.positioning | string | nullOptioneel / item | — |
patch.positioninganyOf 1 | stringOptioneel / item |
|
patch.positioninganyOf 2 | nullOptioneel / item | — |
patch.usp | string | nullOptioneel / item | — |
patch.uspanyOf 1 | stringOptioneel / item |
|
patch.uspanyOf 2 | nullOptioneel / item | — |
patch.visual_identity | object | nullOptioneel / item | — |
patch.visual_identityanyOf 1 | objectOptioneel / item |
|
patch.visual_identity.*anyOf 1 | any JSON valueOptioneel / item | — |
patch.visual_identityanyOf 2 | nullOptioneel / item | — |
patch.forbidden_claims | arrayOptioneel / item |
|
patch.forbidden_claims[] | stringOptioneel / item |
|
patch.north_star_metric | string | nullOptioneel / item | — |
patch.north_star_metricanyOf 1 | stringOptioneel / item |
|
patch.north_star_metricanyOf 2 | nullOptioneel / item | — |
patch.posting_cadence | object | nullOptioneel / item | — |
patch.posting_cadenceanyOf 1 | objectOptioneel / item |
|
patch.posting_cadence.*anyOf 1 | any JSON valueOptioneel / item | — |
patch.posting_cadenceanyOf 2 | nullOptioneel / item | — |
patch.app_store_url_ios | string | nullOptioneel / item | — |
patch.app_store_url_iosanyOf 1 | stringOptioneel / item |
|
patch.app_store_url_iosanyOf 2 | nullOptioneel / item | — |
patch.app_store_url_android | string | nullOptioneel / item | — |
patch.app_store_url_androidanyOf 1 | stringOptioneel / item |
|
patch.app_store_url_androidanyOf 2 | nullOptioneel / item | — |
patch.app_metadata | objectOptioneel / item |
|
patch.app_metadata.* | any JSON valueOptioneel / item | — |
Volledig JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"project_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"expected_profile_version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"idempotency_key": {
"type": "string",
"minLength": 8,
"maxLength": 160
},
"patch": {
"type": "object",
"properties": {
"tagline": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 4000
},
{
"type": "null"
}
]
},
"voice": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"target_audience": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"color_palette": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
"goals": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 160
}
},
"no_go_topics": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 160
}
},
"language_primary": {
"type": "string",
"minLength": 2,
"maxLength": 35
},
"positioning": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
},
"usp": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"visual_identity": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"forbidden_claims": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 240
}
},
"north_star_metric": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"posting_cadence": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"app_store_url_ios": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"app_store_url_android": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"app_metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"additionalProperties": false
}
},
"required": [
"project_id",
"expected_profile_version",
"idempotency_key",
"patch"
],
"additionalProperties": false
}Antwoord en voltooiing
HTTP-statuscodes bij succes: 200. Wanneer de bewerking voltooid is: synchronous_http_response.
Een geslaagd HTTP-antwoord kan acceptatie betekenen in plaats van voltooiing. Bewaar bij achtergrondwerk de teruggegeven ID en controleer dezelfde bewerking totdat die klaar is. Een ingepland of geaccepteerd bericht is pas gepubliceerd na platformbevestiging; een client-time-out bepaalt het resultaat niet.
Verplicht betekent verplicht binnen het bovenliggende object en de gekozen variant. Een verplicht onderliggend veld maakt een optioneel bovenliggend object niet verplicht. Onderstaande regels en veldnamen zijn uit het contract gekopieerd.
| Veld / variant | Type / verplicht | Beperkingen |
|---|---|---|
$ | objectVerplicht in bovenliggend object | — |
contract_version | stringVerplicht in bovenliggend object |
|
profile | objectVerplicht in bovenliggend object | — |
profile.project_id | stringVerplicht in bovenliggend object |
|
profile.workspace_id | stringVerplicht in bovenliggend object |
|
profile.tagline | string | nullVerplicht in bovenliggend object | — |
profile.taglineanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.taglineanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.description | string | nullVerplicht in bovenliggend object | — |
profile.descriptionanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.descriptionanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.voice | string | nullVerplicht in bovenliggend object | — |
profile.voiceanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.voiceanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.target_audience | string | nullVerplicht in bovenliggend object | — |
profile.target_audienceanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.target_audienceanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.color_palette | arrayVerplicht in bovenliggend object | — |
profile.color_palette[] | stringOptioneel / item | — |
profile.goals | arrayVerplicht in bovenliggend object | — |
profile.goals[] | stringOptioneel / item | — |
profile.no_go_topics | arrayVerplicht in bovenliggend object | — |
profile.no_go_topics[] | stringOptioneel / item | — |
profile.language_primary | stringVerplicht in bovenliggend object | — |
profile.positioning | string | nullVerplicht in bovenliggend object | — |
profile.positioninganyOf 1 | stringVerplicht in bovenliggend object | — |
profile.positioninganyOf 2 | nullVerplicht in bovenliggend object | — |
profile.usp | string | nullVerplicht in bovenliggend object | — |
profile.uspanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.uspanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.visual_identity | object | nullVerplicht in bovenliggend object | — |
profile.visual_identityanyOf 1 | objectVerplicht in bovenliggend object |
|
profile.visual_identity.*anyOf 1 | any JSON valueOptioneel / item | — |
profile.visual_identityanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.forbidden_claims | arrayVerplicht in bovenliggend object | — |
profile.forbidden_claims[] | stringOptioneel / item | — |
profile.north_star_metric | string | nullVerplicht in bovenliggend object | — |
profile.north_star_metricanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.north_star_metricanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.posting_cadence | object | nullVerplicht in bovenliggend object | — |
profile.posting_cadenceanyOf 1 | objectVerplicht in bovenliggend object |
|
profile.posting_cadence.*anyOf 1 | any JSON valueOptioneel / item | — |
profile.posting_cadenceanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.app_store_url_ios | string | nullVerplicht in bovenliggend object | — |
profile.app_store_url_iosanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.app_store_url_iosanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.app_store_url_android | string | nullVerplicht in bovenliggend object | — |
profile.app_store_url_androidanyOf 1 | stringVerplicht in bovenliggend object | — |
profile.app_store_url_androidanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.app_metadata | objectVerplicht in bovenliggend object |
|
profile.app_metadata.* | any JSON valueOptioneel / item | — |
profile.profile_version | integerVerplicht in bovenliggend object |
|
profile.updated_by | string | nullVerplicht in bovenliggend object | — |
profile.updated_byanyOf 1 | stringVerplicht in bovenliggend object |
|
profile.updated_byanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.updated_by_kind | stringVerplicht in bovenliggend object |
|
profile.updated_by_api_key_id | string | nullVerplicht in bovenliggend object | — |
profile.updated_by_api_key_idanyOf 1 | stringVerplicht in bovenliggend object |
|
profile.updated_by_api_key_idanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.updated_by_delegated_grant_id | string | nullVerplicht in bovenliggend object | — |
profile.updated_by_delegated_grant_idanyOf 1 | stringVerplicht in bovenliggend object |
|
profile.updated_by_delegated_grant_idanyOf 2 | nullVerplicht in bovenliggend object | — |
profile.created_at | stringVerplicht in bovenliggend object |
|
profile.updated_at | stringVerplicht in bovenliggend object |
|
receipt_id | stringVerplicht in bovenliggend object |
|
applied | booleanVerplicht in bovenliggend object | — |
deduped | booleanVerplicht in bovenliggend object | — |
Volledig JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "project/v1"
},
"profile": {
"type": "object",
"properties": {
"project_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspace_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"tagline": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"voice": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"target_audience": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"color_palette": {
"type": "array",
"items": {
"type": "string"
}
},
"goals": {
"type": "array",
"items": {
"type": "string"
}
},
"no_go_topics": {
"type": "array",
"items": {
"type": "string"
}
},
"language_primary": {
"type": "string"
},
"positioning": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"usp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visual_identity": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"forbidden_claims": {
"type": "array",
"items": {
"type": "string"
}
},
"north_star_metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"posting_cadence": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"app_store_url_ios": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"app_store_url_android": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"app_metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"profile_version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"updated_by": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"updated_by_kind": {
"type": "string",
"enum": [
"jwt",
"api_key",
"delegated_ai",
"migration"
]
},
"updated_by_api_key_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"updated_by_delegated_grant_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"project_id",
"workspace_id",
"tagline",
"description",
"voice",
"target_audience",
"color_palette",
"goals",
"no_go_topics",
"language_primary",
"positioning",
"usp",
"visual_identity",
"forbidden_claims",
"north_star_metric",
"posting_cadence",
"app_store_url_ios",
"app_store_url_android",
"app_metadata",
"profile_version",
"updated_by",
"updated_by_kind",
"updated_by_api_key_id",
"updated_by_delegated_grant_id",
"created_at",
"updated_at"
]
},
"receipt_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applied": {
"type": "boolean"
},
"deduped": {
"type": "boolean"
}
},
"required": [
"contract_version",
"profile",
"receipt_id",
"applied",
"deduped"
]
}Fouten en veilig opnieuw proberen
Controleer de HTTP-status en antwoordinhoud. Een 400-validatiefout kan een ZodError bevatten; afhandelingsfouten gebruiken de velden error, message en code. Bewaar request_id of x-request-id voor diagnose, zonder inloggegevens. Los 401/403-toegangsfouten op voordat je opnieuw probeert en volg Retry-After bij 429. Lees bij een onzekere schrijfhandeling of 5xx eerst het bestaande resultaat. Hergebruik een idempotentiesleutel alleen waar dit wordt ondersteund; het gedrag bij opnieuw proberen verschilt per bewerking en garandeert geen precies eenmalige aflevering.
Handleiding voor probleemoplossingVoorbeelden
Deze voorbeelden gebruiken fictieve waarden die tegen de schema's zijn gecontroleerd. Vervang IDs door toegestane IDs, media door gereedstaande bestanden en datums door je bevestigde publicatietijd. Controleer accountgeschiktheid vóór een schrijfhandeling. Deze pagina verstuurt geen API-verzoeken.
Stel SOSOAPI_ACCESS_TOKEN op je server in op inloggegevens die deze bewerking accepteert en houd deze uit browsercode. Gebruik voor een agent sosoapi auth login om via de browser aan te melden en laat de CLI de inloggegevens vernieuwen.
request.json
{
"project_id": "11111111-1111-4111-8111-111111111111",
"expected_profile_version": 1,
"idempotency_key": "example-intent-0001",
"patch": {
"tagline": "A fictional project for the documentation example."
}
}cURL
curl --request POST \
"https://gqeshlawtcexsapabaui.supabase.co/functions/v1/studio-api/projects/profile/update" \
-H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @request.jsonJavaScript
// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/studio-api/projects/profile/update", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
body: JSON.stringify({
"project_id": "11111111-1111-4111-8111-111111111111",
"expected_profile_version": 1,
"idempotency_key": "example-intent-0001",
"patch": {
"tagline": "A fictional project for the documentation example."
}
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.CLI
npx sosoapi api post /studio-api/projects/profile/update < request.jsonVoorbeeld van een synthetisch antwoord
{
"contract_version": "project/v1",
"profile": {
"project_id": "11111111-1111-4111-8111-111111111111",
"workspace_id": "11111111-1111-4111-8111-111111111111",
"tagline": null,
"description": null,
"voice": null,
"target_audience": null,
"color_palette": [],
"goals": [],
"no_go_topics": [],
"language_primary": "example",
"positioning": null,
"usp": null,
"visual_identity": null,
"forbidden_claims": [],
"north_star_metric": null,
"posting_cadence": null,
"app_store_url_ios": null,
"app_store_url_android": null,
"app_metadata": {},
"profile_version": 1,
"updated_by": null,
"updated_by_kind": "jwt",
"updated_by_api_key_id": null,
"updated_by_delegated_grant_id": null,
"created_at": "2099-01-15T09:00:00Z",
"updated_at": "2099-01-15T09:00:00Z"
},
"receipt_id": "11111111-1111-4111-8111-111111111111",
"applied": false,
"deduped": false
}