Skip to content

Change the caller's own language

PATCH
/v1/me
curl --request PATCH \
--url https://example.com/v1/me \
--header 'Content-Type: application/json' \
--cookie affectra_session=<affectra_session> \
--data '{ "locale": "en" }'

Only for a person signed in with the browser session; API keys, user tokens and GitHub Actions tokens get 403 auth.sessionRequired. It changes only the caller’s own user and takes no user ID. The preference is the person’s, the same in every organization.

Media typeapplication/json
object
locale
required

The language, or null to follow the browser again

string | null
Allowed values: en de fr it

The caller, with the new language

Media typeapplication/json
object
kind
required
string
Allowed values: key user github
tenant

Kind=key: the key’s organization

string
role

Kind=key: the key’s stored role, viewer or member; a key never acts above member

string
Allowed values: viewer member admin owner
user

Kind=user: the user ID

string
email

Kind=user

string
name

Kind=user

string
locale

Kind=user: their language, or null to follow the browser

string | null
Allowed values: en de fr it
repository

Kind=github: owner/name

string
features

Kind=user: what this server has switched on, so the web app shows only what works

object
webhooks
required

The webhook endpoint routes are available

boolean
orgs

Kind=user: memberships, sorted by org

Array<object>
object
org
required
string
name
required
string
role
required

Viewer reads; member also submits reports; admin also manages keys and members; owner also billing

string
Allowed values: viewer member admin owner
status
required

Only active organizations can be used; the others answer 403 org.suspended

string
Allowed values: active suspended deleting

Example

{
"kind": "key",
"role": "viewer",
"locale": "en",
"orgs": [
{
"role": "viewer",
"status": "active"
}
]
}

Locale.invalid, or request.invalidJson

Missing or invalid credentials

Auth.sessionRequired, or auth.csrfMissing (no X-Affectra-CSRF header)

Over the operation’s rate-limit budget (x-affectra-budget): code request.rateLimited with params.budget. Wait Retry-After seconds before trying again.

Media typeapplication/problem+json

Every error answer, Content-Type application/problem+json. The web app and integrations translate code; detail is English, for people reading curl output or CI logs, and may change wording at any time. Match on code, never on detail.

object
status
required

The HTTP status

integer
code
required

Stable error codes. A code is never renamed; new ones may be added, so a client falls back to detail for a code it doesn’t know. Another organization’s object answers notFound, the same as a missing one.

string
Allowed values: notFound internal request.invalidJson request.invalid request.alreadyExists request.timeInvalid auth.required auth.csrfMissing email.invalid accounts.passwordUnavailable locale.invalid request.rateLimited auth.sessionRequired auth.roleTooLow auth.githubTokenUploadOnly org.suspended org.required request.fieldRequired request.textInvalid request.timeout server.notReady catalog.unavailable report.invalid report.wrongTenant settings.csafNamespaceInvalid settings.digestHourInvalid settings.timeZoneInvalid sbom.invalid sbom.limitExceeded sbom.signatureInvalid sbom.signatureRequired sbom.signatureUnavailable upload.hardwareRevisionRenamed upload.malformed upload.unexpectedPart upload.sbomMissing upload.tooLarge upload.unreadable provenance.invalid provenance.sbomAttestation provenance.signatureRequired provenance.unavailable vex.vulnerabilityInvalid vex.statusInvalid vex.justificationUnknown vex.justificationNotAllowed vex.justificationRequired vex.actionRequired vex.statementTooLong vex.csafNamespaceRequired vex.csafNoStatements release.hasVexStatements finding.refInvalid mapping.purlInvalid mapping.purlVersioned mapping.purlCoveredByOsv mapping.cpeFieldInvalid mapping.builtIn mapping.csafProviderUnknown mapping.csafKindInvalid mapping.csafValueInvalid feeds.notSubscribable accounts.setupEmailLimit member.exists member.joined member.roleInvalid member.ownerGrantDenied member.ownerChangeDenied member.ownerRemoveDenied member.lastOwner github.orgInvalid github.teamInvalid github.roleInvalid github.adminRequired key.nameInvalid key.roleInvalid key.purposeInvalid product.keyInvalid product.keyExists product.keyLocked product.supportEndsInvalid alias.reportedInvalid alias.exists publisher.repositoryInvalid publisher.fieldTooLong publisher.idsIncomplete publisher.repositoryNotFound publisher.githubUnreachable publisher.workflowInvalid publisher.refPatternPrefix publisher.refPatternInvalid publisher.exists graph.vulnerabilityUnknown graph.timeout proposal.evidenceUnknown proposal.evidenceTooLarge proposal.kindInvalid proposal.basisInvalid proposal.notCarryOver proposal.basisMismatch proposal.notPending proposal.sourceSuperseded proposal.ownProposal proposal.fourEyes proposal.personRequired proposal.batchTooLarge proposal.vulnerabilityChanged proposal.reportedChanged proposal.releaseUnknown proposal.evidenceMissing notifications.unavailable notifications.findingsInvalid notifications.tokenInvalid webhook.urlRejected webhook.limitReached webhook.formatUnavailable webhook.headerInvalid webhook.eventTypesInvalid webhook.disabled events.cursorInvalid
detail
required

What went wrong

string
params
required

Values the code’s message needs, e.g. {“field”: “version”}. Only values the caller sent or may see. Empty when the message needs none.

object
key
additional properties
any

Example

{
"code": "notFound"
}
Retry-After
integer
>= 1

Seconds until a request would be allowed again, at least 1