Skip to main content
PUT
Batch update traits
Use this endpoint for a backfill or a sync, for example to link many players to their Discord accounts at once. Authentication and the trait rules are the same as for Update Traits.

Body

An array of 1 to 100 items. Each item is a flat object: user_id plus the traits for that player. Items use the plain user_id, not the player key. The body is at most 200 KB.

Response

200 when at least one item is valid. results has one entry per item, in request order:
Valid items are written; failed items are not. When no item is valid, the response is 400 with INVALID_TRAITS and the same results. The batch response does not return the merged traits; read a player with Get Player, with MCP get_player, or on the profile’s Traits tab.

Delete traits in a batch

Send null. Set and delete can mix in one item and across items:

Errors

Request errors are the same as for Update Traits, with a 200 KB body limit. A request-level 400 (not an array, or more than 100 items) writes nothing.

Authorizations

Authorization
string
header
required

An API key (mana_api_...) with scopes. It reads reports and writes player traits.

Path Parameters

projectId
string<uuid>
required

The project ID

Body

application/json
Required array length: 1 - 100 elements
user_id
string
required
Required string length: 1 - 255
{key}
Maximum string length: 1024

Response

At least one item is valid. results has one entry per item, in request order.

updated
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
failed
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
updated_at
string
required
results
object[]
required