Users
Use /users to get settings for the user you authenticate as. If that user has the Admin role, you can also see and manage the other users on your account.
Listing All Users
Section titled “Listing All Users”Request
Section titled “Request”GET /usersArguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| count | Number | The number of users per page. |
| page | Number | The page to get. |
Response
Section titled “Response”A paged list of users. See Getting Details for a User for the fields on each user.
Example Response
Section titled “Example Response”// GET /users?count=10&page=1
{ "metadata": { "resultset": { "count": 10, "page": 1, "total_count": 17, "total_pages": 2 } }, "results": [ { "active": true, "currency": "USD", "region": "us", "is_owner": false, "share_of_profit": "1.00", "last_login": "2021-12-21T11:12:13", "timezone": "Eastern Standard Time", "account": { "id": 12345678, "company": "Appfigures", "auto_import": true, "last_import": "2021-09-23T00:00:00", "plan": "Explore", "plan_id": 1, "is_premium": true }, "id": 34567812, "role": "admin", "name": "John", "email": "john@smith.com", "products": null, "avatar_url": "https://secure.gravatar.com/avatar/...", "date_format": "MM/dd/yy", "entitlements": [ "sales", "ads", "alerts", "toplists", "ranks", "reviews", "featured", "autoimport" ] }, ... ]}Getting Details for a User
Section titled “Getting Details for a User”Request
Section titled “Request”GET /users/{email or user_id}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| String | The email address of the user to look up. The user must be a member of your account. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
| active | Bool | (true | false) Whether the user is active. |
| currency | String | The user’s preferred currency. We report all monetary values in this currency. See /data/currencies for the list. |
| region | String | (us | gb) The user’s preferred region for date and time formats. |
| is_owner | Bool | (true | false) True if this user created the account. |
| last_login | Date | The date of the user’s last login. |
| timezone | String | The user’s preferred timezone. We report ranks in this timezone. |
| account | Account | The user’s account. See Account below. |
| id | Number | The user’s Appfigures ID. |
| role | String | The user’s permission level: viewer or admin. Viewers can’t access some resources. Those requests return a 403 Forbidden error. |
| name | String | The user’s full name. |
| String | The user’s email address. | |
| products | List | The products this user can access. |
| date_format | String | The date format for the user’s region. |
Account
Section titled “Account”| Field | Type | Description |
|---|---|---|
| id | String | The account’s Appfigures ID. |
| name | String | The account’s name. |
| company | String | The account’s company name. |
| auto_import | String | (true | false) Whether the account supports auto-import. |
| last_import | String | (legacy) We no longer report the account’s last import date in this API. It’s always the current date. |
| plan | String | The account’s plan: free, premium or publisher. Users on the free plan can’t access some resources. Those requests return a 403 Forbidden error. |
Example Response
Section titled “Example Response”// GET /users/john@fobsdirect.com
{ "active": true, "currency": "USD", "region": "US", "is_owner": false, "share_of_profit": "1.00", "last_login": "2021-09-23T13:02:47", "timezone": "Eastern Standard Time", "account": { "id": 42, "company": "Smith's", "auto_import": "N/A", "last_import": "2021-09-23T00:00:00", "plan": "explore" }, "id": 12345678, "role": "admin", "name": "John", "email": "john@smith.com", "date_format": "MM/dd/yy", "products": [ ... ]}Changing a User’s Status
Section titled “Changing a User’s Status”Request
Section titled “Request”PUT /users/{user_id}Send a JSON body: { "active": <true|false> }
Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| user_id | Number | The ID of the user to update. |
| active | Bool | (true | false) Set to false to disable the user, or true to enable them. |
Example
Section titled “Example”// PUT /users/12345678
{"active": false}Response
Section titled “Response”If the update works, you’ll get back the full updated user.
Deleting a User
Section titled “Deleting a User”Request
Section titled “Request”DELETE /users/{user_id}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| user_id | Number | The ID of the user to delete. |
Response
Section titled “Response”You’ll get a 204 No Content when the user is deleted, or a 404 Not Found if the ID doesn’t exist or isn’t a member of your account.
Important: You can’t undo a user deletion. To disable a user for now, change their status instead.