Skip to content

REST API

Profile: 6 routes.

All under /wp-json/davo/v1. Every route has a description in the source.

  • GET4
  • POST2
  • PUT1
  • PATCH1
  • DELETE2

/profile/{user_id}

GETPublic

Returns a member's profile as the current viewer is allowed to see it.

Handler: get_profile()

Parameters of GET /profile/{user_id}
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl "https://example.com/wp-json/davo/v1/profile/{user_id}"

PUTPATCHAccess check: owner_permission

Updates a member's profile fields, privacy settings and custom fields.

Handler: update_profile()

No parameters declared in the route registration.

curl
curl -X PUT -u "user:application-password" "https://example.com/wp-json/davo/v1/profile/{user_id}"

src/domains/profile/routes.php:87

/profile/{user_id}/avatar

POSTAccess check: avatar_permission

Uploads a member's avatar. Send the image as the multipart file field.

Handler: upload_avatar()

Parameters of POST /profile/{user_id}/avatar
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/profile/{user_id}/avatar"

DELETEAccess check: avatar_permission

Removes a member's avatar and returns the empty avatar.

Handler: delete_avatar()

Parameters of DELETE /profile/{user_id}/avatar
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/profile/{user_id}/avatar"

src/domains/profile/routes.php:189

/profile/{user_id}/contributions

GETPublic

Read the same public preview used by the initial profile template.

Handler: get_contributions()

Parameters of GET /profile/{user_id}/contributions
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl "https://example.com/wp-json/davo/v1/profile/{user_id}/contributions"

src/domains/profile/routes.php:58

/profile/{user_id}/cover

POSTAccess check: owner_permission

Uploads a member's cover image. Send the image as the multipart file field.

Handler: upload_cover()

Parameters of POST /profile/{user_id}/cover
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/profile/{user_id}/cover"

DELETEAccess check: owner_permission

Removes a member's cover image and returns the empty cover.

Handler: delete_cover()

Parameters of DELETE /profile/{user_id}/cover
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/profile/{user_id}/cover"

src/domains/profile/routes.php:266

/profile/{user_id}/gamification-position

GETPublic

Returns a member's position on a gamification leaderboard, by board and period.

Handler: get_gamification_position()

Parameters of GET /profile/{user_id}/gamification-position
ParameterTypeRequiredDefault or allowed values
user_idsee source——
boardstring—reputation
periodstring—alltime | weekly | monthly
curl
curl "https://example.com/wp-json/davo/v1/profile/{user_id}/gamification-position"

src/domains/profile/routes.php:382

/profile/{user_id}/stats

GETPublic

Returns a member's profile statistics.

Handler: get_stats()

Parameters of GET /profile/{user_id}/stats
ParameterTypeRequiredDefault or allowed values
user_idsee source——
curl
curl "https://example.com/wp-json/davo/v1/profile/{user_id}/stats"

src/domains/profile/routes.php:343

Note. Generated from the plugin source. Parameters are the ones declared when the route is registered; a parameter marked “see source” uses a shared definition. Responses are not documented here. Authenticate as for any WordPress REST route, for example with an application password over HTTPS; the example paths use https://example.com.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first