Skip to main content

Prerequisites

Before you begin, make sure you have:

Step 1: Make Your First Request

Let’s verify your API key works by fetching your team information:
curl https://api.userorbit.com/v1/teams.info \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Corp",
    "subdomain": "acme",
    "createdAt": "2024-01-01T00:00:00Z"
  }
}

Step 2: Create Feedback

Now let’s create a piece of feedback programmatically:
curl https://api.userorbit.com/v1/feedbacks.create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Add dark mode support",
    "text": "It would be great to have a dark mode option",
    "status": "in_review",
    "priority": "medium",
    "creatorEmail": "user@example.com",
    "creatorName": "John Doe"
  }'

Step 3: List Feedback

Retrieve all feedback with filtering and sorting:
curl 'https://api.userorbit.com/v1/public/feedbacks.list?sortBy=top&limit=10' \
  -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Step 4: Update Feedback Status

Update feedback and trigger webhooks:
curl https://api.userorbit.com/v1/feedbacks.update \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "FEEDBACK_ID",
    "status": "in_progress",
    "priority": "high"
  }'
When you update the status, this triggers a feedback_status_change webhook event if you have Zapier subscriptions set up.

Step 5: Set Up Webhooks (Optional)

Subscribe to real-time events with Zapier:
curl https://api.userorbit.com/v1/zapier.subscribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target_url": "https://hooks.zapier.com/hooks/catch/YOUR_WEBHOOK",
    "event": "new_feedback"
  }'
Now whenever new feedback is created, your webhook will be notified!

Common Use Cases

1. Feedback Widget

Build a feedback widget for your app:
// Initialize subscriber
const subscriber = await fetch('/v1/public/subscriber.identify', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: currentUser.email,
    name: currentUser.name
  })
});

const { code } = await subscriber.json();

// Submit feedback as subscriber
const feedback = await fetch('/v1/public/feedbacks.create', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${code}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: feedbackTitle,
    text: feedbackText
  })
});

2. Support Ticket → Feedback

Convert support tickets to feedback:
def create_feedback_from_ticket(ticket):
    response = requests.post(
        'https://api.userorbit.com/v1/feedbacks.create',
        headers={'Authorization': f'Bearer {API_KEY}'},
        json={
            'title': ticket.subject,
            'text': ticket.description,
            'status': 'in_review',
            'priority': ticket.priority,
            'creatorEmail': ticket.customer_email,
            'creatorName': ticket.customer_name,
            'meta': {
                'ticket_id': ticket.id,
                'source': 'support_ticket'
            }
        }
    )
    return response.json()

3. Zapier Integration

Monitor feedback votes and notify team:
# Subscribe to votes
curl https://api.userorbit.com/v1/zapier.subscribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "target_url": "https://hooks.zapier.com/...",
    "event": "new_feedback_vote"
  }'

Error Handling

Always handle errors gracefully:
try {
  const response = await fetch('https://api.userorbit.com/v1/feedbacks.create', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(feedbackData)
  });

  if (!response.ok) {
    const error = await response.json();
    console.error('API Error:', error.error);
    throw new Error(error.message);
  }

  const data = await response.json();
  return data;
} catch (error) {
  console.error('Request failed:', error);
}

Rate Limits

Remember to handle rate limits:
const response = await fetch(apiUrl, options);

const remaining = response.headers.get('X-RateLimit-Remaining');
const reset = response.headers.get('X-RateLimit-Reset');

if (remaining === '0') {
  console.log(`Rate limit exceeded. Resets at ${new Date(reset * 1000)}`);
}

Next Steps

Explore Zapier APIs

Set up webhooks and real-time integrations

Public Widget APIs

Build embedded feedback widgets

Admin APIs

Full CRUD operations and management

Authentication

Deep dive into authentication methods

Need Help?