# Scopes

A scope lets a key reach one group of routes. Give each key only what it needs.

You choose a key's scopes when you create it. A write scope includes its read scope, so `contacts:write` also lets the key read contacts. A key with `["*"]` can reach every public route.

A route that needs a scope the key lacks returns `403 missing_scope` and names the scope.

## Scope reference

This table is generated from the API reference, so it always matches the routes.

| Scope | Routes it allows |
|---|---|
| `analyses:write` | [`POST /v1/analyses`](/docs/api-reference/analyses/create-analysis/) |
| `analytics:read` | [`POST /v1/analytics/query`](/docs/api-reference/analytics/query-analytics/), [`GET /v1/metrics`](/docs/api-reference/analytics/list-metrics/) |
| `companies:read` | [`GET /v1/companies`](/docs/api-reference/companies/list-companies/), [`POST /v1/companies/query`](/docs/api-reference/companies/query-companies/), [`GET /v1/companies/{company_id}/people`](/docs/api-reference/companies/list-company-people/), [`GET /v1/companies/{record_id}`](/docs/api-reference/companies/get-companies/), [`GET /v1/companies/{record_id}/history`](/docs/api-reference/companies/history-companies/), [`GET /v1/companies/{record_id}/timeline`](/docs/api-reference/companies/timeline-companies/) |
| `companies:write` | [`POST /v1/companies`](/docs/api-reference/companies/create-companies/), [`PATCH /v1/companies/{record_id}`](/docs/api-reference/companies/update-companies/), [`DELETE /v1/companies/{record_id}`](/docs/api-reference/companies/archive-companies/), [`POST /v1/companies/{record_id}/restore`](/docs/api-reference/companies/restore-companies/) |
| `contacts:read` | [`GET /v1/contacts`](/docs/api-reference/contacts/list-contacts/), [`POST /v1/contacts/query`](/docs/api-reference/contacts/query-contacts/), [`GET /v1/contacts/{contact_id}/sequence-enrollments`](/docs/api-reference/contacts/list-contact-enrollments/), [`GET /v1/contacts/{record_id}`](/docs/api-reference/contacts/get-contacts/), [`GET /v1/contacts/{record_id}/history`](/docs/api-reference/contacts/history-contacts/), [`GET /v1/contacts/{record_id}/timeline`](/docs/api-reference/contacts/timeline-contacts/) |
| `contacts:read companies:read` | [`GET /v1/lists`](/docs/api-reference/lists/list-lists/), [`GET /v1/lists/{list_id}/members`](/docs/api-reference/lists/list-list-members/) |
| `contacts:write` | [`POST /v1/contacts`](/docs/api-reference/contacts/create-contacts/), [`POST /v1/contacts/{contact_id}/stage`](/docs/api-reference/contacts/move-contact/), [`PATCH /v1/contacts/{record_id}`](/docs/api-reference/contacts/update-contacts/), [`DELETE /v1/contacts/{record_id}`](/docs/api-reference/contacts/archive-contacts/), [`POST /v1/contacts/{record_id}/restore`](/docs/api-reference/contacts/restore-contacts/) |
| `contacts:write companies:write` | [`POST /v1/lists/{list_id}/members`](/docs/api-reference/lists/add-list-members/), [`DELETE /v1/lists/{list_id}/members/{record_id}`](/docs/api-reference/lists/remove-list-member/) |
| `meetings:read` | [`GET /v1/calendar`](/docs/api-reference/meetings/get-calendar/), [`GET /v1/meetings`](/docs/api-reference/meetings/list-meetings/), [`POST /v1/meetings/query`](/docs/api-reference/meetings/query-meetings/) |
| `messages:read` | [`GET /v1/texting/lines`](/docs/api-reference/messages/list-lines/), [`POST /v1/threads/query`](/docs/api-reference/messages/query-threads/), [`GET /v1/threads/{thread_id}/messages`](/docs/api-reference/messages/list-messages/) |
| `messages:write` | [`POST /v1/threads`](/docs/api-reference/messages/create-thread/), [`PATCH /v1/threads/{thread_id}`](/docs/api-reference/messages/update-thread/), [`POST /v1/threads/{thread_id}/messages`](/docs/api-reference/messages/send-message/) |
| `notes:read` | [`GET /v1/notes`](/docs/api-reference/notes/list-notes/) |
| `notes:write` | [`POST /v1/notes`](/docs/api-reference/notes/create-note/), [`PATCH /v1/notes/{note_id}`](/docs/api-reference/notes/update-note/), [`DELETE /v1/notes/{note_id}`](/docs/api-reference/notes/delete-note/) |
| `organization:read` | [`POST /v1/members/query`](/docs/api-reference/organization/query-members/), [`GET /v1/members/{user_id}`](/docs/api-reference/organization/get-member/), [`GET /v1/organization`](/docs/api-reference/organization/get-organization/), [`GET /v1/positions`](/docs/api-reference/organization/list-positions/), [`GET /v1/teams`](/docs/api-reference/organization/list-teams/) |
| `payments:read` | [`POST /v1/payments/query`](/docs/api-reference/payments/query-payments/), [`GET /v1/payments/{payment_id}`](/docs/api-reference/payments/get-payment/) |
| `payments:write` | [`POST /v1/payments`](/docs/api-reference/payments/log-payment/), [`PATCH /v1/payments/{payment_id}`](/docs/api-reference/payments/update-payment/), [`DELETE /v1/payments/{payment_id}`](/docs/api-reference/payments/delete-payment/) |
| `recordings:read` | [`GET /v1/highlights`](/docs/api-reference/recordings/list-highlights/), [`POST /v1/recordings/query`](/docs/api-reference/recordings/query-recordings/), [`GET /v1/recordings/{recording_id}`](/docs/api-reference/recordings/get-recording/), [`GET /v1/recordings/{recording_id}/analysis`](/docs/api-reference/recordings/get-analysis/), [`GET /v1/recordings/{recording_id}/media`](/docs/api-reference/recordings/get-media/), [`GET /v1/recordings/{recording_id}/transcript`](/docs/api-reference/recordings/get-transcript/) |
| `recordings:write` | [`PATCH /v1/recordings/{recording_id}`](/docs/api-reference/recordings/update-recording/), [`POST /v1/recordings/{recording_id}/reanalyze`](/docs/api-reference/recordings/reanalyze/), [`PATCH /v1/recordings/{recording_id}/transcript`](/docs/api-reference/recordings/edit-transcript/) |
| `schema:read` | [`GET /v1/call-outcomes`](/docs/api-reference/fields-and-pipelines/list-outcomes/), [`GET /v1/call-types`](/docs/api-reference/fields-and-pipelines/list-call-types/), [`GET /v1/fields`](/docs/api-reference/fields-and-pipelines/list-fields/), [`GET /v1/picklists`](/docs/api-reference/fields-and-pipelines/list-picklists/), [`GET /v1/pipelines`](/docs/api-reference/fields-and-pipelines/list-pipelines/), [`GET /v1/tags`](/docs/api-reference/fields-and-pipelines/list-tags/) |
| `schema:write` | [`POST /v1/call-outcomes`](/docs/api-reference/fields-and-pipelines/add-outcome/), [`PUT /v1/call-outcomes/order`](/docs/api-reference/fields-and-pipelines/order-outcomes/), [`PATCH /v1/call-outcomes/{key}`](/docs/api-reference/fields-and-pipelines/change-outcome/), [`POST /v1/call-types`](/docs/api-reference/fields-and-pipelines/add-call-type/), [`PUT /v1/call-types/order`](/docs/api-reference/fields-and-pipelines/order-call-types/), [`PATCH /v1/call-types/{key}`](/docs/api-reference/fields-and-pipelines/change-call-type/), [`POST /v1/fields`](/docs/api-reference/fields-and-pipelines/create-field/), [`PUT /v1/fields/order`](/docs/api-reference/fields-and-pipelines/order-fields/), [`PATCH /v1/fields/{field_id}`](/docs/api-reference/fields-and-pipelines/update-field/), [`DELETE /v1/fields/{field_id}`](/docs/api-reference/fields-and-pipelines/delete-field/), [`POST /v1/picklists`](/docs/api-reference/fields-and-pipelines/create-picklist/), [`PATCH /v1/picklists/{picklist_id}`](/docs/api-reference/fields-and-pipelines/update-picklist/), [`DELETE /v1/picklists/{picklist_id}`](/docs/api-reference/fields-and-pipelines/delete-picklist/), [`POST /v1/pipelines`](/docs/api-reference/fields-and-pipelines/create-pipeline/), [`PATCH /v1/pipelines/{pipeline_id}`](/docs/api-reference/fields-and-pipelines/update-pipeline/), [`DELETE /v1/pipelines/{pipeline_id}`](/docs/api-reference/fields-and-pipelines/delete-pipeline/), [`PATCH /v1/tags/{name}`](/docs/api-reference/fields-and-pipelines/update-tag/) |
| `tasks:read` | [`POST /v1/tasks/query`](/docs/api-reference/tasks/query-tasks/) |
| `tasks:write` | [`POST /v1/tasks`](/docs/api-reference/tasks/create-task/), [`POST /v1/tasks/bulk`](/docs/api-reference/tasks/bulk-tasks/), [`PATCH /v1/tasks/{task_id}`](/docs/api-reference/tasks/update-task/) |
| `webhooks:read` | [`GET /v1/webhook-endpoints`](/docs/api-reference/webhooks/list-webhook-endpoints/), [`GET /v1/webhook-endpoints/{endpoint_id}/deliveries`](/docs/api-reference/webhooks/list-webhook-deliveries/) |
| `webhooks:write` | [`POST /v1/webhook-deliveries/{delivery_id}/retry`](/docs/api-reference/webhooks/retry-webhook-delivery/), [`POST /v1/webhook-endpoints`](/docs/api-reference/webhooks/create-webhook-endpoint/), [`PATCH /v1/webhook-endpoints/{endpoint_id}`](/docs/api-reference/webhooks/update-webhook-endpoint/), [`DELETE /v1/webhook-endpoints/{endpoint_id}`](/docs/api-reference/webhooks/delete-webhook-endpoint/), [`POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret`](/docs/api-reference/webhooks/rotate-webhook-secret/), [`POST /v1/webhook-endpoints/{endpoint_id}/test`](/docs/api-reference/webhooks/test-webhook-endpoint/) |

## Choosing scopes

| You want to | Scopes |
|---|---|
| Sync contacts and companies into your CRM | `contacts:read`, `companies:read`, `schema:read` |
| Write changes back to Valeron | `contacts:write`, `companies:write` |
| Send calls for analysis and read the results | `analyses:write`, `recordings:read` |
| Manage webhook endpoints from code | `webhooks:read`, `webhooks:write` |

Create one key per integration. If one is ever exposed, you revoke that key and nothing else stops.
