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

# Update proxy config (allowed origins, defaults, signing toggle)

` PUT /api/projects/{id}/proxy-config `

Update proxy config (allowed origins, defaults, signing toggle)

## Servers

- ` https://motioness.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` sessionCookie `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Session cookie set by /api/user/signin, /api/user/signup, or the OAuth callback. Required for all authenticated endpoints.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

  - example: ` "abc123" `

  - minLength: ` 1 `

Example:

```json
"abc123"
```

## Request body (optional)

Content type: ` application/json `

- ` value `: type ` object `

  - ` allowed_origins `: type ` array `

    - ` array item `: type ` string `

  - ` default_motion `: type ` string `

    - enum: ` ["subtle","medium","kinetic"] `

  - ` default_dur_seconds `: type ` integer `

    - minimum: ` 2 `

    - maximum: ` 8 `

  - ` default_mode `: type ` string `

    - enum: ` ["loop","animate-in","animate-on-hover"] `

  - ` enable_signing `: type ` boolean `

## Responses

### ` 200 ` — Updated

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` project `

  - ` project `: type ` object `

    - Required fields: ` proxy_key `, ` allowed_origins `, ` default_motion `, ` default_dur_seconds `, ` default_mode `, ` signing_secret `

    - ` proxy_key `: type ` string `; nullable

    - ` allowed_origins `: type ` string `; nullable

    - ` default_motion `: type ` string `; nullable

    - ` default_dur_seconds `: type ` number `; nullable

    - ` default_mode `: type ` string `; nullable

    - ` signing_secret `: type ` string `; nullable

### ` 404 ` — Not found

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X PUT 'https://motioness.com/api/projects/abc123/proxy-config' \
  -H 'Content-Type: application/json' \
  -d '{
  "allowed_origins": [
    "string"
  ],
  "default_motion": "subtle",
  "default_dur_seconds": 2,
  "default_mode": "loop",
  "enable_signing": true
}'
```

### JavaScript

```javascript
const response = await fetch('https://motioness.com/api/projects/abc123/proxy-config', {
  method: 'PUT',
  headers: {
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "allowed_origins": [
      "string"
    ],
    "default_motion": "subtle",
    "default_dur_seconds": 2,
    "default_mode": "loop",
    "enable_signing": true
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.put('https://motioness.com/api/projects/abc123/proxy-config', json={
  "allowed_origins": [
    "string"
  ],
  "default_motion": "subtle",
  "default_dur_seconds": 2,
  "default_mode": "loop",
  "enable_signing": true
})
print(response.json())
```