Passer au contenu principal
PUT
/
2
/
lists
/
{id}
Mettre à jour une liste
curl --request PUT \
  --url https://api.x.com/2/lists/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "name": "<string>",
  "private": true
}
'
{
  "data": {
    "updated": true
  },
  "errors": [
    {
      "title": "<string>",
      "type": "<string>",
      "detail": "<string>",
      "status": 123
    }
  ]
}

Autorisations

Authorization
string
header
requis

The access token received from the authorization server in the OAuth 2.0 flow.

Paramètres de chemin

id
string
requis

L’identifiant de la Liste à modifier. L’identifiant unique de cette Liste.

Pattern: ^[0-9]{1,19}$
Exemple:

"1146654567674912769"

Corps

application/json
description
string
Maximum string length: 100
name
string
Required string length: 1 - 25
private
boolean

Réponse

La requête a réussi.

data
object
errors
object[]
Minimum array length: 1

Un objet HTTP Problem Details, tel que défini dans la RFC IETF 7807 (https://tools.ietf.org/html/rfc7807).