API Reference

Build on the UpGPT platform with our REST API.

Authentication

All API requests require an API key passed in the Authorization header. You can generate API keys from your dashboard under Settings → API Keys.

curl -X GET https://api.upgpt.ai/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

API keys are scoped to your workspace and carry the same permissions as the user who created them. Treat your API key like a password -- do not expose it in client-side code.

Base URL

All API endpoints are available at:

https://api.upgpt.ai/v1/

Endpoints Overview

Agents

MethodEndpointDescription
GET/v1/agentsList all agents in your workspace
GET/v1/agents/:idGet agent details
POST/v1/agentsCreate a new agent
PATCH/v1/agents/:idUpdate agent configuration
DELETE/v1/agents/:idDelete an agent

Leads & Contacts

MethodEndpointDescription
GET/v1/leadsList leads with optional filters
POST/v1/leadsCreate a new lead
GET/v1/leads/:idGet lead details and history
PATCH/v1/leads/:idUpdate lead information

Bookings

MethodEndpointDescription
GET/v1/bookingsList all bookings
POST/v1/bookingsCreate a booking
DELETE/v1/bookings/:idCancel a booking

Webhooks

MethodEndpointDescription
GET/v1/webhooksList registered webhooks
POST/v1/webhooksRegister a webhook endpoint
DELETE/v1/webhooks/:idRemove a webhook

Rate Limits

API requests are rate-limited per workspace to ensure platform stability:

PlanRequests / minuteRequests / day
Starter6010,000
Professional300100,000
Enterprise1,000Unlimited

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response. When a limit is exceeded, the API returns 429 Too Many Requests.

Webhooks

UpGPT can send real-time event notifications to your endpoints via webhooks. Supported events include:

  • booking.created -- A new booking has been scheduled
  • booking.cancelled -- A booking has been cancelled
  • lead.qualified -- A lead has been qualified by an AI agent
  • lead.routed -- A lead has been routed to a representative
  • agent.escalation -- An agent has escalated a conversation
  • payment.received -- A payment has been processed

Webhook payloads are signed with HMAC-SHA256 using your webhook secret. Always verify signatures before processing events in production.

SDKs

Official SDKs are available for popular languages. Each SDK wraps the REST API and handles authentication, retries, and error handling automatically.

LanguagePackageStatus
JavaScript / TypeScript@upgpt/sdkAvailable
Pythonupgpt-pythonAvailable
Goupgpt-goComing soon
Rubyupgpt-rubyComing soon

Error Handling

The API returns standard HTTP status codes and a consistent JSON error body:

{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked.",
    "status": 401
  }
}
StatusMeaning
200Success
201Created
400Bad request -- check your parameters
401Unauthorized -- invalid or missing API key
403Forbidden -- insufficient permissions
404Not found
429Rate limited
500Internal server error

Need help integrating? Our team is here to assist.

Contact Support