Identify Users

Sync your customer data with Featurebase to view and sort ideas by customers monthly spend and other parameters.

The Company model

Required attributes

  • Name
    id
    Type
    string
    Description

    Company ID

  • Name
    name
    Type
    string
    Description

    Company name

Optional attributes

  • Name
    monthlySpend
    Type
    number
    Description

    Monthly recurring revenue from this company.

  • Name
    createdAt
    Type
    Date
    Description

    Date when the company was created.

  • Name
    customFields
    Type
    object
    Description

    Object containing key-value pairs of custom fields.


GET/v2/organization/identifyUser

Get single identified user

This endpoint allows you to get an identified user's information.

Required attributes (one of the following is required)

  • Name
    email
    Type
    string
    Description

    Email of the user.

  • Name
    id
    Type
    string
    Description

    Your own ID of the user.

Request

GET
/v2/organization/identifyUser
curl -G https://do.featurebase.app/v2/organization/identifyUser?email=youruser@example.com \
     -H "X-API-Key: {token}"

Response

{
    "success": true,
    "user": {
        "fbUserId": "5febdbb7b36fdd00129617c4",
        "organization": "demonstration",
        "customFields": {
            "Based In": "Manchester",
        },
        "companies": [
            {
                "id": "23",
                "name": "Business Inc.",
                "monthlySpend": 1000,
                "customFields": {
                    "Location": "Canada"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            },
            {
                "id": "43",
                "name": "Second company",
                "monthlySpend": 1900,
                "customFields": {
                    "Location": "Tallinn"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            }
        ],
        "externalUserId": "3216544",
        "id": "6465431c1f9677b6de697168",
        "name": "John Steezy",
        "email": "youruser@gmail.com",
        "profilePicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/3110ce26-faa9-46d4-b39a-8a2d99f7fd00.png",
        "roleDetails": {"name": "Paid User", "id": "6465431c1f9677b6de697168"} // Only sent along for enterprise users with roles set up.
    }
}

GET/v2/organization/identifyUser/query

Query identified users

This endpoint allows you to paginate through all identified users in your organization.

Optional attributes

    • Name
      page
      Type
      string
      Description

      Page number to fetch. (Default: 1)

    • Name
      limit
      Type
      string
      Description

      Number of users to fetch per page. (Default: 10)

    • Name
      sortBy
      Type
      string
      Description

      Field to sort by. (Allowed values: "topPosters", "topCommenters", "lastActivity". Default: "lastActivity")

  • Name
    q
    Type
    string
    Description

    Query string to search for users by name or email.

  • Name
    segment
    Type
    string
    Description

    Segment to filter users by. Example: "Paid Users". Learn more here: https://help.featurebase.app/en/articles/8031451-user-segmentation

Request

GET
/v2/organization/identifyUser/query
curl -G https://do.featurebase.app/v2/organization/identifyUser/query?page=1&limit=2&sortBy=lastActivity \
     -H "X-API-Key: {token}"

Response

{
  "success": true,
  "results": [
    {
      "_id": "65f8827aeed085186898aa11",
      "organization": "yourorganizationsubdomain",
      "fbUserId": "65331079560b83582f73768c",
      "externalUserId": "123456789",
      "companies": [
        {
                "id": "23",
                "name": "Business Inc.",
                "monthlySpend": 1000,
                "customFields": {
                    "Location": "Canada"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            },
            {
                "id": "43",
                "name": "Second company",
                "monthlySpend": 1900,
                "customFields": {
                    "Location": "Tallinn"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            }
      ],
      "email": "user_one@example.com",
      "name": "User One",
      "profilePicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/fallback-8d359061-f581-4a88-8d04-afeed7a92b8d.png",
      "commentsCreated": 3,
      "postsCreated": 0,
      "lastActivity": "2024-03-21T13:59:47.595Z",
      "createdAt": "2024-03-18T18:05:46.977Z",
      "updatedAt": "2024-03-21T13:59:47.673Z",
      "__v": 0
    },
    {
      "_id": "65955983372a181bcfae1941",
      "fbUserId": "5fef50c5e9458a0012f82456",
      "organization": "yourorganizationsubdomain",
      "__v": 0,
      "companies": [
        {
                "id": "23",
                "name": "Business Inc.",
                "monthlySpend": 1000,
                "customFields": {
                    "Location": "Canada"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            },
            {
                "id": "43",
                "name": "Second company",
                "monthlySpend": 1900,
                "customFields": {
                    "Location": "Tallinn"
                },
                "createdAt": "2023-05-18T16:15:05.574Z"
            }
      ],
      "createdAt": "2024-01-03T12:56:35.559Z",
      "email": "user_two@example.com",
      "lastActivity": "2024-03-21T12:53:56.512Z",
      "name": "User Two",
      "postsCreated": 19,
      "commentsCreated": 54,
      "profilePicture": "https://fb-usercontent.fra1.cdn.digitaloceanspaces.com/1693132126228.jpg",
      "updatedAt": "2024-03-21T12:53:56.631Z"
    }
  ],
  "page": 1,
  "limit": 2,
  "totalResults": 37
}

POST/v2/organization/identifyUser

Identify user

This endpoint allows you to add additional data to your users in Featurebase. Add your own customer id, custom fields, companies, MRR they provide to get the best overview.

When your users data changes, you can update it using the same endpoint. We will automatically update the data in Featurebase.

Required attributes

  • Name
    email
    Type
    string
    Description

    Email of the user to be identified.

  • Name
    name
    Type
    string
    Description

    Name of the user to be identified.

  • Name
    id
    Type
    string
    Description

    ID of the user to be identifed.

Optional attributes

  • Name
    profilePicture
    Type
    string
    Description

    URL of the users profile picture.

  • Name
    subscribedToChangelog
    Type
    boolean
    Description

    Whether the user is subscribed to receive emails when you publish a changelog.

  • Name
    companies
    Type
    Company[]
    Description

    Array of companies this user is associated with. Refer to the company model for more information here.

  • Name
    customFields
    Type
    object
    Description

    Object containing key-value pairs of custom fields.

  • Name
    createdAt
    Type
    date
    Description

    Date when the user was created.

  • Name
    roles
    Type
    string[]
    Description

    Assign this user to roles. Refer to the role model for more information here.

  • Name
    locale
    Type
    string
    Description

    The user's preferred language code (e.g., "en" for English). This ensures the user receives changelog emails in the correct language.

Request

POST
/v2/organization/identifyUser
curl -X 'POST' 'https://do.featurebase.app/v2/organization/identifyUser' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "email": "youruser@example.com",
        "name": "John Steezy",
        "id": "123456789",
        "subscribedToChangelog": true,
        "profilePicture": "https://example.com/profile.jpg",
        "createdAt": "2023-05-19T15:35:49.915Z",
        "roles": ["Paid Member"],
        "customFields": {
            "title": "Product Manager",
            "plan": "Premium"
        },
        "locale": "en",
        "companies": [
            {
                "id": "987654321",
                "name": "Business Inc.",
                "monthlySpend": 500,
                "createdAt": "2023-05-19T15:35:49.915Z",
                "customFields": {
                    "location": "Canada",
                    "language": "French"
                }
            }
        ]
      }'

Response

{
    "success": true
}

DELETE/v2/organization/deleteUser

Delete user

This endpoint allows you to delete a user from your organization. This will remove all data associated with this user from your Featurebase account.

Required attributes

  • Name
    email
    Type
    string
    Description

    Email of the user.

Request

DELETE
/v2/organization/deleteUser
curl -X 'DELETE' 'https://do.featurebase.app/v2/organization/deleteUser' \
  -H 'X-API-Key: {token}' \
  -H 'Content-Type: application/json' \
  -d '{
        "email": "youruser@example.com"
      }'

Response

{
    "success": true,
}