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

# Get Workspace

> Get the workspace settings an integration needs with GET /api/workspace: organization, API key access, plan, won conversions, lost reasons, labels, custom field keys, forms and lead update settings.

Returns the settings an integration needs to send valid data: the IDs of won conversions and labels, the list of lost reasons, custom field keys, forms and the lead update settings. Call it when you set up an integration, and again when the settings may have changed.

Read-only API keys can use this endpoint.

## Example Request

```bash theme={null}
curl -X GET \
  -H "X-API-KEY: your_api_key" \
  "https://octanist.com/api/workspace"
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "organization": {
      "id": "org_abc123",
      "name": "Acme Inc",
      "currency": "EUR",
      "timezone": "Europe/Amsterdam"
    },
    "apiKey": {
      "access": "full"
    },
    "plan": {
      "tier": "professional",
      "leadLimit": 1000
    },
    "conversions": [
      { "id": "conv_qualified", "name": "Qualified lead", "type": "qualified", "isDefault": false },
      { "id": "conv_won_default", "name": "Won lead", "type": "won", "isDefault": true },
      { "id": "conv_won_subscription", "name": "Subscription sold", "type": "won", "isDefault": false }
    ],
    "lostReasons": {
      "enabled": true,
      "reasons": ["Too expensive", "No response", "Chose a competitor"]
    },
    "labels": {
      "enabled": true,
      "items": [
        { "id": "label_xyz", "name": "Enterprise", "color": "#3F6967" }
      ]
    },
    "customFieldKeys": ["company", "budget"],
    "forms": [
      { "identifier": "contact-form", "name": "Contact form", "submissions": 412 }
    ],
    "leadUpdates": {
      "multipleMatchBehavior": "most_recent",
      "matchLeadsByEmailDomain": false,
      "autoQualifyWonLeads": true,
      "allowWonValueUpdates": false
    }
  },
  "meta": {
    "requestId": "req_a1b2c3d4e5f6",
    "timestamp": "2026-03-10T12:00:00.000Z"
  }
}
```

## Response Fields

