---
title: "Update list contents"
method: PUT
path: "/api/lists/{list_name}/csv"
tags: ["Static Lists"]
---

# Update list contents

`PUT /api/lists/{list_name}/csv`

## Request

- Base URL: `https://go.urbanairship.com`
- URL: `https://go.urbanairship.com/api/lists/{list_name}/csv`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
  - OAuth 2
    - Client credentials
    - Token URL: `http://oauth2.{domain}.com/token` scopes: `lst`
- TypeScript: <https://skmtc.dev/airship/apis/airship-api/docs/api/lists/:list_name/csv/put.ts> (a function with typed inputs; its response is checked against the schema)

Replace the contents of an existing static list via CSV file upload. Uploads must be newline-delimited
identifiers (text/CSV) with commas as the delimiter.

The CSV format is two columns: `identifier_type` and `identifier`. The `identifier` is the associated identifier you wish to send to. The `identifier_type`
must be one of:

  * `named_user`
  * `ios_channel`
  * `android_channel`
  * `amazon_channel`
  * `sms_channel`
  * `email_channel`
  * `open_channel`
  * `web_channel`

The first entry in the uploaded CSV may be a header row, which will be ignored. If present,
the header row must contain exactly two entries, and the first column must not be an
`identifier_type` as specified above.

## Request body `text/csv`

- string, binary

## Response `202`

The request has been accepted for processing.

- OkResponseObject: Returned with 2xx Responses. At a minimum, successful calls return `true` for the `ok` key. If your call includes a verbose response (as with `GET` requests, etc.), the `ok` key will appear in the top-most object, outside the verbose response.
  - `ok` boolean, required: Success.
  - `operation_id` string, uuid: A unique string identifying the operations that modify resources. Use the operation ID to locate and track grouped operations (i.e., a batch push operation may generate multiple `push_id` strings, but a single `operation_id`) or operations that change an existing resource.

## Other responses

- `400`: Bad Request. Parsing or validating the request failed. | Error code | Description | |---|---| | 40002 | CSV contains too many identifiers | | 40003 | CSV contains an entry with a column count other than 2 | | 40004 | CSV contains an invalid `identifier_type` | | 40005 | CSV contains a channel `identifier` that is not a valid UUID |
- `401`: Authentication information (the app key and secret or bearer token) was either incorrect or missing.
- `403`: Authentication was correct, but the user does not have permission to access the requested API, e.g., if the feature in question is not included in your pricing plan.
- `404`: The requested resource doesn't exist.

---

[API](https://skmtc.dev/airship/apis/airship-api.md) - [All operations](https://skmtc.dev/airship/apis/airship-api/llms.txt) - [OpenAPI document](https://skmtc.dev/airship/apis/airship-api/revisions/bd6ab947117a?raw)
