# Update funnel (legacy)

Update a funnel.    *This endpoint is for Audience Studio legacy. For the latest Audience Studio, contact your Customer Success Representative.*

Endpoint: PUT /audiences/{audienceId}/funnels/{funnelId}
Version: 1.0.0
Security: TdApikeyAuth

## Security:

  - `TdApikeyAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `audienceId` (integer, required)
    Master Segment ID

  - `funnelId` (integer, required)
    Funnel ID

## Request body:

  - `application/json` (unknown)
    Funnel parameters to update

## Request fields (application/json):

  - `name` (string, required)
    name

  - `description` (string)
    description

  - `segmentFolderId` (integer, required)

  - `stages` (array, required)
    funnel stages
    Example: [{"name":"Awareness"},{"id":1,"name":"Interest"},{"name":"Conversion"}]

  - `stages.id` (integer)
    null means new stage, non-null means no-op or updating existing stage name or updating stage orders

  - `stages.name` (string, required)

## Response 200:

  - `200` (unknown)
    Succeeded to update funnel

## Response 200 fields (application/json):

  - `id` (string)

  - `audienceId` (string)

  - `segmentFolderId` (string)

  - `name` (string)

  - `population` (integer)
    The latest population of the funnel

  - `description` (string)

  - `numSyndications` (integer)

  - `needToRunWorkflow` (boolean)
    true if need to run workflow to load data

  - `stages` (array)
    funnel stages
    Example: [{"id":"1","name":"Awareness","numSyndication":2,"audienceId":"1","funnelId":"10","segmentFolderId":"30","segmentId":"999"},{"id":"2","name":"Interest","numSyndications":0,"audienceId":"1","funnelId":…

  - `stages.id` (string)

  - `stages.name` (string)

  - `stages.numSyndications` (integer)

  - `stages.audienceId` (string)

  - `stages.funnelId` (string)

  - `stages.segmentFolderId` (string)

  - `stages.segmentId` (string)

  - `createdAt` (string)

  - `updatedAt` (string)

  - `createdBy` (object)

  - `createdBy.id` (string)

  - `createdBy.td_user_id` (string)

  - `createdBy.name` (string)

## Response 400:

  - `400` (unknown)
    Given parameters are not valid

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.

## Response 401 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 403:

  - `403` (unknown)
    Requested resource or action is not allowed because you don't have sufficient permissions

## Response 403 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 404:

  - `404` (unknown)
    The specified resource was not found

## Response 404 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 4XX:

  - `4XX` (unknown)
    There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.

## Response 4XX fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 5XX:

  - `5XX` (unknown)
    System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

## Response 5XX fields (application/json):

  - `status` (integer, required)
    Error status

  - `error` (string, required)
    Error message

  - `details` (string)
    Detailed error message

