Skip to main content

Staging and production accounts

Enterprise customers can have two accounts: one for staging and one for production. Both call the same base URL, https://api.thedogapi.com/v1. What separates them is the API key.

StagingProduction
Base URLhttps://api.thedogapi.com/v1https://api.thedogapi.com/v1
KeyIts own keyIts own key
Pets, images, resultsSeparateSeparate
BillingNot billedBilled

Because the two accounts share nothing, a staging key can't read or change a production pet, and nothing you do in staging shows up on your production account or invoice. Test data never has to be cleaned out of production because it was never there.

Getting your staging account​

Ask your account manager, or email us from the address on your production account. We set up the staging account and send its key to whoever you name. We add two or three sample pets with photos, so you can try every endpoint before uploading your own.

Use an environment variable for the key​

Keep the key out of your code, so the same build runs against either account:

export ANIMAL_API_KEY="your-staging-key"

curl -H "x-api-key: $ANIMAL_API_KEY" https://api.thedogapi.com/v1/pets

Things that behave differently in staging​

Body condition reviews go to a real vet. A staging body condition check that goes to a vet is reviewed by a person, just as in production, so the vet's score is not instant. See Body condition score with vet review.

Rate limits may be lower. If a load test needs more, ask us.

Webhooks are separate too. Register your staging endpoint with your staging key. See Webhooks.

Moving to production​

  1. Swap the key for your production key.
  2. Register your production webhook endpoints with the production key, and store their signing secrets.
  3. Check which capabilities are switched on for your production account.

Nothing else changes: the base URL, endpoints and response shapes are the same.