| Field | Type | Description |
| - | - | - |
| `organization.id` | string | Organization ID |
| `organization.name` | string | Organization name |
| `organization.currency` | string | Default currency, for example `EUR` |
| `organization.timezone` | string | Timezone used for dates in reports |
| `apiKey.access` | string | `full` or `read`. See [Key access](https://octanist.com/docs/api-reference/authentication.md#key-access). |
| `plan` | object \| null | `tier` (`starter`, `professional`, `advanced` or `custom`) and `leadLimit` per billing period (`-1` means unlimited). `null` without a plan. |
| `conversions` | array | Conversions under **Settings > Conversions**: `id`, `name`, `type` (`qualified`, `won`, `form` or `call`) and `isDefault` |
| `lostReasons.enabled` | boolean | Whether the workspace uses a fixed list of lost reasons |
| `lostReasons.reasons` | string\[] | The lost reasons, or an empty list when `enabled` is `false`. Send one of these as `lossReason` when `enabled` is `true`. |
| `labels.enabled` | boolean | Whether labels are turned on |
| `labels.items` | array | Labels with `id`, `name` and `color`. Use `id` as `labelId`. |
| `customFieldKeys` | string\[] | Keys found in the custom data of recent leads |
| `forms` | array | Up to 100 forms with `identifier`, `name` and number of `submissions`. Forms you denied in form mapping are left out. |
| `leadUpdates.multipleMatchBehavior` | string | What an update does when several leads match: `most_recent`, `oldest`, `all`, `split_value` or `error`. See [Several matching leads](https://octanist.com/docs/api-reference/endpoint/update-lead.md#several-matching-leads). |
| `leadUpdates.matchLeadsByEmailDomain` | boolean | Whether Same-Company Lead Matching is on |
| `leadUpdates.autoQualifyWonLeads` | boolean | Whether a won lead also gets the qualified milestone |
| `leadUpdates.allowWonValueUpdates` | boolean | Whether the value of a won lead can still change |

## Using the IDs

| To send | Use |
| - | - |
| `conversionEventId` on [`PATCH /api/leads`](https://octanist.com/docs/api-reference/endpoint/update-lead#choosing-the-won-conversion) | `id` of a conversion with `"type": "won"` |
| `labelId` on [`POST /api/leads`](https://octanist.com/docs/api-reference/endpoint/create-lead#value-and-label), or `set.labelId` on `PATCH /api/leads` | `id` from `labels.items` |
| `lossReason` on `PATCH /api/leads` | One of `lostReasons.reasons` when `lostReasons.enabled` is `true`. The API accepts any text, so check this yourself. |

## Error Responses

| Status | Code | Description |
| - | - | - |
| 401 | `UNAUTHORIZED` | Missing or invalid API key |
| 500 | `INTERNAL_ERROR` | Server error |


## OpenAPI

````yaml GET /api/workspace
openapi: 3.0.1
info:
  title: Octanist API
  description: >-
    The Octanist API allows you to create, update and read leads, run reports,
    read workspace settings, retrieve statistics, and access ad spend data.
  version: 2.5.0
  contact:
    name: Octanist Support
    url: https://octanist.com/docs
servers:
  - url: https://octanist.com
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /api/workspace:
    get:
      tags:
        - Workspace
      summary: Get Workspace
      description: >-
        The settings an integration needs to send valid data: won conversions,
        lost reasons, labels, custom field keys, forms and lead update settings.
      responses:
        '200':
          description: Workspace settings
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Workspace'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Workspace:
      type: object
      properties:
        organization:
          type: object
          properties:
            id:
              type: string
              example: org_abc123
            name:
              type: string
              example: Acme Inc
            currency:
              type: string
              example: EUR
            timezone:
              type: string
              example: Europe/Amsterdam
        apiKey:
          type: object
          properties:
            access:
              type: string
              enum:
                - full
                - read
              example: full
        plan:
          type: object
          nullable: true
          description: null without a plan
          properties:
            tier:
              type: string
              enum:
                - starter
                - professional
                - advanced
                - custom
              example: professional
            leadLimit:
              type: integer
              description: Leads per billing period; -1 means unlimited
              example: 1000
        conversions:
          type: array
          description: >-
            Conversions under Settings > Conversions. Use the id of a `won`
            conversion as conversionEventId.
          items:
            type: object
            properties:
              id:
                type: string
                example: conv_won_default
              name:
                type: string
                example: Won lead
              type:
                type: string
                enum:
                  - qualified
                  - won
                  - form
                  - call
                example: won
              isDefault:
                type: boolean
                example: true
        lostReasons:
          type: object
          properties:
            enabled:
              type: boolean
              description: Whether the workspace uses a fixed list of lost reasons
            reasons:
              type: array
              items:
                type: string
              example:
                - Too expensive
                - No response
        labels:
          type: object
          properties:
            enabled:
              type: boolean
            items:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: label_xyz
                  name:
                    type: string
                    example: Enterprise
                  color:
                    type: string
                    example: '#3F6967'
        customFieldKeys:
          type: array
          items:
            type: string
          description: Keys found in the custom data of recent leads
          example:
            - company
            - budget
        forms:
          type: array
          description: Up to 100 forms; denied forms are left out
          items:
            type: object
            properties:
              identifier:
                type: string
                example: contact-form
              name:
                type: string
                nullable: true
                example: Contact form
              submissions:
                type: integer
                example: 412
        leadUpdates:
          type: object
          properties:
            multipleMatchBehavior:
              type: string
              enum:
                - most_recent
                - oldest
                - all
                - split_value
                - error
              example: most_recent
            matchLeadsByEmailDomain:
              type: boolean
            autoQualifyWonLeads:
              type: boolean
            allowWonValueUpdates:
              type: boolean
    Meta:
      type: object
      properties:
        requestId:
          type: string
          example: req_a1b2c3d4e5f6
        timestamp:
          type: string
          format: date-time
          example: '2026-03-10T12:00:00.000Z'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human readable error message
              example: Human readable error message
            details:
              type: object
              description: Optional additional error details
        meta:
          $ref: '#/components/schemas/Meta'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.