X (Twitter) · Arazzo Workflow

X Create a List and Add a Member by Username

Version 1.0.0

Create a new List, resolve a member handle, and add them to the List.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Social-MediaMicrobloggingReal-Time DataStreamingAdvertisingContentArazzoWorkflows

Provider

twitter

Workflows

create-list-add-member
Create a List then add a resolved user to it.
Chains the create-list endpoint, the username lookup endpoint, and the add-list-member endpoint so a List can be created and seeded in one flow.
3 steps inputs: authorization, description, memberUsername, name, private outputs: isMember, listId, memberUserId
1
createList
Create a new List for the authenticated user.
2
resolveMember
Resolve the member's username into a numeric user id.
3
addMember
Add the resolved user as a member of the newly created List.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: X Create a List and Add a Member by Username
  summary: Create a new List, resolve a member handle, and add them to the List.
  description: >-
    Bootstraps a curated X List from scratch. The workflow creates a new List
    for the authenticated user, resolves a member's @username into a numeric
    user id, and adds that user as the first member of the List. The create and
    add steps inline their request bodies so the chain reads and executes
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: listsApi
  url: ../openapi/twitter-lists-api-openapi.yml
  type: openapi
- name: usersApi
  url: ../openapi/twitter-users-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-list-add-member
  summary: Create a List then add a resolved user to it.
  description: >-
    Chains the create-list endpoint, the username lookup endpoint, and the
    add-list-member endpoint so a List can be created and seeded in one flow.
  inputs:
    type: object
    required:
    - name
    - memberUsername
    properties:
      name:
        type: string
        description: The name of the List to create (1-25 characters).
      description:
        type: string
        description: An optional description for the List (up to 100 characters).
        default: ""
      private:
        type: boolean
        description: Whether the List should be private.
        default: false
      memberUsername:
        type: string
        description: The @username of the user to add as a member, without the leading @.
      authorization:
        type: string
        description: OAuth2 user token to authorize the requests (e.g. "Bearer xxx").
  steps:
  - stepId: createList
    description: Create a new List for the authenticated user.
    operationId: createLists
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.name
        description: $inputs.description
        private: $inputs.private
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authorization
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      listId: $response.body#/data/id
      listName: $response.body#/data/name
  - stepId: resolveMember
    description: Resolve the member's username into a numeric user id.
    operationId: getUsersByUsername
    parameters:
    - name: username
      in: path
      value: $inputs.memberUsername
    - name: user.fields
      in: query
      value: id,name,username
    - name: Authorization
      in: header
      value: $inputs.authorization
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      memberUserId: $response.body#/data/id
  - stepId: addMember
    description: Add the resolved user as a member of the newly created List.
    operationId: addListsMember
    parameters:
    - name: id
      in: path
      value: $steps.createList.outputs.listId
    - name: Authorization
      in: header
      value: $inputs.authorization
    requestBody:
      contentType: application/json
      payload:
        user_id: $steps.resolveMember.outputs.memberUserId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      isMember: $response.body#/data/is_member
  outputs:
    listId: $steps.createList.outputs.listId
    memberUserId: $steps.resolveMember.outputs.memberUserId
    isMember: $steps.addMember.outputs.isMember

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/twitter-create-list-add-member-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.