# statusbrew OpenAPI overview

> Below is an overview of the statusbrew openapi in simple language. This API contains 12 endpoints.

For more detailed information of an endpoint, visit https://oapis.org/summary/statusbrew/[idOrRoute]

Analytics API v1.0.0 - https://api.statusbrew.com
<h1><b>Statusbrew Analytics API</b></h1> <p>The <a href="https://statusbrew.com" target="_blank">Statusbrew</a> Analytics API provides an externally accessible API for you to access your owned social profile analytics data so you can use that data to power BI dashboards, automate reporting, etc. </p> <br> <h1><b>Access Requirements & Authentication</b></h1> <p>Before accessing the Analytics API, you must obtain an access token. To do so, contact your Statusbrew's Account Manager. </p> <h3><b>Twitter Content End User License Agreement</b></h3> <p><b>Note -</b> Twitter has additional review and compliance requirements around exposing data through the Statusbrew Analytics API. You’re required to undergo a brief Twitter review and approval before being able to access their Twitter data through the Statusbrew Analytics API. <br><br> Contact your Statusbrew account manager to initiate the review process with Twitter. After Twitter approves your use case, the Account Owner needs to accept the Analytics API Twitter Content End User License Agreement. </p> <br> <h1><b>Analytics API Details</b></h1> <br> <h3><b>API URL</b></h3> <p><code>https://api.statusbrew.com</code></p> <br> <h3><b>Endpoints Overview</b></h3> <table> <thead> <tr> <th width="70%">Customer Endpoints</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>GET /v1/me</code></td> <td>Details of currently logged in User</td> </tr> </tbody> </table> <br> <table> <thead> <tr> <th width="70%">Space Endpoints</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>GET /v1/spaces</code></td> <td>Get a list of the available Spaces</td> </tr> <tr> <td><code>GET /v1/spaces/{space_id}/social_profiles</code></td> <td>Get a list of Social Profiles</td> </tr> <tr> <td><code>GET /v1/spaces/{space_id}/social_profile_groups</code></td> <td>Get a list of Social Profile Groups</td> </tr> <tr> <td><code>GET /v1/spaces/{space_id}/members</code></td> <td>Get a list of Users</td> </tr> <tr> <td><code>GET /v1/spaces/{space_id}/user_groups</code></td> <td>Get a list of User Groups</td> </tr> <tr> <td><code>GET /v1/spaces/{space_id}/tags</code></td> <td>Get a list of Tags</td> </tr> </tbody> </table> <br> <table> <thead> <tr> <th width="70%">Conversation Endpoints</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>GET /v1/spaces/{space_id}/conversation_metric_events</code> </td> <td>Get a list of conversation metric events</td> </tr> <tr> <td> <code>GET /v1/spaces/{space_id}/conversation_activities</code> </td> <td>Get detail logs of activities on a conversation</td> </tr> <tr> <td> <code>GET /v1/spaces/{space_id}/conversations/{conversationId}</code> </td> <td>Get detail of a conversation</td> </tr> </tbody> </table> <br> <table> <thead> <tr> <th width="70%">Contact Endpoints</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>GET /v1/spaces/{space_id}/contacts/{contact_id}</code> </td> <td>Get detail of a particular contact</td> </tr> </tbody> </table> <br> <table> <thead> <tr> <th width="70%">Analytics Endpoints</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>POST /v1/spaces/{space_id}/insights</code> </td> <td>Get values of reporting insights</td> </tr> </tbody> </table> <br> <h3><b>General API Structure</b></h3> <p>All of the external API endpoints use the following naming structure -</p> <p><code>/{version}/spaces/{space_id}/{endpoint_path}</code></p> <p>Where -</p> <ul> <li><b>version</b> is the API major version number</li> <li><b>space_id</b> is your Statusbrew Space Id</li> </ul> <br> <h3><b>Versioning</b></h3> <p>The API is versioned using a MAJOR.MINOR version format. </p> <p>You can specify only the major number in requests, but the full version is included in responses. </p> <p>A major version represents a breaking change to the API, including updates to the syntax and semantics for making requests of the APIs and the syntax and semantics of the response of the API. </p> <p>A minor version represents a backwards compatible change to the API, such as adding new metrics, new endpoints, metric updates, etc. Minor versions are reflected in documentation, but not the API URL itself. Due to the backwards compatibility of minor versions, you only need to specify the major version in the URL path. </p> <h3><b>Rate Limits</b></h3> <p>The number of requests will be limited depending on your Space's current subscription plan.</p> <br> <h1><b>Endpoints</b></h1> <h3><b>Requests</b></h3> <p>All requests have the following format -</p> <h4><b>Request Headers</b></h4> <table> <thead> <tr> <th width="70%">Type</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>Authorization</td> <td>Bearer</td> </tr> <tr> <td>Accept</td> <td>application/json</td> </tr> <tr> <td>Content-Type</td> <td>application/json</td> </tr> </tbody> </table> <h4><b>Request Body</b></h4> <p>The content body for all data API requests are JSON objects. Details of the structure of that JSON object depend on the type of endpoint used. </p> <h3><b>Responses</b></h3> <p></p> <h4><b>HTTP Status Codes</b></h4> <p>The following HTTP status codes returned with the response have the following meanings -</p> <table> <thead> <tr> <th width="20%">Code</th> <th width="40%">Meaning</th> <th width="40%">Corrective Action</th> </tr> </thead> <tbody> <tr> <td>200 OK</td> <td>Request was processed successfully.</td> <td>None. You should be able to access the result of the request in the response body.</td> </tr> <tr> <td>400 Bad Request</td> <td>The request is malformed and does not conform with the request bodies specified in this document.</td> <td>Update the request body.</td> </tr> <tr> <td>401 Unauthorized</td> <td>The request does not contain a valid access token or that access token has expired.</td> <td>Reauthenticate and obtain a fresh token.</td> </tr> <tr> <td>403 Forbidden</td> <td>The request is accessing customer or profile data that the client is not allowed access to.</td> <td>Update the request body.</td> </tr> <tr> <td>404 Not Found</td> <td>The client is requesting an endpoint that does not exist.</td> <td>Check your endpoint, and use an existing endpoint.</td> </tr> <tr> <td>405 Method Not Allowed</td> <td>The client is using an HTTP verb that is not appropriate.</td> <td>Use the HTTP verb listed for the API endpoint you’re using; typically POST or GET. See the specific endpoint documentation for details.</td> </tr> <tr> <td>415 Unsupoported Media Type</td> <td>The client has submitted a request body that is not JSON or is requesting a response that is not JSON</td> <td>Correct the Accept and Content-Type headers to use jSON.</td> </tr> <tr> <td>429 Too Many Requests</td> <td>The client is making requests too quickly or has exhausted the allowed requests in a month.</td> <td>Slow down your requests.</td> </tr> <tr> <td>500 Internal Server Error</td> <td>The server had an issue processing the request.</td> <td>Retry the request. If this code persists, contact support.</td> </tr> <tr> <td>503 Service Unavailable</td> <td>The server is overloaded and cannot process the request.</td> <td>Retry the request. If this code persists, contact support.</td> </tr> <tr> <td>504 Gateway Timeout</td> <td>The server was unable to produce a result in time.</td> <td>Retry the request. If this code persists, contact support or decrease the scope of the request (smaller date ranges, less profiles, etc.).</td> </tr> </tbody> </table> <h4><b>Response Headers</b></h4> <p>The following headers are returned with each response -</p> <table> <thead> <tr> <th width="25%">Header</th> <th width="55%">Description</th> <th width="20%">Sample Value</th> </tr> </thead> <tbody> <tr> <td>X-Brew-API-Version</td> <td>Major and minor version of the response</td> <td>1.1</td> </tr> <tr> <td>X-Brew-Server-Version</td> <td>Server version, including the major, minor, and build number. The major and minor version reflect the latest available version of the API.</td> <td>1.1.3018</td> </tr> </tbody> </table>

