API Reference
Users

Users

The Daffy API let's you get information about you and other Daffy users

Get Your Profile

Resource

GET    /v1/users/me

Sample Response

{
  "id": 1,
  "name": "Api User Name",
  "avatar": "https://static.daffy.org/avatars/1/api-user-avatar",
  "cover_image": "https://static.daffy.org/covers/1/api-user-cover",
  "slug": "api-user",
  "fund_name": "Api User Fund",
  "current_fund": {
    "id": 1,
    "name": "Api User Fund",
    "summary": "Api User Summary",
    "causes": [
      {
        "id": 11,
        "name": "International",
        "color": "#FEC398",
        "logo": "https://static.daffy.org/assets/default-non-profit-avatars/Default_International.png"
      }
    ],
    "users": [
      {
        "id": 1,
        "name": "Api User",
        "avatar": "https://static.daffy.org/avatars/1/api-user-avatar",
        "slug": "api-user"
      },
      {
        "id": 2,
        "name": "Api User's Spouse",
        "avatar": "https://static.daffy.org/avatars/1/api-user-spouse-avatar",
        "slug": "api-user-spouse"
      }
    ]
  },
  "follows_user": false,
  "follows_viewer": false
}

Response Reference

NameTypeDescription
idnumberThe ID of the user
namestringThe name of the user
avatarstringThe URL of the user's avatar
cover_imagestringThe URL of the user's cover image
slugstringThe slug of the user's profile
fund_namestringThe name of the user's fund
current_fundobjectCurrent fund object associated with the user. It has its own properties
follows_userbooleanWhether the viewer is following this user
follows_viewerbooleanWhether this user is followed by the viewer
fund.idnumberThe ID of the fund
fund.namestringThe name of the fund
fund.summarystringThe summary of the fund
fund.causes.idnumberThe ID of the cause
fund.causes.namestringThe name of the cause
fund.causes.colorstringThe color associated with the cause
fund.causes.logostringThe URL of the cause's logo
fund.users.idnumberThe ID of the user
fund.users.namestringThe name of the user
fund.users.avatarstringThe URL of the user's avatar
fund.users.slugstringThe slug of the user's profile

Sample Request

curl "https://public.daffy.org/v1/users/me" -H 'X-Api-Key: <YOUR KEY HERE>'

Get User Profile by username

Resource

GET    /v1/users/:username

Path Params

NameTypeDescription
usernamestringusername

Sample Response

{
  "id": 1,
  "name": "Api User Name",
  "avatar": "https://static.daffy.org/avatars/1/api-user-avatar",
  "cover_image": "https://static.daffy.org/covers/1/api-user-cover",
  "slug": "api-user",
  "fund_name": "Api User Fund",
  "current_fund": {
    "id": 1,
    "name": "Api User Fund",
    "summary": "Api User Summary",
    "causes": [
      {
        "id": 11,
        "name": "International",
        "color": "#FEC398",
        "logo": "https://static.daffy.org/assets/default-non-profit-avatars/Default_International.png"
      }
    ],
    "users": [
      {
        "id": 1,
        "name": "Api User",
        "avatar": "https://static.daffy.org/avatars/1/api-user-avatar",
        "slug": "api-user"
      },
      {
        "id": 2,
        "name": "Api User's Spouse",
        "avatar": "https://static.daffy.org/avatars/1/api-user-spouse-avatar",
        "slug": "api-user-spouse"
      }
    ]
  },
  "follows_user": false,
  "follows_viewer": false
}

Response Reference

NameTypeDescription
idnumberThe ID of the user
namestringThe name of the user
avatarstringThe URL of the user's avatar
cover_imagestringThe URL of the user's cover image
slugstringThe slug of the user's profile
fund_namestringThe name of the user's fund
current_fundobjectCurrent fund object associated with the user. It has its own properties
follows_userbooleanWhether the viewer is following this user
follows_viewerbooleanWhether this user is followed by the viewer
fund.idnumberThe ID of the fund
fund.namestringThe name of the fund
fund.summarystringThe summary of the fund
fund.causes.idnumberThe ID of the cause
fund.causes.namestringThe name of the cause
fund.causes.colorstringThe color associated with the cause
fund.causes.logostringThe URL of the cause's logo
fund.users.idnumberThe ID of the user
fund.users.namestringThe name of the user
fund.users.avatarstringThe URL of the user's avatar
fund.users.slugstringThe slug of the user's profile

Sample Request

curl "https://public.daffy.org/v1/users/api-user" -H 'X-Api-Key: <YOUR KEY HERE>'