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

# How to create a list item

> How to create a list item using web service APIs

Create a list item and add it to an existing list, use the `Lists` endpoint.

<Tabs>
  <Tab title="RESTful REST API">
    ```http theme={null}
    POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/List/109/Items HTTP/1.1
    Authorization: Bearer {{token}}
    Accept: application/json; charset=utf-8
    Content-Type: application/json; charset=utf-8

    {
      "Name": "Custom list item one",
      "Tooltip": "Custom list item one",
    }
    ```

    **Response:**

    ```json theme={null}
    {
      "Id": 20,
      "Name": "Custom list item one",
      "Tooltip": "Custom list item one",
      "Deleted": false,
      "UdListDefinitionId": 108,
      "Rank": 0,
      "TableRight": null,
      "FieldProperties": {}
    }
    ```
  </Tab>

  <Tab title="HTTP RPC Agent API">
    Use the `CreateDefaultListItemEntity` to get the default list item JSON structure, then use the SaveListItemEntity endpoint to persist the new list.

    ```http theme={null}
    POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/CreateDefaultListItemEntity HTTP/1.1
    Authorization: Bearer {{token}}
    Accept: application/json; charset=utf-8
    ```

    **Response:**

    ```json theme={null}
    {
      "Id": 0,
      "Name": null,
      "Tooltip": null,
      "Deleted": false,
      "UdListDefinitionId": 0,
      "Rank": 0,
      "TableRight": null,
      "FieldProperties": {}
    }
    ```

    Save the list.

    <Warning>
      Make sure to append/assign the default list item JSON to the named parameter **ListItemEntity** when saving.
    </Warning>

    ```http theme={null}
    POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/SaveListItemEntity HTTP/1.1
    Authorization: Bearer {{token}}
    Accept: application/json; charset=utf-8
    Content-Type: application/json

    {
      "ListItemEntity": {
        "Id": 0,
        "Name": "Custom List Item one",
        "Tooltip": "Represents custom list item one",
        "Deleted": false,
        "UdListDefinitionId": 106,
        "Rank": 0
      }
    }
    ```

    **Response:**

    ```JSON theme={null}
    {
      "Id": 25,
      "Name": "Custom List Item six",
      "Tooltip": "Represents custom list item six",
      "Deleted": false,
      "UdListDefinitionId": 106,
      "Rank": 0,
      "TableRight": null,
      "FieldProperties": {}
    }
    ```
  </Tab>

  <Tab title="WebApi Proxy API">
    Create a list item using the [SuperOffice.WebApi][1] proxy client.

    ```csharp theme={null}
    var config = new WebApiOptions(tenant.WebApiUrl);
    config.Authorization = new AuthorizationAccessToken("8A:Cust12345.Example-Token", OnlineEnvironment.SOD);
    var listAgent = new ListAgent(config);

    var listItem = await listAgent.CreateDefaultListItemEntityAsync();
    listItem.Name = "Custom list item one";
    listItem.Tooltip = "Custom list item one tooltip";
    listItem = await listAgent.SaveListItemEntityAsync(listItem);
    ```
  </Tab>
</Tabs>

[Back](./index)

[1]: ../../../web-services/proxies/index


## Related topics

- [How to create a list](/en/api/lists/services/how-to/create-list.md)
- [How to delete a list item](/en/api/lists/services/how-to/delete-list-item.md)
- [How to get a specific list item](/en/api/lists/services/how-to/get-list-item.md)
- [How to get all list items](/en/api/lists/services/how-to/get-list-items.md)
- [How to set a user-defined list item on a Udef field (services)](/en/api/web-services/howto/custom-objects/set-udef-listitem-value.md)
