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

# Quick start: Teams

> Get started with the Devin API as a teams or standard organization user

This guide walks you through setting up API access for **teams and standard organizations** (non-enterprise). You'll create a service user, get your credentials, and make your first API call in minutes.

<Note>
  If you're part of an enterprise with multiple organizations, custom roles, or SSO, see the [Enterprise quick start](/api-reference/getting-started/enterprise-quickstart) instead.
</Note>

## Step 1: Create a service user

1. Go to **Settings > Service users** in your organization
2. Click **Create service user**
3. Choose a descriptive name (e.g., "CI Pipeline", "Monitoring Bot")
4. Select a role:
   * **Admin** — full access to manage sessions, knowledge, playbooks, secrets, and settings
   * **Member** — can create and manage Devin sessions, view resources

<Tip>
  Use the **Member** role for most automation. Only use **Admin** if your integration needs to manage org settings or other users.
</Tip>

## Step 2: Generate an API key

1. After creating the service user, click **Generate API key**
2. Copy the key immediately — it starts with `cog_` and won't be shown again
3. Store it securely as an environment variable:

```bash theme={null}
export DEVIN_API_KEY="cog_your_key_here"
```

## Step 3: Make your first API call

Create a Devin session:

```bash theme={null}
export DEVIN_ORG_ID="your_org_id"

curl -X POST "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/sessions" \
  -H "Authorization: Bearer $DEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Create a simple Python script that prints Hello World"}'
```

<Tip>
  Find your organization ID on the **Settings → Service Users** page.
</Tip>

<Note>
  **Want sessions attributed to your user?** By default, sessions are attributed to the service user. To create sessions on behalf of a specific user (so they appear in that user's session list), add `"create_as_user_id": "user_abc123"` to the request body. This requires the **Admin** role (which includes the `ImpersonateOrgSessions` permission). See [Session attribution](/api-reference/overview#session-attribution) for details.
</Note>

## Step 4: Common operations

### List your sessions

```bash theme={null}
curl "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/sessions" \
  -H "Authorization: Bearer $DEVIN_API_KEY"
```

### Send a message to a running session

```bash theme={null}
export SESSION_ID="your_session_id"

curl -X POST "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/sessions/$SESSION_ID/messages" \
  -H "Authorization: Bearer $DEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Please also add unit tests"}'
```

### Manage knowledge

```bash theme={null}
# List knowledge entries
curl "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/knowledge/notes" \
  -H "Authorization: Bearer $DEVIN_API_KEY"

# Create a knowledge entry
curl -X POST "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/knowledge/notes" \
  -H "Authorization: Bearer $DEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Coding standards", "trigger_description": "When writing code", "body": "Use TypeScript strict mode..."}'
```

## Permissions for teams users

Teams organizations have a simple permission model:

| Role       | Can create sessions | Can manage resources                | Can manage settings |
| ---------- | ------------------- | ----------------------------------- | ------------------- |
| **Member** | Yes                 | Yes (knowledge, playbooks, secrets) | No                  |
| **Admin**  | Yes                 | Yes                                 | Yes                 |

For fine-grained role-based access control (RBAC), see the [Enterprise quick start](/api-reference/getting-started/enterprise-quickstart).

## Next steps

* Browse the **Organization API** endpoints in the sidebar
* See [common flows](/api-reference/common-flows) for common integration patterns
* Learn about [authentication](/api-reference/authentication) in depth
* Set up [scheduled sessions](/api-reference/v3/schedules/organizations-schedules) for recurring tasks
