Custom Attributes

Custom Attributes are nice little packets of data dedicated to specific users. They are super useful for storing small bits of user data like emails or preferences.

Each plan comes with a specific number of custom attributes per user - using more than the specified amount will return 507.

Get Custom Attributes

GET https://docs.accountable.pixelninja.dev/<token>/user/<uuid>/data

Get all custom attributes relating to a user. You can use this 3 times per second.

Path Parameters

Name
Type
Description

token

string

This is your API token.

uuid

string

This is the UUID of the user whose custom attributes you want to fetch.

{ "email": "[email protected]", "region": "Europe" }

Create Custom Attributes

POST https://accountable.pixelninja.dev/:token/user/:uuid/data

Create custom attributes for a specified user. You can do this in bulk as the request body takes a 2d array. This endpoint can be used 2 times per second.

Path Parameters

Name
Type
Description

token

string

This is your API token.

uuid

string

The UUID of the user who is getting the values added.

Request Body

Name
Type
Description

data

array

2d array of the custom attributes to add.

{ "code": 201, "message": "Created" }

The 2d array should be formatted as followed:

[["key 1", "value 1"], ["key 2", "value 2"], ["key 3", "value 3"]]

Delete Custom Attribute

DELETE https://accountable.pixelninja.dev/:token/user/:uuid/data/:key

This will delete the specified key and its corresponding value. This cannot be undone. You can use this endpoint 2 times per second.

Path Parameters

Name
Type
Description

Token

string

This is your API token.

UUID

string

The UUID of who has the custom attribute you are trying to delete.

Key

string

The custom attribute name you want to delete.

{ "code": 204, "message": "No content" }

Last updated

Was this helpful?