## Contact

- [fetchContactDetails](https://oapis.org/openapi/statusbrew/fetchContactDetails): GET https://api.statusbrew.com/spaces/{space_id}/contact/{contact_id} - 

## Conversation

- [fetchConversationMetricEvents](https://oapis.org/openapi/statusbrew/fetchConversationMetricEvents): GET https://api.statusbrew.com/spaces/{space_id}/conversation_metric_events?startAt=string&endAt=string&conversationId=string&metric=string&skip=integer&limit=integer - 
- [fetchConversationActivities](https://oapis.org/openapi/statusbrew/fetchConversationActivities): GET https://api.statusbrew.com/spaces/{space_id}/conversation_activities?startAt=string&endAt=string&conversationId=string&skip=integer&limit=integer - 
- [fetchConversationResource](https://oapis.org/openapi/statusbrew/fetchConversationResource): GET https://api.statusbrew.com/spaces/{space_id}/conversations/{conversationId} - 

## Reports

- [fetchInsights](https://oapis.org/openapi/statusbrew/fetchInsights): POST https://api.statusbrew.com/spaces/{space_id}/insights - 

## Root User

- [fetchMe](https://oapis.org/openapi/statusbrew/fetchMe): GET https://api.statusbrew.com/me - 

## Social Profile Groups

- [fetchSocialProfileGroups](https://oapis.org/openapi/statusbrew/fetchSocialProfileGroups): GET https://api.statusbrew.com/spaces/{space_id}/social_profile_groups - 

## Social Profiles

- [fetchSocialProfiles](https://oapis.org/openapi/statusbrew/fetchSocialProfiles): GET https://api.statusbrew.com/spaces/{space_id}/social_profiles - 

## Space

- [fetchSpaces](https://oapis.org/openapi/statusbrew/fetchSpaces): GET https://api.statusbrew.com/spaces - 

## Tags

- [fetchTags](https://oapis.org/openapi/statusbrew/fetchTags): GET https://api.statusbrew.com/spaces/{space_id}/tags - 

## User Groups

- [fetchUserGroups](https://oapis.org/openapi/statusbrew/fetchUserGroups): GET https://api.statusbrew.com/spaces/{space_id}/user_groups - 

## Users

- [fetchUsers](https://oapis.org/openapi/statusbrew/fetchUsers): GET https://api.statusbrew.com/spaces/{space_id}/members - 
