Accounts

The Playbooks API offers the ability to access other accounts (ie teams) associated with your session. In doing so, you're able to act on their behalf, in accordance with your permissions, by passing an account header in your request.

Headers

Header
Type
Description
AccountstringYour account identifier

Convenience Endpoints

To keep things concise, the Playbooks API offers the following convenience endpoints when using the account header:

  • /account
  • /account/*

Depending on the account header you pass, those endpoints will forward your request to the appropriate resource shown below:

  • /session
  • /session/*
  • /session/teams/<team_uuid>
  • /session/teams/<team_uuid>/*

To see this in action, simply copy / paste the following commands and replace the display headers with your own credentials. You should get the same 200 response as shown for both requests.

Convenience Request
curl -L "https://api.playbooks.xyz/account" --header "Authorization: <your_api_key>" --header "Account: <team_uuid>"
Auth Request
curl "https://api.playbooks.xyz/session/teams/<team_uuid>" --header "Authorization: <your_api_key>" --header "Account: <team_uuid>"
Account Response
{ "data": { "type": "teams", "id": "6", "attributes": { "status": "active", "name": "Mile Hi Labs", "tagline": "Elevated Software & System Design", ... } }, "included": [], "meta": {}, }

2024 © Playbooks, Inc