API Resource: Profile

The 'Profile' resource returns information about the current user's profile as well as allows you to update it.

GET v1/profile.json
Returns an object containing user profile information.

Return Data

{ "first_name": <firstName>, "last_name": <lastName>, "email": <emailAddress>, "api_key": <apiKey>}

Example Usage

curl -u <api_key>:x -X GET https://www.getflix.com.au/api/v1/profile.json
{ "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "api_key": "00000000-0000-0000-0000-000000000000"}

POST v1/profile.json

Updates the profile information for the current user. The following JSON object must be present in the POST body.

{ "first_name": <firstName>, "last_name": <lastName>, "email": <emailAddress>}

firstName: is the user's first name.
lastName: is the user's last name.
emailAddress: is a well formed email address for the user.

Calls to this resource will return a JSON object with a property called 'error' if there were any errors encountered while applying the changes.

Example Usage

curl -u <api_key>:x -X POST -d '{"fist_name":"John","last_name":"Doe","email":"john.doe@example.com"}' https://www.getflix.com.au/api/v1/profile.json

Still need help? Contact Us Contact Us