Skip to content

Docs

POST /whoami

https://heyeveryone.ai/api/v1/whoami

Operation

{
  "post": {
    "description": "Tell you who you are acting as: the heyeveryone account (email, name, onboarding), and for an agent its name and the workspaces it may use, with `access` (read: list and read only) and Autopilot (`autoPublish`, off by default: publish without a person confirming, only on `autopilot.channels`, up to `autopilot.dailyCap` posts per channel in 24 hours). Call it at the start of a session, with list_workspaces. Elsewhere scheduling tools put posts in Updates for a person to confirm.",
    "operationId": "whoami",
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {},
            "type": "object"
          }
        }
      },
      "required": true
    },
    "responses": {
      "200": {
        "content": {
          "application/json": {
            "schema": {
              "additionalProperties": false,
              "properties": {
                "actor": {
                  "enum": [
                    "member",
                    "agent"
                  ],
                  "type": "string"
                },
                "account": {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isStaff": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "type": "string"
                    },
                    "onboarding": {
                      "additionalProperties": false,
                      "properties": {
                        "step": {
                          "anyOf": [
                            {
                              "enum": [
                                "workspace",
                                "channel",
                                "agent",
                                "first_post"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workspaceId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "step",
                        "workspaceId",
                        "completedAt"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "displayName",
                    "isStaff",
                    "createdAt",
                    "onboarding"
                  ],
                  "type": "object"
                },
                "agent": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "oauth",
                            "personal_token"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "kind"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The connected agent you are, or null for a signed-in person."
                },
                "workspaces": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "role": {
                        "description": "The account's role in the workspace.",
                        "enum": [
                          "owner",
                          "editor",
                          "viewer",
                          "commenter",
                          "approver"
                        ],
                        "type": "string"
                      },
                      "autoPublish": {
                        "description": "Autopilot is on: you may schedule and publish without a person confirming, on `autopilot.channels`.",
                        "type": "boolean"
                      },
                      "access": {
                        "description": "read: you can list and read here, not create, edit, schedule, publish or comment.",
                        "enum": [
                          "read",
                          "write"
                        ],
                        "type": "string"
                      },
                      "autopilot": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "channels": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "id": {
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                      "type": "string"
                                    },
                                    "platform": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "usedLast24h": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "platform",
                                    "name",
                                    "usedLast24h"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "dailyCap": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "usedLast24h": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "channels",
                              "dailyCap",
                              "usedLast24h"
                            ],
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Your Autopilot here; null for a person or when it is off."
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "role",
                      "autoPublish",
                      "access",
                      "autopilot"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "appUrl": {
                  "description": "The heyeveryone web app, for links you give the person.",
                  "type": "string"
                }
              },
              "required": [
                "actor",
                "account",
                "agent",
                "workspaces",
                "appUrl"
              ],
              "type": "object"
            }
          }
        },
        "description": "Success"
      },
      "400": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "invalid_input: the body does not match the schema"
      },
      "401": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "unauthenticated: missing, invalid, expired or revoked token"
      },
      "403": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "forbidden: the agent may not do this (for example, another workspace)"
      },
      "404": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "not_found"
      },
      "409": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "conflict"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      },
      "500": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "internal_error"
      }
    },
    "summary": "Who am I",
    "tags": [
      "account"
    ],
    "x-heyeveryone-kind": "query"
  }
}

Referenced definitions

{
  "schemas": {
    "Error": {
      "properties": {
        "error": {
          "description": "A stable error code, for example forbidden.",
          "type": "string"
        },
        "message": {
          "description": "What went wrong, in plain words.",
          "type": "string"
        }
      },
      "required": [
        "error",
        "message"
      ],
      "type": "object"
    }
  },
  "responses": {
    "RateLimited": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "rate_limited: too many requests from this agent, account or address (docs/setup/agents.md, Rate limits); wait the Retry-After seconds, then retry",
      "headers": {
        "Retry-After": {
          "description": "Seconds to wait before retrying.",
          "schema": {
            "minimum": 1,
            "type": "integer"
          }
        }
      }
    }
  }
}

Authentication

{
  "bearer": {
    "description": "Personal access token (hey_pat_...)",
    "scheme": "bearer",
    "type": "http"
  },
  "oauth": {
    "flows": {
      "authorizationCode": {
        "authorizationUrl": "https://heyeveryone.ai/oauth/authorize",
        "refreshUrl": "https://heyeveryone.ai/oauth/token",
        "scopes": {
          "agent": "Act as your agent in the workspaces you choose"
        },
        "tokenUrl": "https://heyeveryone.ai/oauth/token"
      }
    },
    "type": "oauth2"
  }
}

Security requirements

[
  {
    "bearer": []
  },
  {
    "oauth": [
      "agent"
    ]
  }
]