Dog Api

Dog

General Guidelines

Endpoints

Get profile image

When requesting an image what you will obtain is a image/svg+xml.

curl http://localhost:3000/user/{hashedEmail}/image

Example

curl https://dog-api.vercel.app/user/279A853DF1CAAA245E1D0BBB8FFCC2C3/image

Optional parameters

Query key Type
size integer

Get profile details

curl http://localhost:3000/user/{hashedEmail}/details

Example

curl https://dog-api.vercel.app/user/279A853DF1CAAA245E1D0BBB8FFCC2C3/details

Response example

{
  name: 'Teddy',
  age: 7
}

Get profile preferences

curl http://localhost:3000/user/{hashedEmail}/preferences \
  -H 'Authorization: afbe40f8-e5c6-49ab-bfd6-57eba05ae1a0'

Example

curl https://dog-api.vercel.app/user/279A853DF1CAAA245E1D0BBB8FFCC2C3/preferences \
  -H 'Authorization: afbe40f8-e5c6-49ab-bfd6-57eba05ae1a0'

Response example

{
  darkMode: true,
  food: 'Pizza'
}

Post a message

This endpoint does not allow CORS disabled.

curl http://localhost:3000/user/{hashedEmail} \
  -H 'Authorization: afbe40f8-e5c6-49ab-bfd6-57eba05ae1a0'
  -H 'Content-Type: application/json'
  -d "{\"message\":\"Woof\"}"

Example

curl https://dog-api.vercel.app/user/279A853DF1CAAA245E1D0BBB8FFCC2C3 \
  -H 'Authorization: afbe40f8-e5c6-49ab-bfd6-57eba05ae1a0'
  -H 'Content-Type: application/json'
  -d "{\"message\":\"Woof\"}"

Response example

{
  message: 'Woof woof'
}