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

# Get Form

> Returns one cached form with its full definition.

Returns a single cached form by its Cobalt id, including the full `definition` — the nested tree of categories, questions, and selectable answers. Use this to discover the question ids you supply in the `answers` object of [`POST /v1/services`](/api-reference/services/create).

The `id` path parameter is the Cobalt form id (UUID) from [`GET /v1/forms`](/api-reference/forms/get).

<Note>
  Forms are currently supported for **Credible**.
</Note>

### The definition structure

`definition.categories` is an ordered tree. A category holds child `categories` and `questions`; a question holds selectable `answers`.

* Each **question** carries an `emrQuestionId`. That id is the key you use in the service `answers` object.
* Each **answer** carries a `value` — the option a question can be scored/set to (for a scored questionnaire this is the numeric score, e.g. `"0"`..`"3"`).
* `isRequired` / `isFormRequired` tell you which questions must be answered; omitting a required answer fails the service with `Missing required answers`.

<Note>
  The form metadata fields (`emr_form_id`, `synced_at`, ...) are snake\_case. The nested `definition` is passed through as the EMR structures it and keeps its own field names (e.g. `emrQuestionId`, `emrCategoryId`). Treat the definition as an opaque tree — read the ids and values out of it rather than depending on its exact field casing.
</Note>

### Example Request

```bash theme={null}
curl https://api.usecobalt.com/v1/forms/123e4567-e89b-12d3-a456-426614174000 \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH'
```

### Example Response

```json theme={null}
{
    "success": true,
    "form": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "emr_form_id": "392",
        "emr_fvid": "1045",
        "name": "GAD-7",
        "type": "Assessment",
        "version": "3",
        "status": "Active",
        "build_date": "2026-01-15",
        "synced_at": "2026-08-26T09:00:00.000Z",
        "created_at": "2026-01-20T12:00:00.000Z",
        "updated_at": "2026-08-26T09:00:00.000Z",
        "definition": {
            "categories": [
                {
                    "emrCategoryId": "7781",
                    "parentEmrCategoryId": null,
                    "name": "GAD-7",
                    "order": 1,
                    "categories": [],
                    "questions": [
                        {
                            "emrQuestionId": "453149",
                            "emrCategoryId": "7781",
                            "order": 1,
                            "text": "Feeling nervous, anxious, or on edge",
                            "formatCode": "RB",
                            "formatLabel": "Radio Button",
                            "isRequired": true,
                            "isFormRequired": false,
                            "externalId": null,
                            "snomedCode": null,
                            "loincCode": null,
                            "units": null,
                            "calcFormula": null,
                            "answers": [
                                { "emrAnswerId": "980011", "value": "0", "order": 1 },
                                { "emrAnswerId": "980012", "value": "1", "order": 2 },
                                { "emrAnswerId": "980013", "value": "2", "order": 3 },
                                { "emrAnswerId": "980014", "value": "3", "order": 4 }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}
```

### Error Responses

#### Invalid ID Format

```json theme={null}
{
    "success": false,
    "message": "Invalid form ID format. Must be a valid UUID."
}
```

#### Form Not Found

```json theme={null}
{
    "success": false,
    "message": "Form not found"
}
```


## OpenAPI

````yaml GET /forms/{id}
openapi: 3.0.0
info:
  title: Cobalt API
  version: 1.0.1
  description: API for interacting with Cobalt's EHR integration services
servers:
  - url: https://api.usecobalt.com/v1
security:
  - ClientCredentials: []
    ClientSecret: []
    AccessToken: []
paths:
  /forms/{id}:
    get:
      summary: Get Form
      description: >-
        Returns one cached form with its full definition (a nested tree of
        categories, questions, and selectable answers) by its Cobalt id. Each
        question carries an emrQuestionId, which is the key used in the answers
        object of POST /services. Currently supported for Credible.
      parameters:
        - name: id
          in: path
          required: true
          description: Cobalt form id (UUID).
          schema:
            type: string
      responses:
        '200':
          description: The cached form with its full definition
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  form:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      emr_form_id:
                        type: string
                        example: '392'
                      emr_fvid:
                        type: string
                        nullable: true
                        example: '1045'
                      name:
                        type: string
                        example: GAD-7
                      type:
                        type: string
                        nullable: true
                        example: Assessment
                      version:
                        type: string
                        nullable: true
                        example: '3'
                      status:
                        type: string
                        nullable: true
                        example: Active
                      build_date:
                        type: string
                        nullable: true
                        example: '2026-01-15'
                      synced_at:
                        type: string
                        nullable: true
                        example: '2026-08-26T09:00:00.000Z'
                      created_at:
                        type: string
                        nullable: true
                        example: '2026-01-20T12:00:00.000Z'
                      updated_at:
                        type: string
                        nullable: true
                        example: '2026-08-26T09:00:00.000Z'
                      definition:
                        type: object
                        description: >-
                          Nested form definition. definition.categories is an
                          ordered tree; a category holds child categories and
                          questions; a question holds selectable answers. Each
                          question's emrQuestionId is the key used in the POST
                          /services answers object; each answer's value is the
                          option it can be set to.
                        properties:
                          categories:
                            type: array
                            items:
                              type: object
                              additionalProperties: true
        '400':
          description: Invalid form id format
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: Invalid form ID format. Must be a valid UUID.
        '404':
          description: Form not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    example: Form not found
components:
  securitySchemes:
    ClientCredentials:
      type: apiKey
      in: header
      name: client_id
    ClientSecret:
      type: apiKey
      in: header
      name: client_secret
    AccessToken:
      type: apiKey
      in: header
      name: access_token

````