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

# Update Feed Configuration

> Update an IMS feed configuration.

`PATCH /v1/ims/feeds/{feed_id}`

<Warning>
  **AutoSnap-internal only.** This endpoint is restricted to AutoSnap admin clients. Customers must email AutoSnap support to change a feed config; non-admin API keys receive `403 ADMIN_REQUIRED`.
</Warning>

Update an existing IMS feed configuration. Only the fields you include in the request body are modified.

## Parameters

| Name      | Type    | In    | Required | Description    |
| --------- | ------- | ----- | -------- | -------------- |
| `api_key` | string  | query | Yes      | Your API key   |
| `feed_id` | integer | path  | Yes      | Feed config ID |

## Request Body

All fields are optional. Only include the fields you want to change.

| Field                       | Type    | Description                             |
| --------------------------- | ------- | --------------------------------------- |
| `ftp_path`                  | string  | Provider directory name on SFTP         |
| `file_name`                 | string  | CSV filename to monitor                 |
| `dealer_identifier`         | string  | Dealer ID filter for multi-dealer files |
| `staleness_threshold_hours` | integer | Hours before stale alert                |
| `active`                    | boolean | Enable or disable the feed              |

## Example

### Disable a feed

```bash theme={null}
curl -X PATCH "https://api.autosnap.com/v1/ims/feeds/1?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active": false}'
```

### Change staleness threshold

```bash theme={null}
curl -X PATCH "https://api.autosnap.com/v1/ims/feeds/1?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"staleness_threshold_hours": 24}'
```

## Response

```json theme={null}
{
  "id": 1,
  "status": "updated",
  "fields": ["active"]
}
```

## Errors

| Status | Detail                  | Cause                                          |
| ------ | ----------------------- | ---------------------------------------------- |
| `400`  | `No fields to update`   | Request body was empty or all fields were null |
| `403`  | `Not authorized`        | Feed belongs to a different client             |
| `404`  | `Feed config not found` | No feed with this ID exists                    |


## OpenAPI

````yaml PATCH /v1/ims/feeds/{feed_id}
openapi: 3.0.3
info:
  title: AutosnapAI Origin API
  description: Dealer resolution, inventory management, and webhook APIs
  version: 1.0.0
servers:
  - url: https://api.autosnap.com
    description: Production
security: []
paths:
  /v1/ims/feeds/{feed_id}:
    patch:
      tags:
        - ims
      summary: Update Feed Configuration
      description: >-
        Update an IMS feed configuration. Only include fields you want to
        change.
      operationId: update_ims_feed
      parameters:
        - name: feed_id
          in: path
          required: true
          schema:
            type: integer
            title: Feed Id
        - name: api_key
          in: query
          required: true
          schema:
            type: string
            title: Api Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedConfigUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '403':
          description: Not authorized
        '404':
          description: Feed config not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FeedConfigUpdate:
      type: object
      properties:
        ftp_path:
          type: string
          nullable: true
          title: FTP Path
        file_name:
          type: string
          nullable: true
          title: File Name
        dealer_identifier:
          type: string
          nullable: true
          title: Dealer Identifier
        staleness_threshold_hours:
          type: integer
          nullable: true
          title: Staleness Threshold Hours
        active:
          type: boolean
          nullable: true
          title: Active
      title: FeedConfigUpdate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````