Make your first request
This guide uses the installation token from Create an app and a credential. Call the API from a server. Browsers can only call it from origins configured for the Gateway.
Set up your environment
Section titled “Set up your environment”export INSIDE_GATEWAY_TOKEN="igw_live_..."export GATEWAY="https://api.inside.chat"$env:INSIDE_GATEWAY_TOKEN = "igw_live_..."$env:GATEWAY = "https://api.inside.chat"Send the token in the Authorization header on every request. Never put it in a URL.
-
Check who you are and what you can do.
Terminal window curl -s "$GATEWAY/api/v1/context" -H "Authorization: Bearer $INSIDE_GATEWAY_TOKEN"The response lists the organization, application and installation, the granted scopes and data access flags, any restrictions, when the credential expires, and the guides available to agents.
-
List your websites. This needs the
website_readscope.Terminal window curl -s "$GATEWAY/api/v1/websites" -H "Authorization: Bearer $INSIDE_GATEWAY_TOKEN"{ "websites": [{ "website_id": "web_4927_123" }] } -
See which operations you can use on one website.
Terminal window curl -s "$GATEWAY/api/v1/capabilities?website_id=web_4927_123" \-H "Authorization: Bearer $INSIDE_GATEWAY_TOKEN"operationslists every operation the credential can call on that website right now, with its required scopes and data access. -
Read your first page of conversations. This needs
conversation_read.Terminal window curl -s "$GATEWAY/api/v1/conversations?website_id=web_4927_123&limit=25" \-H "Authorization: Bearer $INSIDE_GATEWAY_TOKEN"Pass
next_cursorfrom the response ascursorto read the next page. Anullnext_cursormeans there are no more pages.
When something goes wrong
Section titled “When something goes wrong”Errors use problem details with a stable code and a request_id:
{ "type": "about:blank", "title": "Request could not be completed", "status": 404, "code": "not_found", "request_id": "..."}401means the token is missing, expired or revoked.404means the website or resource isn’t granted, or doesn’t exist. The two look the same on purpose.429means you reached a quota. Wait for the seconds inRetry-After.
See errors for every status and code.
Next steps
Section titled “Next steps”- Learn the API conventions: IDs, pagination, coverage and rate limits.
- Browse all operations.
- Connect an AI agent with the same credential.