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

# Import actions

> Import actions from a Swagger file to a copilot by ID

### Body

<ParamField path="id" type="string">
  The uuid of the copilot
</ParamField>

### Headers

<ParamField path="header" name="Accept" type="string">
  application/json
</ParamField>

<ParamField path="header" name="Authorization" type="string">
  Bearer YOUR\_TOKEN
</ParamField>

### Response

<ResponseField name="message" type="string">
  Indicates whether the call was successful.
</ResponseField>

<RequestExample>
  ```bash Example Request
  curl --location --request PUT 'https://api.opencopilot.so/backend/actions/bot/:id/import-from-swagger' \
  --header 'Accept: application/json' \
  --header 'Authorization : Bearer YOUR_TOKEN' \
  --form 'file=@"/Users/gharbat/Desktop/swagger.json"'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
      "message": "Successfully imported actions from swagger.json"
  }
  ```
</ResponseExample>
