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

# Update a course

> Update name, AI instructions, metadata, and so on. Patch semantics.

## Path parameters

<ParamField path="id" type="string" required />

## Body

Any of the [Course](/api-reference/courses/object) attributes that are
writable: `name`, `description`, `language`, `hours`, `ai`, `tutor`,
`metadata`, `image`.

## Examples

<CodeGroup>
  ```ts TypeScript theme={null}
  await hk.courses.update("crs_123", {
    ai: { instructions: "Use SI units throughout. Prefer derivations." },
    tutor: { name: "Dr. Hawking", voice: "encouraging-academic" },
  });
  ```

  ```php PHP theme={null}
  $hk->courses->update('crs_123', [
      'ai' => ['instructions' => 'Use SI units throughout. Prefer derivations.'],
      'tutor' => ['name' => 'Dr. Hawking', 'voice' => 'encouraging-academic'],
  ]);
  ```
</CodeGroup>

## Returns

The updated [Course](/api-reference/courses/object).

<Note>
  `update` does **not** propagate to existing cohorts by default. To
  propagate, pass `{ propagate: true }`:

  <CodeGroup>
    ```ts TypeScript theme={null}
    await hk.courses.update("crs_123", { ai: { ... } }, { propagate: true });
    ```

    ```php PHP theme={null}
    $hk->courses->update('crs_123', ['ai' => [ /* ... */ ]], ['propagate' => true]);
    ```
  </CodeGroup>
</Note>
