Skip to content

Docs

POST /get_billing

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

Operation

{
  "post": {
    "description": "Show the account's plan (a running trial shows as Team trial), its limits and usage per social set (workspace): channels, members, X posts this month; the monthly credit allowance (spent first, resets), credits that never expire, and the `credits.available` balance (minus what running AI holds); trial end and renewal. Check it before a tool that costs credits and tell the person when it's too low, or to explain a plan limit. Credits pay only for heyeveryone's own AI; MCP and API calls are free. Read-only; only the person changes billing.",
    "operationId": "get_billing",
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "accountId": {
                "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": "object"
          }
        }
      },
      "required": true
    },
    "responses": {
      "200": {
        "content": {
          "application/json": {
            "schema": {
              "additionalProperties": false,
              "properties": {
                "accountId": {
                  "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"
                },
                "billing": {
                  "enum": [
                    "live",
                    "not_configured"
                  ],
                  "type": "string"
                },
                "checkout": {
                  "additionalProperties": false,
                  "properties": {
                    "open": {
                      "type": "boolean"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "open",
                    "note"
                  ],
                  "type": "object"
                },
                "plan": {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tagline": {
                      "type": "string"
                    },
                    "monthlyCredits": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "prices": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "month": {
                              "additionalProperties": false,
                              "properties": {
                                "amount": {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                "currency": {
                                  "type": "string"
                                },
                                "display": {
                                  "type": "string"
                                },
                                "interval": {
                                  "enum": [
                                    "month",
                                    "year"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency",
                                "display",
                                "interval"
                              ],
                              "type": "object"
                            },
                            "year": {
                              "additionalProperties": false,
                              "properties": {
                                "amount": {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                "currency": {
                                  "type": "string"
                                },
                                "display": {
                                  "type": "string"
                                },
                                "interval": {
                                  "enum": [
                                    "month",
                                    "year"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency",
                                "display",
                                "interval"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "month",
                            "year"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "extraSetPrices": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "month": {
                              "additionalProperties": false,
                              "properties": {
                                "amount": {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                "currency": {
                                  "type": "string"
                                },
                                "display": {
                                  "type": "string"
                                },
                                "interval": {
                                  "enum": [
                                    "month",
                                    "year"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency",
                                "display",
                                "interval"
                              ],
                              "type": "object"
                            },
                            "year": {
                              "additionalProperties": false,
                              "properties": {
                                "amount": {
                                  "maximum": 9007199254740991,
                                  "minimum": -9007199254740991,
                                  "type": "integer"
                                },
                                "currency": {
                                  "type": "string"
                                },
                                "display": {
                                  "type": "string"
                                },
                                "interval": {
                                  "enum": [
                                    "month",
                                    "year"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "currency",
                                "display",
                                "interval"
                              ],
                              "type": "object"
                            },
                            "monthlyCredits": {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "month",
                            "year",
                            "monthlyCredits"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "limits": {
                      "additionalProperties": false,
                      "properties": {
                        "workspaces": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccounts": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccountsPerWorkspace": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "membersPerWorkspace": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "activeShareLinks": {
                          "anyOf": [
                            {
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "aiAccess": {
                          "type": "boolean"
                        },
                        "xPostsPerWorkspacePerMonth": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "xLinkPostsPerWorkspacePerMonth": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "workspaces",
                        "channelAccounts",
                        "channelAccountsPerWorkspace",
                        "membersPerWorkspace",
                        "activeShareLinks",
                        "aiAccess",
                        "xPostsPerWorkspacePerMonth",
                        "xLinkPostsPerWorkspacePerMonth"
                      ],
                      "type": "object"
                    },
                    "basePlanId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tagline",
                    "monthlyCredits",
                    "prices",
                    "extraSetPrices",
                    "limits",
                    "basePlanId"
                  ],
                  "type": "object"
                },
                "subscription": {
                  "additionalProperties": false,
                  "properties": {
                    "planId": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "trialing",
                        "past_due",
                        "canceled",
                        "incomplete"
                      ],
                      "type": "string"
                    },
                    "interval": {
                      "anyOf": [
                        {
                          "enum": [
                            "month",
                            "year"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currentPeriodEnd": {
                      "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"
                        }
                      ]
                    },
                    "cancelAtPeriodEnd": {
                      "type": "boolean"
                    },
                    "renewsAt": {
                      "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"
                        }
                      ]
                    },
                    "hasBillingAccount": {
                      "type": "boolean"
                    },
                    "hasSubscription": {
                      "type": "boolean"
                    },
                    "source": {
                      "enum": [
                        "stripe",
                        "staff",
                        "trial",
                        "free"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "planId",
                    "status",
                    "interval",
                    "currentPeriodEnd",
                    "cancelAtPeriodEnd",
                    "renewsAt",
                    "hasBillingAccount",
                    "hasSubscription",
                    "source"
                  ],
                  "type": "object"
                },
                "trial": {
                  "additionalProperties": false,
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "endsAt": {
                      "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"
                        }
                      ]
                    },
                    "daysLeft": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "active",
                    "endsAt",
                    "daysLeft"
                  ],
                  "type": "object"
                },
                "socialSets": {
                  "additionalProperties": false,
                  "properties": {
                    "included": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "extra": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "max": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "used": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "sets": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "workspaceId": {
                            "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"
                          },
                          "readOnly": {
                            "type": "boolean"
                          },
                          "channels": {
                            "additionalProperties": false,
                            "properties": {
                              "used": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              "max": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "used",
                              "max"
                            ],
                            "type": "object"
                          },
                          "members": {
                            "additionalProperties": false,
                            "properties": {
                              "used": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              "max": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "used",
                              "max"
                            ],
                            "type": "object"
                          },
                          "x": {
                            "additionalProperties": false,
                            "properties": {
                              "month": {
                                "type": "string"
                              },
                              "posts": {
                                "additionalProperties": false,
                                "properties": {
                                  "used": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "max": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "used",
                                  "max"
                                ],
                                "type": "object"
                              },
                              "linkPosts": {
                                "additionalProperties": false,
                                "properties": {
                                  "used": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "max": {
                                    "anyOf": [
                                      {
                                        "maximum": 9007199254740991,
                                        "minimum": -9007199254740991,
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "used",
                                  "max"
                                ],
                                "type": "object"
                              },
                              "resetsAt": {
                                "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"
                              }
                            },
                            "required": [
                              "month",
                              "posts",
                              "linkPosts",
                              "resetsAt"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "workspaceId",
                          "name",
                          "readOnly",
                          "channels",
                          "members",
                          "x"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "included",
                    "extra",
                    "max",
                    "used",
                    "sets"
                  ],
                  "type": "object"
                },
                "usage": {
                  "additionalProperties": false,
                  "properties": {
                    "workspaces": {
                      "additionalProperties": false,
                      "properties": {
                        "used": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "max": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "used",
                        "max"
                      ],
                      "type": "object"
                    },
                    "channelAccounts": {
                      "additionalProperties": false,
                      "properties": {
                        "used": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "max": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "used",
                        "max"
                      ],
                      "type": "object"
                    },
                    "activeShareLinks": {
                      "additionalProperties": false,
                      "properties": {
                        "used": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "max": {
                          "anyOf": [
                            {
                              "maximum": 9007199254740991,
                              "minimum": -9007199254740991,
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "used",
                        "max"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "workspaces",
                    "channelAccounts",
                    "activeShareLinks"
                  ],
                  "type": "object"
                },
                "credits": {
                  "additionalProperties": false,
                  "properties": {
                    "balance": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "held": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "available": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "monthlyAllowance": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "allowance": {
                      "additionalProperties": false,
                      "properties": {
                        "granted": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "used": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "remaining": {
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991,
                          "type": "integer"
                        },
                        "periodStart": {
                          "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"
                            }
                          ]
                        },
                        "resetsAt": {
                          "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": [
                        "granted",
                        "used",
                        "remaining",
                        "periodStart",
                        "resetsAt"
                      ],
                      "type": "object"
                    },
                    "nonExpiring": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "balance",
                    "held",
                    "available",
                    "monthlyAllowance",
                    "allowance",
                    "nonExpiring"
                  ],
                  "type": "object"
                },
                "availablePlans": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "tagline": {
                        "type": "string"
                      },
                      "monthlyCredits": {
                        "maximum": 9007199254740991,
                        "minimum": -9007199254740991,
                        "type": "integer"
                      },
                      "prices": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "month": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "type": "string"
                                  },
                                  "display": {
                                    "type": "string"
                                  },
                                  "interval": {
                                    "enum": [
                                      "month",
                                      "year"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency",
                                  "display",
                                  "interval"
                                ],
                                "type": "object"
                              },
                              "year": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "type": "string"
                                  },
                                  "display": {
                                    "type": "string"
                                  },
                                  "interval": {
                                    "enum": [
                                      "month",
                                      "year"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency",
                                  "display",
                                  "interval"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "month",
                              "year"
                            ],
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "extraSetPrices": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "month": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "type": "string"
                                  },
                                  "display": {
                                    "type": "string"
                                  },
                                  "interval": {
                                    "enum": [
                                      "month",
                                      "year"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency",
                                  "display",
                                  "interval"
                                ],
                                "type": "object"
                              },
                              "year": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "maximum": 9007199254740991,
                                    "minimum": -9007199254740991,
                                    "type": "integer"
                                  },
                                  "currency": {
                                    "type": "string"
                                  },
                                  "display": {
                                    "type": "string"
                                  },
                                  "interval": {
                                    "enum": [
                                      "month",
                                      "year"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency",
                                  "display",
                                  "interval"
                                ],
                                "type": "object"
                              },
                              "monthlyCredits": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "month",
                              "year",
                              "monthlyCredits"
                            ],
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "limits": {
                        "additionalProperties": false,
                        "properties": {
                          "workspaces": {
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channelAccounts": {
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "channelAccountsPerWorkspace": {
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "membersPerWorkspace": {
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "activeShareLinks": {
                            "anyOf": [
                              {
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "aiAccess": {
                            "type": "boolean"
                          },
                          "xPostsPerWorkspacePerMonth": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "xLinkPostsPerWorkspacePerMonth": {
                            "anyOf": [
                              {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "workspaces",
                          "channelAccounts",
                          "channelAccountsPerWorkspace",
                          "membersPerWorkspace",
                          "activeShareLinks",
                          "aiAccess",
                          "xPostsPerWorkspacePerMonth",
                          "xLinkPostsPerWorkspacePerMonth"
                        ],
                        "type": "object"
                      },
                      "current": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "tagline",
                      "monthlyCredits",
                      "prices",
                      "extraSetPrices",
                      "limits",
                      "current"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "creditPacks": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "credits": {
                        "maximum": 9007199254740991,
                        "minimum": -9007199254740991,
                        "type": "integer"
                      },
                      "price": {
                        "additionalProperties": false,
                        "properties": {
                          "amount": {
                            "maximum": 9007199254740991,
                            "minimum": -9007199254740991,
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string"
                          },
                          "display": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "currency",
                          "display"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "credits",
                      "price"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "accountId",
                "billing",
                "checkout",
                "plan",
                "subscription",
                "trial",
                "socialSets",
                "usage",
                "credits",
                "availablePlans",
                "creditPacks"
              ],
              "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": "Get plan and billing",
    "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"
    ]
  }
]