> ## Documentation Index
> Fetch the complete documentation index at: https://docs.userorbit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with the Userorbit API in 5 minutes

## Prerequisites

Before you begin, make sure you have:

* A Userorbit account ([sign up here](https://app.userorbit.com/signup))
* An API key ([get yours here](https://app.userorbit.com/settings/api))

## Step 1: Make Your First Request

Let's verify your API key works by fetching your team information:

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.userorbit.com/v1/teams.info \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.userorbit.com/v1/teams.info', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log('Team:', data.data.name);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.userorbit.com/v1/teams.info',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      }
  )

  team = response.json()['data']
  print(f"Team: {team['name']}")
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Acme Corp",
      "subdomain": "acme",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  }
  ```
</ResponseExample>

## Step 2: Create Feedback

Now let's create a piece of feedback programmatically:

<CodeGroup>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```javascript JavaScript theme={null}
  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({
      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'
    })
  });

  const feedback = await response.json();
  console.log('Created feedback:', feedback.data.id);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.userorbit.com/v1/feedbacks.create',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          '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'
      }
  )

  feedback = response.json()['data']
  print(f"Created feedback: {feedback['id']}")
  ```
</CodeGroup>

## Step 3: List Feedback

Retrieve all feedback with filtering and sorting:

<CodeGroup>
  ```bash cURL theme={null}
  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"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.userorbit.com/v1/public/feedbacks.list?sortBy=top&limit=10',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      }
    }
  );

  const { data, pagination } = await response.json();
  console.log(`Found ${pagination.count} total feedback items`);
  console.log('Top feedback:', data[0].title);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.userorbit.com/v1/public/feedbacks.list',
      params={'sortBy': 'top', 'limit': 10},
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      }
  )

  result = response.json()
  print(f"Found {result['pagination']['count']} total feedback items")
  print(f"Top feedback: {result['data'][0]['title']}")
  ```
</CodeGroup>

## Step 4: Update Feedback Status

Update feedback and trigger webhooks:

<CodeGroup>
  ```bash cURL theme={null}
  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"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.userorbit.com/v1/feedbacks.update', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      id: 'FEEDBACK_ID',
      status: 'in_progress',
      priority: 'high'
    })
  });

  const updated = await response.json();
  console.log('Updated status:', updated.data.status);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.userorbit.com/v1/feedbacks.update',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'id': 'FEEDBACK_ID',
          'status': 'in_progress',
          'priority': 'high'
      }
  )

  updated = response.json()['data']
  print(f"Updated status: {updated['status']}")
  ```
</CodeGroup>

<Info>
  When you update the status, this triggers a `feedback_status_change` webhook event if you have Zapier subscriptions set up.
</Info>

## Step 5: Set Up Webhooks (Optional)

Subscribe to real-time events with Zapier:

```bash theme={null}
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:

```javascript theme={null}
// 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:

```python theme={null}
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:

```bash theme={null}
# 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:

```javascript theme={null}
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:

```javascript theme={null}
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

<CardGroup cols={2}>
  <Card title="Explore Zapier APIs" icon="plug" href="/api-reference/quickstart">
    Set up webhooks and real-time integrations
  </Card>

  <Card title="Public Widget APIs" icon="window" href="/api-reference/subscribers/subscriber-identify">
    Build embedded feedback widgets
  </Card>

  <Card title="Admin APIs" icon="user-shield" href="/api-reference/feedback/management/feedback-create">
    Full CRUD operations and management
  </Card>

  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    Deep dive into authentication methods
  </Card>
</CardGroup>

## Need Help?

* Check out our [full API reference](/api-reference/introduction)
* Join our [community](https://community.userorbit.com)
* Contact [support](mailto:support@userorbit.com)
